generated-configure.sh revision 2043:5abfe7826b95
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
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655JVM_VARIANT_CORE
656JVM_VARIANT_ZEROSHARK
657JVM_VARIANT_ZERO
658JVM_VARIANT_HOTSPOT
659JVM_VARIANT_MINIMAL1
660JVM_VARIANT_CLIENT
661JVM_VARIANT_SERVER
662JVM_VARIANTS_COMMA
663TEST_IN_BUILD
664HOTSPOT_MAKE_ARGS
665MACOSX_UNIVERSAL
666DEBUG_CLASSFILES
667FASTDEBUG
668VARIANT
669USE_NEW_HOTSPOT_BUILD
670LIBZIP_CAN_USE_MMAP
671LIBDL
672LIBM
673USE_EXTERNAL_LCMS
674LCMS_LIBS
675LCMS_CFLAGS
676USE_EXTERNAL_LIBZ
677USE_EXTERNAL_LIBPNG
678PNG_LIBS
679PNG_CFLAGS
680USE_EXTERNAL_LIBGIF
681USE_EXTERNAL_LIBJPEG
682LLVM_LIBS
683LLVM_LDFLAGS
684LLVM_CFLAGS
685LLVM_CONFIG
686LIBFFI_LIBS
687LIBFFI_CFLAGS
688ALSA_LIBS
689ALSA_CFLAGS
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702STATIC_CXX_SETTING
703FIXPATH_DETACH_FLAG
704FIXPATH
705VALID_JVM_FEATURES
706JVM_FEATURES_custom
707JVM_FEATURES_zeroshark
708JVM_FEATURES_zero
709JVM_FEATURES_minimal
710JVM_FEATURES_core
711JVM_FEATURES_client
712JVM_FEATURES_server
713INCLUDE_DTRACE
714GCOV_ENABLED
715STRIP_POLICY
716DEBUG_BINARIES
717ZIP_EXTERNAL_DEBUG_SYMBOLS
718COPY_DEBUG_SYMBOLS
719COMPILE_WITH_DEBUG_SYMBOLS
720CFLAGS_WARNINGS_ARE_ERRORS
721BUILD_CC_DISABLE_WARNING_PREFIX
722DISABLE_WARNING_PREFIX
723HOTSPOT_SET_WARNINGS_AS_ERRORS
724WARNINGS_AS_ERRORS
725COMPILER_SUPPORTS_TARGET_BITS_FLAG
726ZERO_ARCHFLAG
727LDFLAGS_TESTEXE
728LDFLAGS_TESTLIB
729CXXFLAGS_TESTEXE
730CXXFLAGS_TESTLIB
731CFLAGS_TESTEXE
732CFLAGS_TESTLIB
733OPENJDK_BUILD_JVM_LIBS
734OPENJDK_BUILD_JVM_ASFLAGS
735OPENJDK_BUILD_JVM_LDFLAGS
736OPENJDK_BUILD_JVM_CFLAGS
737OPENJDK_BUILD_LDFLAGS_HASH_STYLE
738OPENJDK_BUILD_LDFLAGS_CXX_JDK
739OPENJDK_BUILD_JDKEXE_LIBS
740OPENJDK_BUILD_JDKLIB_LIBS
741OPENJDK_BUILD_LDFLAGS_JDKEXE
742OPENJDK_BUILD_LDFLAGS_JDKLIB
743OPENJDK_BUILD_CXXFLAGS_JDKEXE
744OPENJDK_BUILD_CXXFLAGS_JDKLIB
745OPENJDK_BUILD_CFLAGS_JDKEXE
746OPENJDK_BUILD_CFLAGS_JDKLIB
747OPENJDK_BUILD_CXXSTD_CXXFLAG
748JVM_LIBS
749JVM_ASFLAGS
750JVM_LDFLAGS
751JVM_CFLAGS
752LDFLAGS_HASH_STYLE
753LDFLAGS_CXX_JDK
754JDKEXE_LIBS
755JDKLIB_LIBS
756LDFLAGS_JDKEXE
757LDFLAGS_JDKLIB
758CXXFLAGS_JDKEXE
759CXXFLAGS_JDKLIB
760CFLAGS_JDKEXE
761CFLAGS_JDKLIB
762MACOSX_VERSION_MIN
763NO_LIFETIME_DSE_CFLAG
764NO_NULL_POINTER_CHECK_CFLAG
765CXXSTD_CXXFLAG
766CXX_O_FLAG_SIZE
767CXX_O_FLAG_NONE
768CXX_O_FLAG_DEBUG
769CXX_O_FLAG_NORM
770CXX_O_FLAG_HI
771CXX_O_FLAG_HIGHEST
772CXX_O_FLAG_HIGHEST_JVM
773C_O_FLAG_SIZE
774C_O_FLAG_NONE
775C_O_FLAG_DEBUG
776C_O_FLAG_NORM
777C_O_FLAG_HI
778C_O_FLAG_HIGHEST
779C_O_FLAG_HIGHEST_JVM
780JVM_CFLAGS_SYMBOLS
781CXXFLAGS_DEBUG_SYMBOLS
782CFLAGS_DEBUG_SYMBOLS
783CXX_FLAG_DEPS
784C_FLAG_DEPS
785SHARED_LIBRARY_FLAGS
786SET_SHARED_LIBRARY_MAPFILE
787SET_SHARED_LIBRARY_NAME
788SET_SHARED_LIBRARY_ORIGIN
789SET_EXECUTABLE_ORIGIN
790CXX_FLAG_REORDER
791C_FLAG_REORDER
792JVM_RCFLAGS
793RC_FLAGS
794AR_OUT_OPTION
795LD_OUT_OPTION
796EXE_OUT_OPTION
797CC_OUT_OPTION
798STRIPFLAGS
799ARFLAGS
800COMPILER_BINDCMD_FILE_FLAG
801COMPILER_COMMAND_FILE_FLAG
802COMPILER_TARGET_BITS_FLAG
803JT_HOME
804JTREGEXE
805HOTSPOT_TOOLCHAIN_TYPE
806USING_BROKEN_SUSE_LD
807PACKAGE_PATH
808USE_CLANG
809HOTSPOT_LD
810HOTSPOT_CXX
811HOTSPOT_RC
812HOTSPOT_MT
813BUILD_AS
814BUILD_LDCXX
815BUILD_LD
816BUILD_STRIP
817BUILD_OBJCOPY
818BUILD_AR
819BUILD_NM
820BUILD_CXX
821BUILD_CC
822BUILD_SYSROOT_LDFLAGS
823BUILD_SYSROOT_CFLAGS
824ac_ct_OBJDUMP
825OBJDUMP
826ac_ct_OBJCOPY
827OBJCOPY
828ac_ct_NM
829ac_ct_STRIP
830GNM
831NM
832STRIP
833MSBUILD
834DUMPBIN
835RC
836MT
837LIPO
838ac_ct_AR
839AR
840AS
841LDCXX
842LD
843CXXCPP
844CPP
845CXX_VERSION_NUMBER
846CC_VERSION_NUMBER
847ac_ct_CXX
848CXXFLAGS
849CXX
850TOOLCHAIN_PATH_CXX
851POTENTIAL_CXX
852OBJEXT
853EXEEXT
854ac_ct_CC
855CPPFLAGS
856LDFLAGS
857CFLAGS
858CC
859TOOLCHAIN_PATH_CC
860POTENTIAL_CC
861TOOLCHAIN_VERSION
862VS_LIB
863VS_INCLUDE
864VS_PATH
865CYGWIN_LINK
866SYSROOT_LDFLAGS
867SYSROOT_CFLAGS
868EXTRA_LDFLAGS
869EXTRA_CXXFLAGS
870EXTRA_CFLAGS
871LEGACY_EXTRA_LDFLAGS
872LEGACY_EXTRA_CXXFLAGS
873LEGACY_EXTRA_CFLAGS
874EXE_SUFFIX
875OBJ_SUFFIX
876STATIC_LIBRARY
877SHARED_LIBRARY
878STATIC_LIBRARY_SUFFIX
879SHARED_LIBRARY_SUFFIX
880LIBRARY_PREFIX
881TOOLCHAIN_TYPE
882STATIC_BUILD
883IMPORT_MODULES_MAKE
884IMPORT_MODULES_SRC
885IMPORT_MODULES_CONF
886IMPORT_MODULES_LIBS
887IMPORT_MODULES_CMDS
888IMPORT_MODULES_CLASSES
889BUILD_HOTSPOT
890HOTSPOT_DIST
891BUILD_OUTPUT
892JDK_TOPDIR
893NASHORN_TOPDIR
894HOTSPOT_TOPDIR
895JAXWS_TOPDIR
896JAXP_TOPDIR
897CORBA_TOPDIR
898LANGTOOLS_TOPDIR
899BUILD_JDK
900CREATE_BUILDJDK
901BOOT_JDK_BITS
902JAVAC_FLAGS
903BOOT_JDK_MODULAR
904BOOT_JDK_SOURCETARGET
905JARSIGNER
906JAR
907JAVAH
908JAVAC
909JAVA
910BOOT_JDK
911JAVA_CHECK
912JAVAC_CHECK
913VERSION_IS_GA
914VERSION_SHORT
915VERSION_STRING
916VERSION_NUMBER_FOUR_POSITIONS
917VERSION_NUMBER
918VERSION_OPT
919VERSION_BUILD
920VERSION_PRE
921VERSION_PATCH
922VERSION_SECURITY
923VERSION_MINOR
924VERSION_MAJOR
925MACOSX_BUNDLE_ID_BASE
926MACOSX_BUNDLE_NAME_BASE
927HOTSPOT_VM_DISTRO
928COMPANY_NAME
929JDK_RC_PLATFORM_NAME
930PRODUCT_SUFFIX
931PRODUCT_NAME
932LAUNCHER_NAME
933JLINK_KEEP_PACKAGED_MODULES
934COPYRIGHT_YEAR
935COMPRESS_JARS
936INCLUDE_SA
937UNLIMITED_CRYPTO
938CACERTS_FILE
939BUILD_HEADLESS
940SUPPORT_HEADFUL
941SUPPORT_HEADLESS
942DEFAULT_MAKE_TARGET
943OS_VERSION_MICRO
944OS_VERSION_MINOR
945OS_VERSION_MAJOR
946PKG_CONFIG
947BASH_ARGS
948SETFILE
949CODESIGN
950XATTR
951DSYMUTIL
952IS_GNU_TIME
953PATCH
954DTRACE
955TIME
956STAT
957HG
958READELF
959OTOOL
960LDD
961ZIP
962UNZIP
963FIND_DELETE
964OUTPUT_SYNC
965OUTPUT_SYNC_SUPPORTED
966CHECK_TOOLSDIR_MAKE
967CHECK_TOOLSDIR_GMAKE
968CHECK_MAKE
969CHECK_GMAKE
970MAKE
971PKGHANDLER
972CONFIGURESUPPORT_OUTPUTDIR
973OUTPUT_ROOT
974CONF_NAME
975SPEC
976SDKROOT
977XCODEBUILD
978VALID_JVM_VARIANTS
979JVM_VARIANTS
980DEBUG_LEVEL
981HOTSPOT_DEBUG_LEVEL
982JDK_VARIANT
983SET_OPENJDK
984USERNAME
985CANONICAL_TOPDIR
986ORIGINAL_TOPDIR
987TOPDIR
988PATH_SEP
989ZERO_ARCHDEF
990HOTSPOT_BUILD_CPU_DEFINE
991HOTSPOT_BUILD_CPU_ARCH
992HOTSPOT_BUILD_CPU
993HOTSPOT_BUILD_OS_TYPE
994HOTSPOT_BUILD_OS
995OPENJDK_BUILD_OS_EXPORT_DIR
996OPENJDK_BUILD_CPU_JLI_CFLAGS
997OPENJDK_BUILD_CPU_OSARCH
998OPENJDK_BUILD_CPU_ISADIR
999OPENJDK_BUILD_CPU_LIBDIR
1000OPENJDK_BUILD_CPU_LEGACY_LIB
1001OPENJDK_BUILD_CPU_LEGACY
1002HOTSPOT_TARGET_CPU_DEFINE
1003HOTSPOT_TARGET_CPU_ARCH
1004HOTSPOT_TARGET_CPU
1005HOTSPOT_TARGET_OS_TYPE
1006HOTSPOT_TARGET_OS
1007DEFINE_CROSS_COMPILE_ARCH
1008LP64
1009OPENJDK_TARGET_OS_EXPORT_DIR
1010OPENJDK_TARGET_CPU_JLI_CFLAGS
1011OPENJDK_TARGET_CPU_OSARCH
1012OPENJDK_TARGET_CPU_ISADIR
1013OPENJDK_TARGET_CPU_LIBDIR
1014OPENJDK_TARGET_CPU_LEGACY_LIB
1015OPENJDK_TARGET_CPU_LEGACY
1016REQUIRED_OS_VERSION
1017REQUIRED_OS_NAME
1018COMPILE_TYPE
1019OPENJDK_TARGET_CPU_ENDIAN
1020OPENJDK_TARGET_CPU_BITS
1021OPENJDK_TARGET_CPU_ARCH
1022OPENJDK_TARGET_CPU
1023OPENJDK_TARGET_OS_ENV
1024OPENJDK_TARGET_OS_TYPE
1025OPENJDK_TARGET_OS
1026OPENJDK_BUILD_CPU_ENDIAN
1027OPENJDK_BUILD_CPU_BITS
1028OPENJDK_BUILD_CPU_ARCH
1029OPENJDK_BUILD_CPU
1030OPENJDK_BUILD_OS_ENV
1031OPENJDK_BUILD_OS_TYPE
1032OPENJDK_BUILD_OS
1033OPENJDK_BUILD_AUTOCONF_NAME
1034OPENJDK_TARGET_AUTOCONF_NAME
1035target_os
1036target_vendor
1037target_cpu
1038target
1039host_os
1040host_vendor
1041host_cpu
1042host
1043build_os
1044build_vendor
1045build_cpu
1046build
1047NICE
1048CPIO
1049DF
1050READLINK
1051CYGPATH
1052SED
1053FGREP
1054EGREP
1055GREP
1056AWK
1057XARGS
1058WHICH
1059WC
1060UNIQ
1061UNAME
1062TR
1063TOUCH
1064TEE
1065TAR
1066TAIL
1067SORT
1068SH
1069RMDIR
1070RM
1071PRINTF
1072NAWK
1073MV
1074MKTEMP
1075MKDIR
1076LS
1077LN
1078HEAD
1079FIND
1080FILE
1081EXPR
1082ECHO
1083DIRNAME
1084DIFF
1085DATE
1086CUT
1087CP
1088COMM
1089CMP
1090CHMOD
1091CAT
1092BASH
1093BASENAME
1094DATE_WHEN_CONFIGURED
1095ORIGINAL_PATH
1096CONFIGURE_COMMAND_LINE
1097target_alias
1098host_alias
1099build_alias
1100LIBS
1101ECHO_T
1102ECHO_N
1103ECHO_C
1104DEFS
1105mandir
1106localedir
1107libdir
1108psdir
1109pdfdir
1110dvidir
1111htmldir
1112infodir
1113docdir
1114oldincludedir
1115includedir
1116localstatedir
1117sharedstatedir
1118sysconfdir
1119datadir
1120datarootdir
1121libexecdir
1122sbindir
1123bindir
1124program_transform_name
1125prefix
1126exec_prefix
1127PACKAGE_URL
1128PACKAGE_BUGREPORT
1129PACKAGE_STRING
1130PACKAGE_VERSION
1131PACKAGE_TARNAME
1132PACKAGE_NAME
1133PATH_SEPARATOR
1134SHELL'
1135ac_subst_files=''
1136ac_user_opts='
1137enable_option_checking
1138with_target_bits
1139enable_openjdk_only
1140with_custom_make_dir
1141with_jdk_variant
1142enable_debug
1143with_debug_level
1144with_jvm_variants
1145with_devkit
1146with_sys_root
1147with_sysroot
1148with_tools_dir
1149with_toolchain_path
1150with_extra_path
1151with_sdk_name
1152with_conf_name
1153with_output_sync
1154with_default_make_target
1155enable_headful
1156with_cacerts_file
1157enable_unlimited_crypto
1158with_copyright_year
1159enable_keep_packaged_modules
1160with_milestone
1161with_update_version
1162with_user_release_suffix
1163with_build_number
1164with_version_string
1165with_version_pre
1166with_version_opt
1167with_version_build
1168with_version_major
1169with_version_minor
1170with_version_security
1171with_version_patch
1172with_boot_jdk
1173with_build_jdk
1174with_add_source_root
1175with_override_source_root
1176with_adds_and_overrides
1177with_override_langtools
1178with_override_corba
1179with_override_jaxp
1180with_override_jaxws
1181with_override_hotspot
1182with_override_nashorn
1183with_override_jdk
1184with_import_hotspot
1185with_import_modules
1186enable_static_build
1187with_toolchain_type
1188with_extra_cflags
1189with_extra_cxxflags
1190with_extra_ldflags
1191with_toolchain_version
1192with_build_devkit
1193with_jtreg
1194enable_warnings_as_errors
1195with_native_debug_symbols
1196enable_debug_symbols
1197enable_zip_debug_info
1198enable_native_coverage
1199enable_dtrace
1200with_jvm_features
1201with_jvm_interpreter
1202with_stdc__lib
1203with_msvcr_dll
1204with_msvcp_dll
1205with_x
1206with_cups
1207with_cups_include
1208with_freetype
1209with_freetype_include
1210with_freetype_lib
1211with_freetype_src
1212enable_freetype_bundling
1213with_alsa
1214with_alsa_include
1215with_alsa_lib
1216with_libffi
1217with_libffi_include
1218with_libffi_lib
1219with_libjpeg
1220with_giflib
1221with_libpng
1222with_zlib
1223with_lcms
1224with_dxsdk
1225with_dxsdk_lib
1226with_dxsdk_include
1227enable_new_hotspot_build
1228enable_hotspot_test_in_build
1229enable_jtreg_failure_handler
1230with_num_cores
1231with_memory_size
1232with_jobs
1233with_test_jobs
1234with_boot_jdk_jvmargs
1235with_sjavac_server_java
1236enable_sjavac
1237enable_javac_server
1238enable_icecc
1239enable_precompiled_headers
1240enable_ccache
1241with_ccache_dir
1242'
1243      ac_precious_vars='build_alias
1244host_alias
1245target_alias
1246BASENAME
1247BASH
1248CAT
1249CHMOD
1250CMP
1251COMM
1252CP
1253CUT
1254DATE
1255DIFF
1256DIRNAME
1257ECHO
1258EXPR
1259FILE
1260FIND
1261HEAD
1262LN
1263LS
1264MKDIR
1265MKTEMP
1266MV
1267NAWK
1268PRINTF
1269RM
1270RMDIR
1271SH
1272SORT
1273TAIL
1274TAR
1275TEE
1276TOUCH
1277TR
1278UNAME
1279UNIQ
1280WC
1281WHICH
1282XARGS
1283AWK
1284GREP
1285EGREP
1286FGREP
1287SED
1288CYGPATH
1289READLINK
1290DF
1291CPIO
1292NICE
1293MAKE
1294UNZIP
1295ZIP
1296LDD
1297OTOOL
1298READELF
1299HG
1300STAT
1301TIME
1302DTRACE
1303PATCH
1304DSYMUTIL
1305XATTR
1306CODESIGN
1307SETFILE
1308PKG_CONFIG
1309JAVA
1310JAVAC
1311JAVAH
1312JAR
1313JARSIGNER
1314CC
1315CFLAGS
1316LDFLAGS
1317LIBS
1318CPPFLAGS
1319CXX
1320CXXFLAGS
1321CCC
1322CPP
1323CXXCPP
1324AS
1325AR
1326LIPO
1327STRIP
1328NM
1329GNM
1330OBJCOPY
1331OBJDUMP
1332BUILD_CC
1333BUILD_CXX
1334BUILD_NM
1335BUILD_AR
1336BUILD_OBJCOPY
1337BUILD_STRIP
1338JTREGEXE
1339XMKMF
1340FREETYPE_CFLAGS
1341FREETYPE_LIBS
1342ALSA_CFLAGS
1343ALSA_LIBS
1344LIBFFI_CFLAGS
1345LIBFFI_LIBS
1346PNG_CFLAGS
1347PNG_LIBS
1348LCMS_CFLAGS
1349LCMS_LIBS
1350ICECC_CMD
1351ICECC_CREATE_ENV
1352ICECC_WRAPPER
1353CCACHE'
1354
1355
1356# Initialize some variables set by options.
1357ac_init_help=
1358ac_init_version=false
1359ac_unrecognized_opts=
1360ac_unrecognized_sep=
1361# The variables have the same names as the options, with
1362# dashes changed to underlines.
1363cache_file=/dev/null
1364exec_prefix=NONE
1365no_create=
1366no_recursion=
1367prefix=NONE
1368program_prefix=NONE
1369program_suffix=NONE
1370program_transform_name=s,x,x,
1371silent=
1372site=
1373srcdir=
1374verbose=
1375x_includes=NONE
1376x_libraries=NONE
1377
1378# Installation directory options.
1379# These are left unexpanded so users can "make install exec_prefix=/foo"
1380# and all the variables that are supposed to be based on exec_prefix
1381# by default will actually change.
1382# Use braces instead of parens because sh, perl, etc. also accept them.
1383# (The list follows the same order as the GNU Coding Standards.)
1384bindir='${exec_prefix}/bin'
1385sbindir='${exec_prefix}/sbin'
1386libexecdir='${exec_prefix}/libexec'
1387datarootdir='${prefix}/share'
1388datadir='${datarootdir}'
1389sysconfdir='${prefix}/etc'
1390sharedstatedir='${prefix}/com'
1391localstatedir='${prefix}/var'
1392includedir='${prefix}/include'
1393oldincludedir='/usr/include'
1394docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1395infodir='${datarootdir}/info'
1396htmldir='${docdir}'
1397dvidir='${docdir}'
1398pdfdir='${docdir}'
1399psdir='${docdir}'
1400libdir='${exec_prefix}/lib'
1401localedir='${datarootdir}/locale'
1402mandir='${datarootdir}/man'
1403
1404ac_prev=
1405ac_dashdash=
1406for ac_option
1407do
1408  # If the previous option needs an argument, assign it.
1409  if test -n "$ac_prev"; then
1410    eval $ac_prev=\$ac_option
1411    ac_prev=
1412    continue
1413  fi
1414
1415  case $ac_option in
1416  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1417  *=)   ac_optarg= ;;
1418  *)    ac_optarg=yes ;;
1419  esac
1420
1421  # Accept the important Cygnus configure options, so we can diagnose typos.
1422
1423  case $ac_dashdash$ac_option in
1424  --)
1425    ac_dashdash=yes ;;
1426
1427  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1428    ac_prev=bindir ;;
1429  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1430    bindir=$ac_optarg ;;
1431
1432  -build | --build | --buil | --bui | --bu)
1433    ac_prev=build_alias ;;
1434  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1435    build_alias=$ac_optarg ;;
1436
1437  -cache-file | --cache-file | --cache-fil | --cache-fi \
1438  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1439    ac_prev=cache_file ;;
1440  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1441  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1442    cache_file=$ac_optarg ;;
1443
1444  --config-cache | -C)
1445    cache_file=config.cache ;;
1446
1447  -datadir | --datadir | --datadi | --datad)
1448    ac_prev=datadir ;;
1449  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1450    datadir=$ac_optarg ;;
1451
1452  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1453  | --dataroo | --dataro | --datar)
1454    ac_prev=datarootdir ;;
1455  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1456  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1457    datarootdir=$ac_optarg ;;
1458
1459  -disable-* | --disable-*)
1460    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1461    # Reject names that are not valid shell variable names.
1462    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1463      as_fn_error $? "invalid feature name: $ac_useropt"
1464    ac_useropt_orig=$ac_useropt
1465    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1466    case $ac_user_opts in
1467      *"
1468"enable_$ac_useropt"
1469"*) ;;
1470      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1471	 ac_unrecognized_sep=', ';;
1472    esac
1473    eval enable_$ac_useropt=no ;;
1474
1475  -docdir | --docdir | --docdi | --doc | --do)
1476    ac_prev=docdir ;;
1477  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1478    docdir=$ac_optarg ;;
1479
1480  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1481    ac_prev=dvidir ;;
1482  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1483    dvidir=$ac_optarg ;;
1484
1485  -enable-* | --enable-*)
1486    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1487    # Reject names that are not valid shell variable names.
1488    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1489      as_fn_error $? "invalid feature name: $ac_useropt"
1490    ac_useropt_orig=$ac_useropt
1491    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1492    case $ac_user_opts in
1493      *"
1494"enable_$ac_useropt"
1495"*) ;;
1496      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1497	 ac_unrecognized_sep=', ';;
1498    esac
1499    eval enable_$ac_useropt=\$ac_optarg ;;
1500
1501  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1502  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1503  | --exec | --exe | --ex)
1504    ac_prev=exec_prefix ;;
1505  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1506  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1507  | --exec=* | --exe=* | --ex=*)
1508    exec_prefix=$ac_optarg ;;
1509
1510  -gas | --gas | --ga | --g)
1511    # Obsolete; use --with-gas.
1512    with_gas=yes ;;
1513
1514  -help | --help | --hel | --he | -h)
1515    ac_init_help=long ;;
1516  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1517    ac_init_help=recursive ;;
1518  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1519    ac_init_help=short ;;
1520
1521  -host | --host | --hos | --ho)
1522    ac_prev=host_alias ;;
1523  -host=* | --host=* | --hos=* | --ho=*)
1524    host_alias=$ac_optarg ;;
1525
1526  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1527    ac_prev=htmldir ;;
1528  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1529  | --ht=*)
1530    htmldir=$ac_optarg ;;
1531
1532  -includedir | --includedir | --includedi | --included | --include \
1533  | --includ | --inclu | --incl | --inc)
1534    ac_prev=includedir ;;
1535  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1536  | --includ=* | --inclu=* | --incl=* | --inc=*)
1537    includedir=$ac_optarg ;;
1538
1539  -infodir | --infodir | --infodi | --infod | --info | --inf)
1540    ac_prev=infodir ;;
1541  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1542    infodir=$ac_optarg ;;
1543
1544  -libdir | --libdir | --libdi | --libd)
1545    ac_prev=libdir ;;
1546  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1547    libdir=$ac_optarg ;;
1548
1549  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1550  | --libexe | --libex | --libe)
1551    ac_prev=libexecdir ;;
1552  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1553  | --libexe=* | --libex=* | --libe=*)
1554    libexecdir=$ac_optarg ;;
1555
1556  -localedir | --localedir | --localedi | --localed | --locale)
1557    ac_prev=localedir ;;
1558  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1559    localedir=$ac_optarg ;;
1560
1561  -localstatedir | --localstatedir | --localstatedi | --localstated \
1562  | --localstate | --localstat | --localsta | --localst | --locals)
1563    ac_prev=localstatedir ;;
1564  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1565  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1566    localstatedir=$ac_optarg ;;
1567
1568  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1569    ac_prev=mandir ;;
1570  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1571    mandir=$ac_optarg ;;
1572
1573  -nfp | --nfp | --nf)
1574    # Obsolete; use --without-fp.
1575    with_fp=no ;;
1576
1577  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1578  | --no-cr | --no-c | -n)
1579    no_create=yes ;;
1580
1581  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1582  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1583    no_recursion=yes ;;
1584
1585  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1586  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1587  | --oldin | --oldi | --old | --ol | --o)
1588    ac_prev=oldincludedir ;;
1589  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1590  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1591  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1592    oldincludedir=$ac_optarg ;;
1593
1594  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1595    ac_prev=prefix ;;
1596  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1597    prefix=$ac_optarg ;;
1598
1599  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1600  | --program-pre | --program-pr | --program-p)
1601    ac_prev=program_prefix ;;
1602  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1603  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1604    program_prefix=$ac_optarg ;;
1605
1606  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1607  | --program-suf | --program-su | --program-s)
1608    ac_prev=program_suffix ;;
1609  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1610  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1611    program_suffix=$ac_optarg ;;
1612
1613  -program-transform-name | --program-transform-name \
1614  | --program-transform-nam | --program-transform-na \
1615  | --program-transform-n | --program-transform- \
1616  | --program-transform | --program-transfor \
1617  | --program-transfo | --program-transf \
1618  | --program-trans | --program-tran \
1619  | --progr-tra | --program-tr | --program-t)
1620    ac_prev=program_transform_name ;;
1621  -program-transform-name=* | --program-transform-name=* \
1622  | --program-transform-nam=* | --program-transform-na=* \
1623  | --program-transform-n=* | --program-transform-=* \
1624  | --program-transform=* | --program-transfor=* \
1625  | --program-transfo=* | --program-transf=* \
1626  | --program-trans=* | --program-tran=* \
1627  | --progr-tra=* | --program-tr=* | --program-t=*)
1628    program_transform_name=$ac_optarg ;;
1629
1630  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1631    ac_prev=pdfdir ;;
1632  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1633    pdfdir=$ac_optarg ;;
1634
1635  -psdir | --psdir | --psdi | --psd | --ps)
1636    ac_prev=psdir ;;
1637  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1638    psdir=$ac_optarg ;;
1639
1640  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1641  | -silent | --silent | --silen | --sile | --sil)
1642    silent=yes ;;
1643
1644  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1645    ac_prev=sbindir ;;
1646  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1647  | --sbi=* | --sb=*)
1648    sbindir=$ac_optarg ;;
1649
1650  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1651  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1652  | --sharedst | --shareds | --shared | --share | --shar \
1653  | --sha | --sh)
1654    ac_prev=sharedstatedir ;;
1655  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1656  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1657  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1658  | --sha=* | --sh=*)
1659    sharedstatedir=$ac_optarg ;;
1660
1661  -site | --site | --sit)
1662    ac_prev=site ;;
1663  -site=* | --site=* | --sit=*)
1664    site=$ac_optarg ;;
1665
1666  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1667    ac_prev=srcdir ;;
1668  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1669    srcdir=$ac_optarg ;;
1670
1671  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1672  | --syscon | --sysco | --sysc | --sys | --sy)
1673    ac_prev=sysconfdir ;;
1674  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1675  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1676    sysconfdir=$ac_optarg ;;
1677
1678  -target | --target | --targe | --targ | --tar | --ta | --t)
1679    ac_prev=target_alias ;;
1680  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1681    target_alias=$ac_optarg ;;
1682
1683  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1684    verbose=yes ;;
1685
1686  -version | --version | --versio | --versi | --vers | -V)
1687    ac_init_version=: ;;
1688
1689  -with-* | --with-*)
1690    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1691    # Reject names that are not valid shell variable names.
1692    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1693      as_fn_error $? "invalid package name: $ac_useropt"
1694    ac_useropt_orig=$ac_useropt
1695    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1696    case $ac_user_opts in
1697      *"
1698"with_$ac_useropt"
1699"*) ;;
1700      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1701	 ac_unrecognized_sep=', ';;
1702    esac
1703    eval with_$ac_useropt=\$ac_optarg ;;
1704
1705  -without-* | --without-*)
1706    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1707    # Reject names that are not valid shell variable names.
1708    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1709      as_fn_error $? "invalid package name: $ac_useropt"
1710    ac_useropt_orig=$ac_useropt
1711    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1712    case $ac_user_opts in
1713      *"
1714"with_$ac_useropt"
1715"*) ;;
1716      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1717	 ac_unrecognized_sep=', ';;
1718    esac
1719    eval with_$ac_useropt=no ;;
1720
1721  --x)
1722    # Obsolete; use --with-x.
1723    with_x=yes ;;
1724
1725  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1726  | --x-incl | --x-inc | --x-in | --x-i)
1727    ac_prev=x_includes ;;
1728  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1729  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1730    x_includes=$ac_optarg ;;
1731
1732  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1733  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1734    ac_prev=x_libraries ;;
1735  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1736  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1737    x_libraries=$ac_optarg ;;
1738
1739  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1740Try \`$0 --help' for more information"
1741    ;;
1742
1743  *=*)
1744    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1745    # Reject names that are not valid shell variable names.
1746    case $ac_envvar in #(
1747      '' | [0-9]* | *[!_$as_cr_alnum]* )
1748      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1749    esac
1750    eval $ac_envvar=\$ac_optarg
1751    export $ac_envvar ;;
1752
1753  *)
1754    # FIXME: should be removed in autoconf 3.0.
1755    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1756    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1757      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1758    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1759    ;;
1760
1761  esac
1762done
1763
1764if test -n "$ac_prev"; then
1765  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1766  as_fn_error $? "missing argument to $ac_option"
1767fi
1768
1769if test -n "$ac_unrecognized_opts"; then
1770  case $enable_option_checking in
1771    no) ;;
1772    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1773    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1774  esac
1775fi
1776
1777# Check all directory arguments for consistency.
1778for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1779		datadir sysconfdir sharedstatedir localstatedir includedir \
1780		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1781		libdir localedir mandir
1782do
1783  eval ac_val=\$$ac_var
1784  # Remove trailing slashes.
1785  case $ac_val in
1786    */ )
1787      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1788      eval $ac_var=\$ac_val;;
1789  esac
1790  # Be sure to have absolute directory names.
1791  case $ac_val in
1792    [\\/$]* | ?:[\\/]* )  continue;;
1793    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1794  esac
1795  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1796done
1797
1798# There might be people who depend on the old broken behavior: `$host'
1799# used to hold the argument of --host etc.
1800# FIXME: To remove some day.
1801build=$build_alias
1802host=$host_alias
1803target=$target_alias
1804
1805# FIXME: To remove some day.
1806if test "x$host_alias" != x; then
1807  if test "x$build_alias" = x; then
1808    cross_compiling=maybe
1809  elif test "x$build_alias" != "x$host_alias"; then
1810    cross_compiling=yes
1811  fi
1812fi
1813
1814ac_tool_prefix=
1815test -n "$host_alias" && ac_tool_prefix=$host_alias-
1816
1817test "$silent" = yes && exec 6>/dev/null
1818
1819
1820ac_pwd=`pwd` && test -n "$ac_pwd" &&
1821ac_ls_di=`ls -di .` &&
1822ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1823  as_fn_error $? "working directory cannot be determined"
1824test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1825  as_fn_error $? "pwd does not report name of working directory"
1826
1827
1828# Find the source files, if location was not specified.
1829if test -z "$srcdir"; then
1830  ac_srcdir_defaulted=yes
1831  # Try the directory containing this script, then the parent directory.
1832  ac_confdir=`$as_dirname -- "$as_myself" ||
1833$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1834	 X"$as_myself" : 'X\(//\)[^/]' \| \
1835	 X"$as_myself" : 'X\(//\)$' \| \
1836	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1837$as_echo X"$as_myself" |
1838    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1839	    s//\1/
1840	    q
1841	  }
1842	  /^X\(\/\/\)[^/].*/{
1843	    s//\1/
1844	    q
1845	  }
1846	  /^X\(\/\/\)$/{
1847	    s//\1/
1848	    q
1849	  }
1850	  /^X\(\/\).*/{
1851	    s//\1/
1852	    q
1853	  }
1854	  s/.*/./; q'`
1855  srcdir=$ac_confdir
1856  if test ! -r "$srcdir/$ac_unique_file"; then
1857    srcdir=..
1858  fi
1859else
1860  ac_srcdir_defaulted=no
1861fi
1862if test ! -r "$srcdir/$ac_unique_file"; then
1863  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1864  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1865fi
1866ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1867ac_abs_confdir=`(
1868	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1869	pwd)`
1870# When building in place, set srcdir=.
1871if test "$ac_abs_confdir" = "$ac_pwd"; then
1872  srcdir=.
1873fi
1874# Remove unnecessary trailing slashes from srcdir.
1875# Double slashes in file names in object file debugging info
1876# mess up M-x gdb in Emacs.
1877case $srcdir in
1878*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1879esac
1880for ac_var in $ac_precious_vars; do
1881  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1882  eval ac_env_${ac_var}_value=\$${ac_var}
1883  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1884  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1885done
1886
1887#
1888# Report the --help message.
1889#
1890if test "$ac_init_help" = "long"; then
1891  # Omit some internal or obsolete options to make the list less imposing.
1892  # This message is too long to be a string in the A/UX 3.1 sh.
1893  cat <<_ACEOF
1894\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1895
1896Usage: $0 [OPTION]... [VAR=VALUE]...
1897
1898To assign environment variables (e.g., CC, CFLAGS...), specify them as
1899VAR=VALUE.  See below for descriptions of some of the useful variables.
1900
1901Defaults for the options are specified in brackets.
1902
1903Configuration:
1904  -h, --help              display this help and exit
1905      --help=short        display options specific to this package
1906      --help=recursive    display the short help of all the included packages
1907  -V, --version           display version information and exit
1908  -q, --quiet, --silent   do not print \`checking ...' messages
1909      --cache-file=FILE   cache test results in FILE [disabled]
1910  -C, --config-cache      alias for \`--cache-file=config.cache'
1911  -n, --no-create         do not create output files
1912      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1913
1914Installation directories:
1915  --prefix=PREFIX         install architecture-independent files in PREFIX
1916                          [$ac_default_prefix]
1917  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1918                          [PREFIX]
1919
1920By default, \`make install' will install all the files in
1921\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1922an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1923for instance \`--prefix=\$HOME'.
1924
1925For better control, use the options below.
1926
1927Fine tuning of the installation directories:
1928  --bindir=DIR            user executables [EPREFIX/bin]
1929  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1930  --libexecdir=DIR        program executables [EPREFIX/libexec]
1931  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1932  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1933  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1934  --libdir=DIR            object code libraries [EPREFIX/lib]
1935  --includedir=DIR        C header files [PREFIX/include]
1936  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1937  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1938  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1939  --infodir=DIR           info documentation [DATAROOTDIR/info]
1940  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1941  --mandir=DIR            man documentation [DATAROOTDIR/man]
1942  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1943  --htmldir=DIR           html documentation [DOCDIR]
1944  --dvidir=DIR            dvi documentation [DOCDIR]
1945  --pdfdir=DIR            pdf documentation [DOCDIR]
1946  --psdir=DIR             ps documentation [DOCDIR]
1947_ACEOF
1948
1949  cat <<\_ACEOF
1950
1951X features:
1952  --x-includes=DIR    X include files are in DIR
1953  --x-libraries=DIR   X library files are in DIR
1954
1955System types:
1956  --build=BUILD     configure for building on BUILD [guessed]
1957  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1958  --target=TARGET   configure for building compilers for TARGET [HOST]
1959_ACEOF
1960fi
1961
1962if test -n "$ac_init_help"; then
1963  case $ac_init_help in
1964     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1965   esac
1966  cat <<\_ACEOF
1967
1968Optional Features:
1969  --disable-option-checking  ignore unrecognized --enable/--with options
1970  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1971  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1972  --enable-openjdk-only   suppress building custom source even if present
1973                          [disabled]
1974  --enable-debug          set the debug level to fastdebug (shorthand for
1975                          --with-debug-level=fastdebug) [disabled]
1976  --disable-headful       disable building headful support (graphical UI
1977                          support) [enabled]
1978  --enable-unlimited-crypto
1979                          Enable unlimited crypto policy [disabled]
1980  --disable-keep-packaged-modules
1981                          Do not keep packaged modules in jdk image [enable]
1982  --enable-static-build   enable static library build [disabled]
1983  --disable-warnings-as-errors
1984                          do not consider native warnings to be an error
1985                          [enabled]
1986  --enable-debug-symbols  Deprecated. Option is kept for backwards
1987                          compatibility and is ignored
1988  --enable-zip-debug-info Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --enable-native-coverage
1991                          enable native compilation with code coverage
1992                          data[disabled]
1993  --enable-dtrace[=yes/no/auto]
1994                          enable dtrace. Default is auto, where dtrace is
1995                          enabled if all dependencies are present.
1996  --disable-freetype-bundling
1997                          disable bundling of the freetype library with the
1998                          build result [enabled on Windows or when using
1999                          --with-freetype, disabled otherwise]
2000  --disable-new-hotspot-build
2001                          disable the new hotspot build system (use the old)
2002                          [enabled]
2003  --enable-hotspot-test-in-build
2004                          run the Queens test after Hotspot build [disabled]
2005  --enable-jtreg-failure-handler
2006                          forces build of the jtreg failure handler to be
2007                          enabled, missing dependencies become fatal errors.
2008                          Default is auto, where the failure handler is built
2009                          if all dependencies are present and otherwise just
2010                          disabled.
2011  --enable-sjavac         use sjavac to do fast incremental compiles
2012                          [disabled]
2013  --disable-javac-server  disable javac server [enabled]
2014  --enable-icecc          enable distribted compilation of native code using
2015                          icecc/icecream [disabled]
2016  --disable-precompiled-headers
2017                          disable using precompiled headers when compiling C++
2018                          [enabled]
2019  --enable-ccache         enable using ccache to speed up recompilations
2020                          [disabled]
2021
2022Optional Packages:
2023  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2024  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2025  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2026                          support it), e.g. --with-target-bits=32 [guessed]
2027  --with-custom-make-dir  Deprecated. Option is kept for backwards
2028                          compatibility and is ignored
2029  --with-jdk-variant      JDK variant to build (normal) [normal]
2030  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2031                          optimized) [release]
2032  --with-jvm-variants     JVM variants (separated by commas) to build
2033                          (server,client,minimal,core,zero,zeroshark,custom)
2034                          [server]
2035  --with-devkit           use this devkit for compilers, tools and resources
2036  --with-sys-root         alias for --with-sysroot for backwards compatability
2037  --with-sysroot          use this directory as sysroot
2038  --with-tools-dir        alias for --with-toolchain-path for backwards
2039                          compatibility
2040  --with-toolchain-path   prepend these directories when searching for
2041                          toolchain binaries (compilers etc)
2042  --with-extra-path       prepend these directories to the default path
2043  --with-sdk-name         use the platform SDK of the given name. [macosx]
2044  --with-conf-name        use this as the name of the configuration [generated
2045                          from important configuration options]
2046  --with-output-sync      set make output sync type if supported by make.
2047                          [recurse]
2048  --with-default-make-target
2049                          set the default make target [exploded-image]
2050  --with-cacerts-file     specify alternative cacerts file
2051  --with-copyright-year   Set copyright year value for build [current year]
2052  --with-milestone        Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-update-version   Deprecated. Option is kept for backwards
2055                          compatibility and is ignored
2056  --with-user-release-suffix
2057                          Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-build-number     Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-version-string   Set version string [calculated]
2062  --with-version-pre      Set the base part of the version 'PRE' field
2063                          (pre-release identifier) ['internal']
2064  --with-version-opt      Set version 'OPT' field (build metadata)
2065                          [<timestamp>.<user>.<dirname>]
2066  --with-version-build    Set version 'BUILD' field (build number) [not
2067                          specified]
2068  --with-version-major    Set version 'MAJOR' field (first number) [current
2069                          source value]
2070  --with-version-minor    Set version 'MINOR' field (second number) [current
2071                          source value]
2072  --with-version-security Set version 'SECURITY' field (third number) [current
2073                          source value]
2074  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2075                          specified]
2076  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2077  --with-build-jdk        path to JDK of same version as is being built[the
2078                          newly built JDK]
2079  --with-add-source-root  Deprecated. Option is kept for backwards
2080                          compatibility and is ignored
2081  --with-override-source-root
2082                          Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-adds-and-overrides
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-override-langtools
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-corba   Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jaxp    Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-jaxws   Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-hotspot Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-nashorn Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-override-jdk     Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-import-hotspot   import hotspot binaries from this jdk image or
2103                          hotspot build dist dir instead of building from
2104                          source
2105  --with-import-modules   import a set of prebuilt modules either as a zip
2106                          file or an exploded directory
2107  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2108                          to show possible values [platform dependent]
2109  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2110  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2111  --with-extra-ldflags    extra flags to be used when linking jdk
2112  --with-toolchain-version
2113                          the version of the toolchain to look for, use
2114                          '--help' to show possible values [platform
2115                          dependent]
2116  --with-build-devkit     Devkit to use for the build platform toolchain
2117  --with-jtreg            Regression Test Harness [probed]
2118  --with-native-debug-symbols
2119                          set the native debug symbol configuration (none,
2120                          internal, external, zipped) [varying]
2121  --with-jvm-features     additional JVM features to enable (separated by
2122                          comma), use '--help' to show possible values [none]
2123  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2124                          compatibility and is ignored
2125  --with-stdc++lib=<static>,<dynamic>,<default>
2126                          force linking of the C++ runtime on Linux to either
2127                          static or dynamic, default is static with dynamic as
2128                          fallback
2129  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2130                          (Windows only) [probed]
2131  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2132                          (Windows only) [probed]
2133  --with-x                use the X Window System
2134  --with-cups             specify prefix directory for the cups package
2135                          (expecting the headers under PATH/include)
2136  --with-cups-include     specify directory for the cups include files
2137  --with-freetype         specify prefix directory for the freetype package
2138                          (expecting the libraries under PATH/lib and the
2139                          headers under PATH/include)
2140  --with-freetype-include specify directory for the freetype include files
2141  --with-freetype-lib     specify directory for the freetype library
2142  --with-freetype-src     specify directory with freetype sources to
2143                          automatically build the library (experimental,
2144                          Windows-only)
2145  --with-alsa             specify prefix directory for the alsa package
2146                          (expecting the libraries under PATH/lib and the
2147                          headers under PATH/include)
2148  --with-alsa-include     specify directory for the alsa include files
2149  --with-alsa-lib         specify directory for the alsa library
2150  --with-libffi           specify prefix directory for the libffi package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-libffi-include   specify directory for the libffi include files
2154  --with-libffi-lib       specify directory for the libffi library
2155  --with-libjpeg          use libjpeg from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-giflib           use giflib from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-libpng           use libpng from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-zlib             use zlib from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-lcms             use lcms2 from build system or OpenJDK source
2164                          (system, bundled) [bundled]
2165  --with-dxsdk            Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-dxsdk-include    Deprecated. Option is kept for backwards
2170                          compatibility and is ignored
2171  --with-num-cores        number of cores in the build system, e.g.
2172                          --with-num-cores=8 [probed]
2173  --with-memory-size      memory (in MB) available in the build system, e.g.
2174                          --with-memory-size=1024 [probed]
2175  --with-jobs             number of parallel jobs to let make run [calculated
2176                          based on cores and memory]
2177  --with-test-jobs        number of parallel tests jobs to run [based on build
2178                          jobs]
2179  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2180                          invocations of boot JDK, overriding the default
2181                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2182                          -enableassertions"
2183  --with-sjavac-server-java
2184                          use this java binary for running the sjavac
2185                          background server [Boot JDK java]
2186  --with-ccache-dir       where to store ccache files [~/.ccache]
2187
2188Some influential environment variables:
2189  BASENAME    Override default value for BASENAME
2190  BASH        Override default value for BASH
2191  CAT         Override default value for CAT
2192  CHMOD       Override default value for CHMOD
2193  CMP         Override default value for CMP
2194  COMM        Override default value for COMM
2195  CP          Override default value for CP
2196  CUT         Override default value for CUT
2197  DATE        Override default value for DATE
2198  DIFF        Override default value for DIFF
2199  DIRNAME     Override default value for DIRNAME
2200  ECHO        Override default value for ECHO
2201  EXPR        Override default value for EXPR
2202  FILE        Override default value for FILE
2203  FIND        Override default value for FIND
2204  HEAD        Override default value for HEAD
2205  LN          Override default value for LN
2206  LS          Override default value for LS
2207  MKDIR       Override default value for MKDIR
2208  MKTEMP      Override default value for MKTEMP
2209  MV          Override default value for MV
2210  NAWK        Override default value for NAWK
2211  PRINTF      Override default value for PRINTF
2212  RM          Override default value for RM
2213  RMDIR       Override default value for RMDIR
2214  SH          Override default value for SH
2215  SORT        Override default value for SORT
2216  TAIL        Override default value for TAIL
2217  TAR         Override default value for TAR
2218  TEE         Override default value for TEE
2219  TOUCH       Override default value for TOUCH
2220  TR          Override default value for TR
2221  UNAME       Override default value for UNAME
2222  UNIQ        Override default value for UNIQ
2223  WC          Override default value for WC
2224  WHICH       Override default value for WHICH
2225  XARGS       Override default value for XARGS
2226  AWK         Override default value for AWK
2227  GREP        Override default value for GREP
2228  EGREP       Override default value for EGREP
2229  FGREP       Override default value for FGREP
2230  SED         Override default value for SED
2231  CYGPATH     Override default value for CYGPATH
2232  READLINK    Override default value for READLINK
2233  DF          Override default value for DF
2234  CPIO        Override default value for CPIO
2235  NICE        Override default value for NICE
2236  MAKE        Override default value for MAKE
2237  UNZIP       Override default value for UNZIP
2238  ZIP         Override default value for ZIP
2239  LDD         Override default value for LDD
2240  OTOOL       Override default value for OTOOL
2241  READELF     Override default value for READELF
2242  HG          Override default value for HG
2243  STAT        Override default value for STAT
2244  TIME        Override default value for TIME
2245  DTRACE      Override default value for DTRACE
2246  PATCH       Override default value for PATCH
2247  DSYMUTIL    Override default value for DSYMUTIL
2248  XATTR       Override default value for XATTR
2249  CODESIGN    Override default value for CODESIGN
2250  SETFILE     Override default value for SETFILE
2251  PKG_CONFIG  path to pkg-config utility
2252  JAVA        Override default value for JAVA
2253  JAVAC       Override default value for JAVAC
2254  JAVAH       Override default value for JAVAH
2255  JAR         Override default value for JAR
2256  JARSIGNER   Override default value for JARSIGNER
2257  CC          C compiler command
2258  CFLAGS      C compiler flags
2259  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2260              nonstandard directory <lib dir>
2261  LIBS        libraries to pass to the linker, e.g. -l<library>
2262  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2263              you have headers in a nonstandard directory <include dir>
2264  CXX         C++ compiler command
2265  CXXFLAGS    C++ compiler flags
2266  CPP         C preprocessor
2267  CXXCPP      C++ preprocessor
2268  AS          Override default value for AS
2269  AR          Override default value for AR
2270  LIPO        Override default value for LIPO
2271  STRIP       Override default value for STRIP
2272  NM          Override default value for NM
2273  GNM         Override default value for GNM
2274  OBJCOPY     Override default value for OBJCOPY
2275  OBJDUMP     Override default value for OBJDUMP
2276  BUILD_CC    Override default value for BUILD_CC
2277  BUILD_CXX   Override default value for BUILD_CXX
2278  BUILD_NM    Override default value for BUILD_NM
2279  BUILD_AR    Override default value for BUILD_AR
2280  BUILD_OBJCOPY
2281              Override default value for BUILD_OBJCOPY
2282  BUILD_STRIP Override default value for BUILD_STRIP
2283  JTREGEXE    Override default value for JTREGEXE
2284  XMKMF       Path to xmkmf, Makefile generator for X Window System
2285  FREETYPE_CFLAGS
2286              C compiler flags for FREETYPE, overriding pkg-config
2287  FREETYPE_LIBS
2288              linker flags for FREETYPE, overriding pkg-config
2289  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2290  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2291  LIBFFI_CFLAGS
2292              C compiler flags for LIBFFI, overriding pkg-config
2293  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2294  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2295  PNG_LIBS    linker flags for PNG, overriding pkg-config
2296  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2297  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2298  ICECC_CMD   Override default value for ICECC_CMD
2299  ICECC_CREATE_ENV
2300              Override default value for ICECC_CREATE_ENV
2301  ICECC_WRAPPER
2302              Override default value for ICECC_WRAPPER
2303  CCACHE      Override default value for CCACHE
2304
2305Use these variables to override the choices made by `configure' or to help
2306it to find libraries and programs with nonstandard names/locations.
2307
2308Report bugs to <build-dev@openjdk.java.net>.
2309OpenJDK home page: <http://openjdk.java.net>.
2310_ACEOF
2311ac_status=$?
2312fi
2313
2314if test "$ac_init_help" = "recursive"; then
2315  # If there are subdirs, report their specific --help.
2316  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2317    test -d "$ac_dir" ||
2318      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2319      continue
2320    ac_builddir=.
2321
2322case "$ac_dir" in
2323.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2324*)
2325  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2326  # A ".." for each directory in $ac_dir_suffix.
2327  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2328  case $ac_top_builddir_sub in
2329  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2330  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2331  esac ;;
2332esac
2333ac_abs_top_builddir=$ac_pwd
2334ac_abs_builddir=$ac_pwd$ac_dir_suffix
2335# for backward compatibility:
2336ac_top_builddir=$ac_top_build_prefix
2337
2338case $srcdir in
2339  .)  # We are building in place.
2340    ac_srcdir=.
2341    ac_top_srcdir=$ac_top_builddir_sub
2342    ac_abs_top_srcdir=$ac_pwd ;;
2343  [\\/]* | ?:[\\/]* )  # Absolute name.
2344    ac_srcdir=$srcdir$ac_dir_suffix;
2345    ac_top_srcdir=$srcdir
2346    ac_abs_top_srcdir=$srcdir ;;
2347  *) # Relative name.
2348    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2349    ac_top_srcdir=$ac_top_build_prefix$srcdir
2350    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2351esac
2352ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2353
2354    cd "$ac_dir" || { ac_status=$?; continue; }
2355    # Check for guested configure.
2356    if test -f "$ac_srcdir/configure.gnu"; then
2357      echo &&
2358      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2359    elif test -f "$ac_srcdir/configure"; then
2360      echo &&
2361      $SHELL "$ac_srcdir/configure" --help=recursive
2362    else
2363      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2364    fi || ac_status=$?
2365    cd "$ac_pwd" || { ac_status=$?; break; }
2366  done
2367fi
2368
2369test -n "$ac_init_help" && exit $ac_status
2370if $ac_init_version; then
2371  cat <<\_ACEOF
2372OpenJDK configure jdk9
2373generated by GNU Autoconf 2.69
2374
2375Copyright (C) 2012 Free Software Foundation, Inc.
2376This configure script is free software; the Free Software Foundation
2377gives unlimited permission to copy, distribute and modify it.
2378_ACEOF
2379  exit
2380fi
2381
2382## ------------------------ ##
2383## Autoconf initialization. ##
2384## ------------------------ ##
2385
2386# ac_fn_c_try_compile LINENO
2387# --------------------------
2388# Try to compile conftest.$ac_ext, and return whether this succeeded.
2389ac_fn_c_try_compile ()
2390{
2391  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392  rm -f conftest.$ac_objext
2393  if { { ac_try="$ac_compile"
2394case "(($ac_try" in
2395  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2396  *) ac_try_echo=$ac_try;;
2397esac
2398eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2399$as_echo "$ac_try_echo"; } >&5
2400  (eval "$ac_compile") 2>conftest.err
2401  ac_status=$?
2402  if test -s conftest.err; then
2403    grep -v '^ *+' conftest.err >conftest.er1
2404    cat conftest.er1 >&5
2405    mv -f conftest.er1 conftest.err
2406  fi
2407  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2408  test $ac_status = 0; } && {
2409	 test -z "$ac_c_werror_flag" ||
2410	 test ! -s conftest.err
2411       } && test -s conftest.$ac_objext; then :
2412  ac_retval=0
2413else
2414  $as_echo "$as_me: failed program was:" >&5
2415sed 's/^/| /' conftest.$ac_ext >&5
2416
2417	ac_retval=1
2418fi
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_compile
2423
2424# ac_fn_cxx_try_compile LINENO
2425# ----------------------------
2426# Try to compile conftest.$ac_ext, and return whether this succeeded.
2427ac_fn_cxx_try_compile ()
2428{
2429  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2430  rm -f conftest.$ac_objext
2431  if { { ac_try="$ac_compile"
2432case "(($ac_try" in
2433  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2434  *) ac_try_echo=$ac_try;;
2435esac
2436eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2437$as_echo "$ac_try_echo"; } >&5
2438  (eval "$ac_compile") 2>conftest.err
2439  ac_status=$?
2440  if test -s conftest.err; then
2441    grep -v '^ *+' conftest.err >conftest.er1
2442    cat conftest.er1 >&5
2443    mv -f conftest.er1 conftest.err
2444  fi
2445  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2446  test $ac_status = 0; } && {
2447	 test -z "$ac_cxx_werror_flag" ||
2448	 test ! -s conftest.err
2449       } && test -s conftest.$ac_objext; then :
2450  ac_retval=0
2451else
2452  $as_echo "$as_me: failed program was:" >&5
2453sed 's/^/| /' conftest.$ac_ext >&5
2454
2455	ac_retval=1
2456fi
2457  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458  as_fn_set_status $ac_retval
2459
2460} # ac_fn_cxx_try_compile
2461
2462# ac_fn_c_try_cpp LINENO
2463# ----------------------
2464# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2465ac_fn_c_try_cpp ()
2466{
2467  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468  if { { ac_try="$ac_cpp conftest.$ac_ext"
2469case "(($ac_try" in
2470  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2471  *) ac_try_echo=$ac_try;;
2472esac
2473eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2474$as_echo "$ac_try_echo"; } >&5
2475  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2476  ac_status=$?
2477  if test -s conftest.err; then
2478    grep -v '^ *+' conftest.err >conftest.er1
2479    cat conftest.er1 >&5
2480    mv -f conftest.er1 conftest.err
2481  fi
2482  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2483  test $ac_status = 0; } > conftest.i && {
2484	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2485	 test ! -s conftest.err
2486       }; then :
2487  ac_retval=0
2488else
2489  $as_echo "$as_me: failed program was:" >&5
2490sed 's/^/| /' conftest.$ac_ext >&5
2491
2492    ac_retval=1
2493fi
2494  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2495  as_fn_set_status $ac_retval
2496
2497} # ac_fn_c_try_cpp
2498
2499# ac_fn_cxx_try_cpp LINENO
2500# ------------------------
2501# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2502ac_fn_cxx_try_cpp ()
2503{
2504  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2505  if { { ac_try="$ac_cpp conftest.$ac_ext"
2506case "(($ac_try" in
2507  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2508  *) ac_try_echo=$ac_try;;
2509esac
2510eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2511$as_echo "$ac_try_echo"; } >&5
2512  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2513  ac_status=$?
2514  if test -s conftest.err; then
2515    grep -v '^ *+' conftest.err >conftest.er1
2516    cat conftest.er1 >&5
2517    mv -f conftest.er1 conftest.err
2518  fi
2519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520  test $ac_status = 0; } > conftest.i && {
2521	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2522	 test ! -s conftest.err
2523       }; then :
2524  ac_retval=0
2525else
2526  $as_echo "$as_me: failed program was:" >&5
2527sed 's/^/| /' conftest.$ac_ext >&5
2528
2529    ac_retval=1
2530fi
2531  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2532  as_fn_set_status $ac_retval
2533
2534} # ac_fn_cxx_try_cpp
2535
2536# ac_fn_c_try_link LINENO
2537# -----------------------
2538# Try to link conftest.$ac_ext, and return whether this succeeded.
2539ac_fn_c_try_link ()
2540{
2541  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542  rm -f conftest.$ac_objext conftest$ac_exeext
2543  if { { ac_try="$ac_link"
2544case "(($ac_try" in
2545  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2546  *) ac_try_echo=$ac_try;;
2547esac
2548eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2549$as_echo "$ac_try_echo"; } >&5
2550  (eval "$ac_link") 2>conftest.err
2551  ac_status=$?
2552  if test -s conftest.err; then
2553    grep -v '^ *+' conftest.err >conftest.er1
2554    cat conftest.er1 >&5
2555    mv -f conftest.er1 conftest.err
2556  fi
2557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2558  test $ac_status = 0; } && {
2559	 test -z "$ac_c_werror_flag" ||
2560	 test ! -s conftest.err
2561       } && test -s conftest$ac_exeext && {
2562	 test "$cross_compiling" = yes ||
2563	 test -x conftest$ac_exeext
2564       }; then :
2565  ac_retval=0
2566else
2567  $as_echo "$as_me: failed program was:" >&5
2568sed 's/^/| /' conftest.$ac_ext >&5
2569
2570	ac_retval=1
2571fi
2572  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2573  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2574  # interfere with the next link command; also delete a directory that is
2575  # left behind by Apple's compiler.  We do this before executing the actions.
2576  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2577  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2578  as_fn_set_status $ac_retval
2579
2580} # ac_fn_c_try_link
2581
2582# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2583# ---------------------------------------------------------
2584# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2585# the include files in INCLUDES and setting the cache variable VAR
2586# accordingly.
2587ac_fn_cxx_check_header_mongrel ()
2588{
2589  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2590  if eval \${$3+:} false; then :
2591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2592$as_echo_n "checking for $2... " >&6; }
2593if eval \${$3+:} false; then :
2594  $as_echo_n "(cached) " >&6
2595fi
2596eval ac_res=\$$3
2597	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2598$as_echo "$ac_res" >&6; }
2599else
2600  # Is the header compilable?
2601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2602$as_echo_n "checking $2 usability... " >&6; }
2603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606#include <$2>
2607_ACEOF
2608if ac_fn_cxx_try_compile "$LINENO"; then :
2609  ac_header_compiler=yes
2610else
2611  ac_header_compiler=no
2612fi
2613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2615$as_echo "$ac_header_compiler" >&6; }
2616
2617# Is the header present?
2618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2619$as_echo_n "checking $2 presence... " >&6; }
2620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622#include <$2>
2623_ACEOF
2624if ac_fn_cxx_try_cpp "$LINENO"; then :
2625  ac_header_preproc=yes
2626else
2627  ac_header_preproc=no
2628fi
2629rm -f conftest.err conftest.i conftest.$ac_ext
2630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2631$as_echo "$ac_header_preproc" >&6; }
2632
2633# So?  What about this header?
2634case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2635  yes:no: )
2636    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2637$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2638    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2639$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2640    ;;
2641  no:yes:* )
2642    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2643$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2644    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2645$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2647$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2648    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2649$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2650    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2651$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2652( $as_echo "## ----------------------------------------- ##
2653## Report this to build-dev@openjdk.java.net ##
2654## ----------------------------------------- ##"
2655     ) | sed "s/^/$as_me: WARNING:     /" >&2
2656    ;;
2657esac
2658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2659$as_echo_n "checking for $2... " >&6; }
2660if eval \${$3+:} false; then :
2661  $as_echo_n "(cached) " >&6
2662else
2663  eval "$3=\$ac_header_compiler"
2664fi
2665eval ac_res=\$$3
2666	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2667$as_echo "$ac_res" >&6; }
2668fi
2669  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2670
2671} # ac_fn_cxx_check_header_mongrel
2672
2673# ac_fn_cxx_try_run LINENO
2674# ------------------------
2675# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2676# that executables *can* be run.
2677ac_fn_cxx_try_run ()
2678{
2679  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2680  if { { ac_try="$ac_link"
2681case "(($ac_try" in
2682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2683  *) ac_try_echo=$ac_try;;
2684esac
2685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2686$as_echo "$ac_try_echo"; } >&5
2687  (eval "$ac_link") 2>&5
2688  ac_status=$?
2689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2690  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2691  { { case "(($ac_try" in
2692  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2693  *) ac_try_echo=$ac_try;;
2694esac
2695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2696$as_echo "$ac_try_echo"; } >&5
2697  (eval "$ac_try") 2>&5
2698  ac_status=$?
2699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2700  test $ac_status = 0; }; }; then :
2701  ac_retval=0
2702else
2703  $as_echo "$as_me: program exited with status $ac_status" >&5
2704       $as_echo "$as_me: failed program was:" >&5
2705sed 's/^/| /' conftest.$ac_ext >&5
2706
2707       ac_retval=$ac_status
2708fi
2709  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2710  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2711  as_fn_set_status $ac_retval
2712
2713} # ac_fn_cxx_try_run
2714
2715# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2716# ---------------------------------------------------------
2717# Tests whether HEADER exists and can be compiled using the include files in
2718# INCLUDES, setting the cache variable VAR accordingly.
2719ac_fn_cxx_check_header_compile ()
2720{
2721  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2723$as_echo_n "checking for $2... " >&6; }
2724if eval \${$3+:} false; then :
2725  $as_echo_n "(cached) " >&6
2726else
2727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2728/* end confdefs.h.  */
2729$4
2730#include <$2>
2731_ACEOF
2732if ac_fn_cxx_try_compile "$LINENO"; then :
2733  eval "$3=yes"
2734else
2735  eval "$3=no"
2736fi
2737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2738fi
2739eval ac_res=\$$3
2740	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2741$as_echo "$ac_res" >&6; }
2742  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2743
2744} # ac_fn_cxx_check_header_compile
2745
2746# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2747# ----------------------------------------------
2748# Tries to find the compile-time value of EXPR in a program that includes
2749# INCLUDES, setting VAR accordingly. Returns whether the value could be
2750# computed
2751ac_fn_cxx_compute_int ()
2752{
2753  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2754  if test "$cross_compiling" = yes; then
2755    # Depending upon the size, compute the lo and hi bounds.
2756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2757/* end confdefs.h.  */
2758$4
2759int
2760main ()
2761{
2762static int test_array [1 - 2 * !(($2) >= 0)];
2763test_array [0] = 0;
2764return test_array [0];
2765
2766  ;
2767  return 0;
2768}
2769_ACEOF
2770if ac_fn_cxx_try_compile "$LINENO"; then :
2771  ac_lo=0 ac_mid=0
2772  while :; do
2773    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2774/* end confdefs.h.  */
2775$4
2776int
2777main ()
2778{
2779static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2780test_array [0] = 0;
2781return test_array [0];
2782
2783  ;
2784  return 0;
2785}
2786_ACEOF
2787if ac_fn_cxx_try_compile "$LINENO"; then :
2788  ac_hi=$ac_mid; break
2789else
2790  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2791			if test $ac_lo -le $ac_mid; then
2792			  ac_lo= ac_hi=
2793			  break
2794			fi
2795			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2796fi
2797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2798  done
2799else
2800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802$4
2803int
2804main ()
2805{
2806static int test_array [1 - 2 * !(($2) < 0)];
2807test_array [0] = 0;
2808return test_array [0];
2809
2810  ;
2811  return 0;
2812}
2813_ACEOF
2814if ac_fn_cxx_try_compile "$LINENO"; then :
2815  ac_hi=-1 ac_mid=-1
2816  while :; do
2817    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2818/* end confdefs.h.  */
2819$4
2820int
2821main ()
2822{
2823static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2824test_array [0] = 0;
2825return test_array [0];
2826
2827  ;
2828  return 0;
2829}
2830_ACEOF
2831if ac_fn_cxx_try_compile "$LINENO"; then :
2832  ac_lo=$ac_mid; break
2833else
2834  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2835			if test $ac_mid -le $ac_hi; then
2836			  ac_lo= ac_hi=
2837			  break
2838			fi
2839			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2840fi
2841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2842  done
2843else
2844  ac_lo= ac_hi=
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849# Binary search between lo and hi bounds.
2850while test "x$ac_lo" != "x$ac_hi"; do
2851  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2853/* end confdefs.h.  */
2854$4
2855int
2856main ()
2857{
2858static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2859test_array [0] = 0;
2860return test_array [0];
2861
2862  ;
2863  return 0;
2864}
2865_ACEOF
2866if ac_fn_cxx_try_compile "$LINENO"; then :
2867  ac_hi=$ac_mid
2868else
2869  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872done
2873case $ac_lo in #((
2874?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2875'') ac_retval=1 ;;
2876esac
2877  else
2878    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2879/* end confdefs.h.  */
2880$4
2881static long int longval () { return $2; }
2882static unsigned long int ulongval () { return $2; }
2883#include <stdio.h>
2884#include <stdlib.h>
2885int
2886main ()
2887{
2888
2889  FILE *f = fopen ("conftest.val", "w");
2890  if (! f)
2891    return 1;
2892  if (($2) < 0)
2893    {
2894      long int i = longval ();
2895      if (i != ($2))
2896	return 1;
2897      fprintf (f, "%ld", i);
2898    }
2899  else
2900    {
2901      unsigned long int i = ulongval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%lu", i);
2905    }
2906  /* Do not output a trailing newline, as this causes \r\n confusion
2907     on some platforms.  */
2908  return ferror (f) || fclose (f) != 0;
2909
2910  ;
2911  return 0;
2912}
2913_ACEOF
2914if ac_fn_cxx_try_run "$LINENO"; then :
2915  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2916else
2917  ac_retval=1
2918fi
2919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2920  conftest.$ac_objext conftest.beam conftest.$ac_ext
2921rm -f conftest.val
2922
2923  fi
2924  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2925  as_fn_set_status $ac_retval
2926
2927} # ac_fn_cxx_compute_int
2928
2929# ac_fn_cxx_try_link LINENO
2930# -------------------------
2931# Try to link conftest.$ac_ext, and return whether this succeeded.
2932ac_fn_cxx_try_link ()
2933{
2934  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2935  rm -f conftest.$ac_objext conftest$ac_exeext
2936  if { { ac_try="$ac_link"
2937case "(($ac_try" in
2938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939  *) ac_try_echo=$ac_try;;
2940esac
2941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2942$as_echo "$ac_try_echo"; } >&5
2943  (eval "$ac_link") 2>conftest.err
2944  ac_status=$?
2945  if test -s conftest.err; then
2946    grep -v '^ *+' conftest.err >conftest.er1
2947    cat conftest.er1 >&5
2948    mv -f conftest.er1 conftest.err
2949  fi
2950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2951  test $ac_status = 0; } && {
2952	 test -z "$ac_cxx_werror_flag" ||
2953	 test ! -s conftest.err
2954       } && test -s conftest$ac_exeext && {
2955	 test "$cross_compiling" = yes ||
2956	 test -x conftest$ac_exeext
2957       }; then :
2958  ac_retval=0
2959else
2960  $as_echo "$as_me: failed program was:" >&5
2961sed 's/^/| /' conftest.$ac_ext >&5
2962
2963	ac_retval=1
2964fi
2965  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2966  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2967  # interfere with the next link command; also delete a directory that is
2968  # left behind by Apple's compiler.  We do this before executing the actions.
2969  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2970  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2971  as_fn_set_status $ac_retval
2972
2973} # ac_fn_cxx_try_link
2974
2975# ac_fn_cxx_check_func LINENO FUNC VAR
2976# ------------------------------------
2977# Tests whether FUNC exists, setting the cache variable VAR accordingly
2978ac_fn_cxx_check_func ()
2979{
2980  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2981  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2982$as_echo_n "checking for $2... " >&6; }
2983if eval \${$3+:} false; then :
2984  $as_echo_n "(cached) " >&6
2985else
2986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2987/* end confdefs.h.  */
2988/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2989   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2990#define $2 innocuous_$2
2991
2992/* System header to define __stub macros and hopefully few prototypes,
2993    which can conflict with char $2 (); below.
2994    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2995    <limits.h> exists even on freestanding compilers.  */
2996
2997#ifdef __STDC__
2998# include <limits.h>
2999#else
3000# include <assert.h>
3001#endif
3002
3003#undef $2
3004
3005/* Override any GCC internal prototype to avoid an error.
3006   Use char because int might match the return type of a GCC
3007   builtin and then its argument prototype would still apply.  */
3008#ifdef __cplusplus
3009extern "C"
3010#endif
3011char $2 ();
3012/* The GNU C library defines this for functions which it implements
3013    to always fail with ENOSYS.  Some functions are actually named
3014    something starting with __ and the normal name is an alias.  */
3015#if defined __stub_$2 || defined __stub___$2
3016choke me
3017#endif
3018
3019int
3020main ()
3021{
3022return $2 ();
3023  ;
3024  return 0;
3025}
3026_ACEOF
3027if ac_fn_cxx_try_link "$LINENO"; then :
3028  eval "$3=yes"
3029else
3030  eval "$3=no"
3031fi
3032rm -f core conftest.err conftest.$ac_objext \
3033    conftest$ac_exeext conftest.$ac_ext
3034fi
3035eval ac_res=\$$3
3036	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3037$as_echo "$ac_res" >&6; }
3038  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3039
3040} # ac_fn_cxx_check_func
3041
3042# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3043# -------------------------------------------------------
3044# Tests whether HEADER exists and can be compiled using the include files in
3045# INCLUDES, setting the cache variable VAR accordingly.
3046ac_fn_c_check_header_compile ()
3047{
3048  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3050$as_echo_n "checking for $2... " >&6; }
3051if eval \${$3+:} false; then :
3052  $as_echo_n "(cached) " >&6
3053else
3054  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055/* end confdefs.h.  */
3056$4
3057#include <$2>
3058_ACEOF
3059if ac_fn_c_try_compile "$LINENO"; then :
3060  eval "$3=yes"
3061else
3062  eval "$3=no"
3063fi
3064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3065fi
3066eval ac_res=\$$3
3067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3068$as_echo "$ac_res" >&6; }
3069  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3070
3071} # ac_fn_c_check_header_compile
3072cat >config.log <<_ACEOF
3073This file contains any messages produced by compilers while
3074running configure, to aid debugging if configure makes a mistake.
3075
3076It was created by OpenJDK $as_me jdk9, which was
3077generated by GNU Autoconf 2.69.  Invocation command line was
3078
3079  $ $0 $@
3080
3081_ACEOF
3082exec 5>>config.log
3083{
3084cat <<_ASUNAME
3085## --------- ##
3086## Platform. ##
3087## --------- ##
3088
3089hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3090uname -m = `(uname -m) 2>/dev/null || echo unknown`
3091uname -r = `(uname -r) 2>/dev/null || echo unknown`
3092uname -s = `(uname -s) 2>/dev/null || echo unknown`
3093uname -v = `(uname -v) 2>/dev/null || echo unknown`
3094
3095/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3096/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3097
3098/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3099/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3100/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3101/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3102/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3103/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3104/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3105
3106_ASUNAME
3107
3108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3109for as_dir in $PATH
3110do
3111  IFS=$as_save_IFS
3112  test -z "$as_dir" && as_dir=.
3113    $as_echo "PATH: $as_dir"
3114  done
3115IFS=$as_save_IFS
3116
3117} >&5
3118
3119cat >&5 <<_ACEOF
3120
3121
3122## ----------- ##
3123## Core tests. ##
3124## ----------- ##
3125
3126_ACEOF
3127
3128
3129# Keep a trace of the command line.
3130# Strip out --no-create and --no-recursion so they do not pile up.
3131# Strip out --silent because we don't want to record it for future runs.
3132# Also quote any args containing shell meta-characters.
3133# Make two passes to allow for proper duplicate-argument suppression.
3134ac_configure_args=
3135ac_configure_args0=
3136ac_configure_args1=
3137ac_must_keep_next=false
3138for ac_pass in 1 2
3139do
3140  for ac_arg
3141  do
3142    case $ac_arg in
3143    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3144    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3145    | -silent | --silent | --silen | --sile | --sil)
3146      continue ;;
3147    *\'*)
3148      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3149    esac
3150    case $ac_pass in
3151    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3152    2)
3153      as_fn_append ac_configure_args1 " '$ac_arg'"
3154      if test $ac_must_keep_next = true; then
3155	ac_must_keep_next=false # Got value, back to normal.
3156      else
3157	case $ac_arg in
3158	  *=* | --config-cache | -C | -disable-* | --disable-* \
3159	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3160	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3161	  | -with-* | --with-* | -without-* | --without-* | --x)
3162	    case "$ac_configure_args0 " in
3163	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3164	    esac
3165	    ;;
3166	  -* ) ac_must_keep_next=true ;;
3167	esac
3168      fi
3169      as_fn_append ac_configure_args " '$ac_arg'"
3170      ;;
3171    esac
3172  done
3173done
3174{ ac_configure_args0=; unset ac_configure_args0;}
3175{ ac_configure_args1=; unset ac_configure_args1;}
3176
3177# When interrupted or exit'd, cleanup temporary files, and complete
3178# config.log.  We remove comments because anyway the quotes in there
3179# would cause problems or look ugly.
3180# WARNING: Use '\'' to represent an apostrophe within the trap.
3181# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3182trap 'exit_status=$?
3183  # Save into config.log some information that might help in debugging.
3184  {
3185    echo
3186
3187    $as_echo "## ---------------- ##
3188## Cache variables. ##
3189## ---------------- ##"
3190    echo
3191    # The following way of writing the cache mishandles newlines in values,
3192(
3193  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3194    eval ac_val=\$$ac_var
3195    case $ac_val in #(
3196    *${as_nl}*)
3197      case $ac_var in #(
3198      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3199$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3200      esac
3201      case $ac_var in #(
3202      _ | IFS | as_nl) ;; #(
3203      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3204      *) { eval $ac_var=; unset $ac_var;} ;;
3205      esac ;;
3206    esac
3207  done
3208  (set) 2>&1 |
3209    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3210    *${as_nl}ac_space=\ *)
3211      sed -n \
3212	"s/'\''/'\''\\\\'\'''\''/g;
3213	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3214      ;; #(
3215    *)
3216      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3217      ;;
3218    esac |
3219    sort
3220)
3221    echo
3222
3223    $as_echo "## ----------------- ##
3224## Output variables. ##
3225## ----------------- ##"
3226    echo
3227    for ac_var in $ac_subst_vars
3228    do
3229      eval ac_val=\$$ac_var
3230      case $ac_val in
3231      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3232      esac
3233      $as_echo "$ac_var='\''$ac_val'\''"
3234    done | sort
3235    echo
3236
3237    if test -n "$ac_subst_files"; then
3238      $as_echo "## ------------------- ##
3239## File substitutions. ##
3240## ------------------- ##"
3241      echo
3242      for ac_var in $ac_subst_files
3243      do
3244	eval ac_val=\$$ac_var
3245	case $ac_val in
3246	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3247	esac
3248	$as_echo "$ac_var='\''$ac_val'\''"
3249      done | sort
3250      echo
3251    fi
3252
3253    if test -s confdefs.h; then
3254      $as_echo "## ----------- ##
3255## confdefs.h. ##
3256## ----------- ##"
3257      echo
3258      cat confdefs.h
3259      echo
3260    fi
3261    test "$ac_signal" != 0 &&
3262      $as_echo "$as_me: caught signal $ac_signal"
3263    $as_echo "$as_me: exit $exit_status"
3264  } >&5
3265  rm -f core *.core core.conftest.* &&
3266    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3267    exit $exit_status
3268' 0
3269for ac_signal in 1 2 13 15; do
3270  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3271done
3272ac_signal=0
3273
3274# confdefs.h avoids OS command line length limits that DEFS can exceed.
3275rm -f -r conftest* confdefs.h
3276
3277$as_echo "/* confdefs.h */" > confdefs.h
3278
3279# Predefined preprocessor variables.
3280
3281cat >>confdefs.h <<_ACEOF
3282#define PACKAGE_NAME "$PACKAGE_NAME"
3283_ACEOF
3284
3285cat >>confdefs.h <<_ACEOF
3286#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3287_ACEOF
3288
3289cat >>confdefs.h <<_ACEOF
3290#define PACKAGE_VERSION "$PACKAGE_VERSION"
3291_ACEOF
3292
3293cat >>confdefs.h <<_ACEOF
3294#define PACKAGE_STRING "$PACKAGE_STRING"
3295_ACEOF
3296
3297cat >>confdefs.h <<_ACEOF
3298#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3299_ACEOF
3300
3301cat >>confdefs.h <<_ACEOF
3302#define PACKAGE_URL "$PACKAGE_URL"
3303_ACEOF
3304
3305
3306# Let the site file select an alternate cache file if it wants to.
3307# Prefer an explicitly selected file to automatically selected ones.
3308ac_site_file1=NONE
3309ac_site_file2=NONE
3310if test -n "$CONFIG_SITE"; then
3311  # We do not want a PATH search for config.site.
3312  case $CONFIG_SITE in #((
3313    -*)  ac_site_file1=./$CONFIG_SITE;;
3314    */*) ac_site_file1=$CONFIG_SITE;;
3315    *)   ac_site_file1=./$CONFIG_SITE;;
3316  esac
3317elif test "x$prefix" != xNONE; then
3318  ac_site_file1=$prefix/share/config.site
3319  ac_site_file2=$prefix/etc/config.site
3320else
3321  ac_site_file1=$ac_default_prefix/share/config.site
3322  ac_site_file2=$ac_default_prefix/etc/config.site
3323fi
3324for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3325do
3326  test "x$ac_site_file" = xNONE && continue
3327  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3328    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3329$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3330    sed 's/^/| /' "$ac_site_file" >&5
3331    . "$ac_site_file" \
3332      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3334as_fn_error $? "failed to load site script $ac_site_file
3335See \`config.log' for more details" "$LINENO" 5; }
3336  fi
3337done
3338
3339if test -r "$cache_file"; then
3340  # Some versions of bash will fail to source /dev/null (special files
3341  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3342  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3343    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3344$as_echo "$as_me: loading cache $cache_file" >&6;}
3345    case $cache_file in
3346      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3347      *)                      . "./$cache_file";;
3348    esac
3349  fi
3350else
3351  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3352$as_echo "$as_me: creating cache $cache_file" >&6;}
3353  >$cache_file
3354fi
3355
3356# Check that the precious variables saved in the cache have kept the same
3357# value.
3358ac_cache_corrupted=false
3359for ac_var in $ac_precious_vars; do
3360  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3361  eval ac_new_set=\$ac_env_${ac_var}_set
3362  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3363  eval ac_new_val=\$ac_env_${ac_var}_value
3364  case $ac_old_set,$ac_new_set in
3365    set,)
3366      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3367$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3368      ac_cache_corrupted=: ;;
3369    ,set)
3370      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3371$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3372      ac_cache_corrupted=: ;;
3373    ,);;
3374    *)
3375      if test "x$ac_old_val" != "x$ac_new_val"; then
3376	# differences in whitespace do not lead to failure.
3377	ac_old_val_w=`echo x $ac_old_val`
3378	ac_new_val_w=`echo x $ac_new_val`
3379	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3380	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3381$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3382	  ac_cache_corrupted=:
3383	else
3384	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3385$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3386	  eval $ac_var=\$ac_old_val
3387	fi
3388	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3389$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3390	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3391$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3392      fi;;
3393  esac
3394  # Pass precious variables to config.status.
3395  if test "$ac_new_set" = set; then
3396    case $ac_new_val in
3397    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3398    *) ac_arg=$ac_var=$ac_new_val ;;
3399    esac
3400    case " $ac_configure_args " in
3401      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3402      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3403    esac
3404  fi
3405done
3406if $ac_cache_corrupted; then
3407  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3409  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3410$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3411  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3412fi
3413## -------------------- ##
3414## Main body of script. ##
3415## -------------------- ##
3416
3417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
3422
3423
3424
3425ac_aux_dir=
3426for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3427  if test -f "$ac_dir/install-sh"; then
3428    ac_aux_dir=$ac_dir
3429    ac_install_sh="$ac_aux_dir/install-sh -c"
3430    break
3431  elif test -f "$ac_dir/install.sh"; then
3432    ac_aux_dir=$ac_dir
3433    ac_install_sh="$ac_aux_dir/install.sh -c"
3434    break
3435  elif test -f "$ac_dir/shtool"; then
3436    ac_aux_dir=$ac_dir
3437    ac_install_sh="$ac_aux_dir/shtool install -c"
3438    break
3439  fi
3440done
3441if test -z "$ac_aux_dir"; then
3442  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
3443fi
3444
3445# These three variables are undocumented and unsupported,
3446# and are intended to be withdrawn in a future Autoconf release.
3447# They can cause serious problems if a builder's source tree is in a directory
3448# whose full name contains unusual characters.
3449ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3450ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3451ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3452
3453
3454# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3455
3456#
3457# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3458# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3459#
3460# This code is free software; you can redistribute it and/or modify it
3461# under the terms of the GNU General Public License version 2 only, as
3462# published by the Free Software Foundation.  Oracle designates this
3463# particular file as subject to the "Classpath" exception as provided
3464# by Oracle in the LICENSE file that accompanied this code.
3465#
3466# This code is distributed in the hope that it will be useful, but WITHOUT
3467# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3468# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3469# version 2 for more details (a copy is included in the LICENSE file that
3470# accompanied this code).
3471#
3472# You should have received a copy of the GNU General Public License version
3473# 2 along with this work; if not, write to the Free Software Foundation,
3474# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3475#
3476# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3477# or visit www.oracle.com if you need additional information or have any
3478# questions.
3479#
3480
3481#
3482# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3483#
3484# This program is free software; you can redistribute it and/or modify
3485# it under the terms of the GNU General Public License as published by
3486# the Free Software Foundation; either version 2 of the License, or
3487# (at your option) any later version.
3488#
3489# This program is distributed in the hope that it will be useful, but
3490# WITHOUT ANY WARRANTY; without even the implied warranty of
3491# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3492# General Public License for more details.
3493#
3494# You should have received a copy of the GNU General Public License
3495# along with this program; if not, write to the Free Software
3496# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3497#
3498# As a special exception to the GNU General Public License, if you
3499# distribute this file as part of a program that contains a
3500# configuration script generated by Autoconf, you may include it under
3501# the same distribution terms that you use for the rest of that program.
3502
3503# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3504# ----------------------------------
3505# PKG_PROG_PKG_CONFIG
3506
3507# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3508#
3509# Check to see whether a particular set of modules exists.  Similar
3510# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3511#
3512#
3513# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3514# this or PKG_CHECK_MODULES is called, or make sure to call
3515# PKG_CHECK_EXISTS manually
3516# --------------------------------------------------------------
3517
3518
3519
3520# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3521# ---------------------------------------------
3522# _PKG_CONFIG
3523
3524# _PKG_SHORT_ERRORS_SUPPORTED
3525# -----------------------------
3526# _PKG_SHORT_ERRORS_SUPPORTED
3527
3528
3529# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3530# [ACTION-IF-NOT-FOUND])
3531#
3532#
3533# Note that if there is a possibility the first call to
3534# PKG_CHECK_MODULES might not happen, you should be sure to include an
3535# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3536#
3537#
3538# --------------------------------------------------------------
3539# PKG_CHECK_MODULES
3540
3541
3542# Include these first...
3543#
3544# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3545# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3546#
3547# This code is free software; you can redistribute it and/or modify it
3548# under the terms of the GNU General Public License version 2 only, as
3549# published by the Free Software Foundation.  Oracle designates this
3550# particular file as subject to the "Classpath" exception as provided
3551# by Oracle in the LICENSE file that accompanied this code.
3552#
3553# This code is distributed in the hope that it will be useful, but WITHOUT
3554# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3555# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3556# version 2 for more details (a copy is included in the LICENSE file that
3557# accompanied this code).
3558#
3559# You should have received a copy of the GNU General Public License version
3560# 2 along with this work; if not, write to the Free Software Foundation,
3561# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3562#
3563# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3564# or visit www.oracle.com if you need additional information or have any
3565# questions.
3566#
3567
3568# Create a function/macro that takes a series of named arguments. The call is
3569# similar to AC_DEFUN, but the setup of the function looks like this:
3570# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3571# ... do something
3572#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3573# ])
3574# A star (*) in front of a named argument means that it is required and it's
3575# presence will be verified. To pass e.g. the first value as a normal indexed
3576# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3577# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3578# "ARG_FOO".
3579#
3580# The generated function can be called like this:
3581# MYFUNC(FOO: [foo-val],
3582#     BAR: [
3583#         $ECHO hello world
3584#     ])
3585# Note that the argument value must start on the same line as the argument name.
3586#
3587# Argument 1: Name of the function to define
3588# Argument 2: List of legal named arguments, with a * prefix for required arguments
3589# Argument 3: Argument array to treat as named, typically $@
3590# Argument 4: The main function body
3591
3592
3593# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3594# If so, then append $1 to $2 \
3595# Also set JVM_ARG_OK to true/false depending on outcome.
3596
3597
3598# Appends a string to a path variable, only adding the : when needed.
3599
3600
3601# Prepends a string to a path variable, only adding the : when needed.
3602
3603
3604# This will make sure the given variable points to a full and proper
3605# path. This means:
3606# 1) There will be no spaces in the path. On unix platforms,
3607#    spaces in the path will result in an error. On Windows,
3608#    the path will be rewritten using short-style to be space-free.
3609# 2) The path will be absolute, and it will be in unix-style (on
3610#     cygwin).
3611# $1: The name of the variable to fix
3612
3613
3614# This will make sure the given variable points to a executable
3615# with a full and proper path. This means:
3616# 1) There will be no spaces in the path. On unix platforms,
3617#    spaces in the path will result in an error. On Windows,
3618#    the path will be rewritten using short-style to be space-free.
3619# 2) The path will be absolute, and it will be in unix-style (on
3620#     cygwin).
3621# Any arguments given to the executable is preserved.
3622# If the input variable does not have a directory specification, then
3623# it need to be in the PATH.
3624# $1: The name of the variable to fix
3625
3626
3627
3628
3629# Register a --with argument but mark it as deprecated
3630# $1: The name of the with argument to deprecate, not including --with-
3631
3632
3633# Register a --enable argument but mark it as deprecated
3634# $1: The name of the with argument to deprecate, not including --enable-
3635# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3636# $3: Messages to user.
3637
3638
3639
3640
3641# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3642# $1: variable to check
3643
3644
3645# Check that there are no unprocessed overridden variables left.
3646# If so, they are an incorrect argument and we will exit with an error.
3647
3648
3649# Setup a tool for the given variable. If correctly specified by the user,
3650# use that value, otherwise search for the tool using the supplied code snippet.
3651# $1: variable to set
3652# $2: code snippet to call to look for the tool
3653# $3: code snippet to call if variable was used to find tool
3654
3655
3656# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3657# $1: variable to set
3658# $2: executable name (or list of names) to look for
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664
3665
3666# Like BASIC_PATH_PROGS but fails if no tool was found.
3667# $1: variable to set
3668# $2: executable name (or list of names) to look for
3669
3670
3671# Like BASIC_SETUP_TOOL but fails if no tool was found.
3672# $1: variable to set
3673# $2: autoconf macro to call to look for the special tool
3674
3675
3676# Setup the most fundamental tools that relies on not much else to set up,
3677# but is used by much of the early bootstrap code.
3678
3679
3680# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3681
3682
3683# Evaluates platform specific overrides for devkit variables.
3684# $1: Name of variable
3685
3686
3687
3688
3689
3690
3691#%%% Simple tools %%%
3692
3693# Check if we have found a usable version of make
3694# $1: the path to a potential make binary (or empty)
3695# $2: the description on how we found this
3696
3697
3698
3699
3700# Goes looking for a usable version of GNU make.
3701
3702
3703
3704
3705
3706
3707# Check if build directory is on local disk. If not possible to determine,
3708# we prefer to claim it's local.
3709# Argument 1: directory to test
3710# Argument 2: what to do if it is on local disk
3711# Argument 3: what to do otherwise (remote disk or failure)
3712
3713
3714# Check that source files have basic read permissions set. This might
3715# not be the case in cygwin in certain conditions.
3716
3717
3718
3719
3720# Check for support for specific options in bash
3721
3722
3723################################################################################
3724#
3725# Default make target
3726#
3727
3728
3729# Code to run after AC_OUTPUT
3730
3731
3732#
3733# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3735#
3736# This code is free software; you can redistribute it and/or modify it
3737# under the terms of the GNU General Public License version 2 only, as
3738# published by the Free Software Foundation.  Oracle designates this
3739# particular file as subject to the "Classpath" exception as provided
3740# by Oracle in the LICENSE file that accompanied this code.
3741#
3742# This code is distributed in the hope that it will be useful, but WITHOUT
3743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3745# version 2 for more details (a copy is included in the LICENSE file that
3746# accompanied this code).
3747#
3748# You should have received a copy of the GNU General Public License version
3749# 2 along with this work; if not, write to the Free Software Foundation,
3750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3751#
3752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3753# or visit www.oracle.com if you need additional information or have any
3754# questions.
3755#
3756
3757
3758
3759
3760
3761# Helper function which possibly converts a path using DOS-style short mode.
3762# If so, the updated path is stored in $new_path.
3763# $1: The path to check
3764
3765
3766# Helper function which possibly converts a path using DOS-style short mode.
3767# If so, the updated path is stored in $new_path.
3768# $1: The path to check
3769
3770
3771# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3772# and could probably be heavily simplified. However, all changes in this
3773# area tend to need lot of testing in different scenarios, and in lack of
3774# proper unit testing, cleaning this up has not been deemed worth the effort
3775# at the moment.
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3786
3787
3788
3789
3790# ... then the rest
3791#
3792# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3793# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3794#
3795# This code is free software; you can redistribute it and/or modify it
3796# under the terms of the GNU General Public License version 2 only, as
3797# published by the Free Software Foundation.  Oracle designates this
3798# particular file as subject to the "Classpath" exception as provided
3799# by Oracle in the LICENSE file that accompanied this code.
3800#
3801# This code is distributed in the hope that it will be useful, but WITHOUT
3802# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3803# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3804# version 2 for more details (a copy is included in the LICENSE file that
3805# accompanied this code).
3806#
3807# You should have received a copy of the GNU General Public License version
3808# 2 along with this work; if not, write to the Free Software Foundation,
3809# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3810#
3811# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3812# or visit www.oracle.com if you need additional information or have any
3813# questions.
3814#
3815
3816########################################################################
3817# This file handles detection of the Boot JDK. The Boot JDK detection
3818# process has been developed as a response to solve a complex real-world
3819# problem. Initially, it was simple, but it has grown as platform after
3820# platform, idiosyncracy after idiosyncracy has been supported.
3821#
3822# The basic idea is this:
3823# 1) You need an acceptable *) JDK to use as a Boot JDK
3824# 2) There are several ways to locate a JDK, that are mostly platform
3825#    dependent **)
3826# 3) You can have multiple JDKs installed
3827# 4) If possible, configure should try to dig out an acceptable JDK
3828#    automatically, without having to resort to command-line options
3829#
3830# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3831#     javac) and not a JRE, etc.
3832#
3833# **) On Windows we typically use a well-known path.
3834#     On MacOSX we typically use the tool java_home.
3835#     On Linux we typically find javac in the $PATH, and then follow a
3836#     chain of symlinks that often ends up in a real JDK.
3837#
3838# This leads to the code where we check in different ways to locate a
3839# JDK, and if one is found, check if it is acceptable. If not, we print
3840# our reasons for rejecting it (useful when debugging non-working
3841# configure situations) and continue checking the next one.
3842########################################################################
3843
3844# Execute the check given as argument, and verify the result
3845# If the Boot JDK was previously found, do nothing
3846# $1 A command line (typically autoconf macro) to execute
3847
3848
3849# Test: Is bootjdk explicitely set by command line arguments?
3850
3851
3852# Test: Is $JAVA_HOME set?
3853
3854
3855# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3856
3857
3858# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3859# $1: Argument to the java_home binary (optional)
3860
3861
3862# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3863
3864
3865# Look for a jdk in the given path. If there are multiple, try to select the newest.
3866# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3867# $1 = Path to directory containing jdk installations.
3868# $2 = String to append to the found JDK directory to get the proper JDK home
3869
3870
3871# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3872# environmental variable as base for where to look.
3873# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3874
3875
3876# Test: Is there a JDK installed in default, well-known locations?
3877
3878
3879# Check that a command-line tool in the Boot JDK is correct
3880# $1 = name of variable to assign
3881# $2 = name of binary
3882
3883
3884###############################################################################
3885#
3886# We need a Boot JDK to bootstrap the build.
3887#
3888
3889
3890
3891
3892
3893# BUILD_JDK: the location of the latest JDK that can run
3894#   on the host system and supports the target class file version
3895#   generated in this JDK build.  This variable should only be
3896#   used after the launchers are built.
3897#
3898
3899# Execute the check given as argument, and verify the result.
3900# If the JDK was previously found, do nothing.
3901# $1 A command line (typically autoconf macro) to execute
3902
3903
3904# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3905# is different than the host system doing the build (e.g. cross-compilation),
3906# a special BUILD_JDK is built as part of the build process.  An external
3907# prebuilt BUILD_JDK can also be supplied.
3908
3909
3910#
3911# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3912# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3913#
3914# This code is free software; you can redistribute it and/or modify it
3915# under the terms of the GNU General Public License version 2 only, as
3916# published by the Free Software Foundation.  Oracle designates this
3917# particular file as subject to the "Classpath" exception as provided
3918# by Oracle in the LICENSE file that accompanied this code.
3919#
3920# This code is distributed in the hope that it will be useful, but WITHOUT
3921# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3922# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3923# version 2 for more details (a copy is included in the LICENSE file that
3924# accompanied this code).
3925#
3926# You should have received a copy of the GNU General Public License version
3927# 2 along with this work; if not, write to the Free Software Foundation,
3928# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3929#
3930# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3931# or visit www.oracle.com if you need additional information or have any
3932# questions.
3933#
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951################################################################################
3952#
3953# Runs icecc-create-env once and prints the error if it fails
3954#
3955# $1: arguments to icecc-create-env
3956# $2: log file
3957#
3958
3959
3960################################################################################
3961#
3962# Optionally enable distributed compilation of native code using icecc/icecream
3963#
3964
3965
3966
3967
3968
3969
3970
3971#
3972# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3973# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3974#
3975# This code is free software; you can redistribute it and/or modify it
3976# under the terms of the GNU General Public License version 2 only, as
3977# published by the Free Software Foundation.  Oracle designates this
3978# particular file as subject to the "Classpath" exception as provided
3979# by Oracle in the LICENSE file that accompanied this code.
3980#
3981# This code is distributed in the hope that it will be useful, but WITHOUT
3982# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3983# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3984# version 2 for more details (a copy is included in the LICENSE file that
3985# accompanied this code).
3986#
3987# You should have received a copy of the GNU General Public License version
3988# 2 along with this work; if not, write to the Free Software Foundation,
3989# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3990#
3991# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3992# or visit www.oracle.com if you need additional information or have any
3993# questions.
3994#
3995
3996# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3997# corresponding configure arguments instead
3998
3999
4000# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4001# that configure can use them while detecting compilers.
4002# TOOLCHAIN_TYPE is available here.
4003# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4004
4005
4006
4007
4008
4009
4010# Documentation on common flags used for solstudio in HIGHEST.
4011#
4012# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4013#          done with care, there are some assumptions below that need to
4014#          be understood about the use of pointers, and IEEE behavior.
4015#
4016# -fns: Use non-standard floating point mode (not IEEE 754)
4017# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4018# -fsingle: Use single precision floating point with 'float'
4019# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4020#   (Source with excessing pointer casting and data access with mixed
4021#    pointer types are not recommended)
4022# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4023#   (If you expect perfect errno behavior, do not use this)
4024# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4025# -xrestrict: Pointer parameters to functions do not overlap
4026#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4027#    If you pass in multiple pointers to the same data, do not use this)
4028# -xlibmil: Inline some library routines
4029#   (If you expect perfect errno behavior, do not use this)
4030# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4031#   (If you expect perfect errno behavior, do not use this)
4032#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4033
4034    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4035    # Bug?
4036    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4037    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4038    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4039    #fi
4040
4041
4042
4043
4044
4045
4046################################################################################
4047# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4048#      conditionals against.
4049# $2 - Optional prefix for each variable defined.
4050
4051
4052# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4053#                                  IF_FALSE: [RUN-IF-FALSE])
4054# ------------------------------------------------------------
4055# Check that the C compiler supports an argument
4056
4057
4058
4059
4060# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4061#                                    IF_FALSE: [RUN-IF-FALSE])
4062# ------------------------------------------------------------
4063# Check that the C++ compiler supports an argument
4064
4065
4066
4067
4068# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4069#                                IF_FALSE: [RUN-IF-FALSE])
4070# ------------------------------------------------------------
4071# Check that the C and C++ compilers support an argument
4072
4073
4074
4075
4076# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4077#                                   IF_FALSE: [RUN-IF-FALSE])
4078# ------------------------------------------------------------
4079# Check that the linker support an argument
4080
4081
4082
4083
4084
4085
4086
4087
4088#
4089# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4090# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4091#
4092# This code is free software; you can redistribute it and/or modify it
4093# under the terms of the GNU General Public License version 2 only, as
4094# published by the Free Software Foundation.  Oracle designates this
4095# particular file as subject to the "Classpath" exception as provided
4096# by Oracle in the LICENSE file that accompanied this code.
4097#
4098# This code is distributed in the hope that it will be useful, but WITHOUT
4099# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4100# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4101# version 2 for more details (a copy is included in the LICENSE file that
4102# accompanied this code).
4103#
4104# You should have received a copy of the GNU General Public License version
4105# 2 along with this work; if not, write to the Free Software Foundation,
4106# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4107#
4108# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4109# or visit www.oracle.com if you need additional information or have any
4110# questions.
4111#
4112
4113
4114
4115
4116
4117cygwin_help() {
4118  case $1 in
4119    unzip)
4120      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4121      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4122      ;;
4123    zip)
4124      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4125      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4126      ;;
4127    make)
4128      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4129      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4130      ;;
4131    freetype)
4132      HELP_MSG="
4133The freetype library can now be build during the configure process.
4134Download the freetype sources and unpack them into an arbitrary directory:
4135
4136wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4137tar -xzf freetype-2.5.3.tar.gz
4138
4139Then run configure with '--with-freetype-src=<freetype_src>'. This will
4140automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4141builds or into '<freetype_src>/lib32' for 32-bit builds.
4142Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4143and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4144
4145Alternatively you can unpack the sources like this to use the default directory:
4146
4147tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4148      ;;
4149  esac
4150}
4151
4152msys_help() {
4153  PKGHANDLER_COMMAND=""
4154}
4155
4156apt_help() {
4157  case $1 in
4158    reduced)
4159      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4160    devkit)
4161      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4162    openjdk)
4163      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4164    alsa)
4165      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4166    cups)
4167      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4168    freetype)
4169      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4170    ffi)
4171      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4172    x11)
4173      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4174    ccache)
4175      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4176    dtrace)
4177      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4178  esac
4179}
4180
4181yum_help() {
4182  case $1 in
4183    devkit)
4184      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4185    openjdk)
4186      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4187    alsa)
4188      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4189    cups)
4190      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4191    freetype)
4192      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4193    x11)
4194      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4195    ccache)
4196      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4197  esac
4198}
4199
4200port_help() {
4201  PKGHANDLER_COMMAND=""
4202}
4203
4204pkgutil_help() {
4205  PKGHANDLER_COMMAND=""
4206}
4207
4208pkgadd_help() {
4209  PKGHANDLER_COMMAND=""
4210}
4211
4212# This function will check if we're called from the "configure" wrapper while
4213# printing --help. If so, we will print out additional information that can
4214# only be extracted within the autoconf script, and then exit. This must be
4215# called at the very beginning in configure.ac.
4216
4217
4218
4219
4220
4221
4222#
4223# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4224# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4225#
4226# This code is free software; you can redistribute it and/or modify it
4227# under the terms of the GNU General Public License version 2 only, as
4228# published by the Free Software Foundation.  Oracle designates this
4229# particular file as subject to the "Classpath" exception as provided
4230# by Oracle in the LICENSE file that accompanied this code.
4231#
4232# This code is distributed in the hope that it will be useful, but WITHOUT
4233# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4234# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4235# version 2 for more details (a copy is included in the LICENSE file that
4236# accompanied this code).
4237#
4238# You should have received a copy of the GNU General Public License version
4239# 2 along with this work; if not, write to the Free Software Foundation,
4240# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4241#
4242# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4243# or visit www.oracle.com if you need additional information or have any
4244# questions.
4245#
4246
4247# All valid JVM features, regardless of platform
4248VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4249    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4250
4251# All valid JVM variants
4252VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4253
4254###############################################################################
4255# Check if the specified JVM variant should be built. To be used in shell if
4256# constructs, like this:
4257# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4258#
4259# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4260
4261# Definition kept in one line to allow inlining in if statements.
4262# Additional [] needed to keep m4 from mangling shell constructs.
4263
4264
4265###############################################################################
4266# Check if the specified JVM features are explicitly enabled. To be used in
4267# shell if constructs, like this:
4268# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4269#
4270# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4271
4272# Definition kept in one line to allow inlining in if statements.
4273# Additional [] needed to keep m4 from mangling shell constructs.
4274
4275
4276###############################################################################
4277# Check which variants of the JVM that we want to build. Available variants are:
4278#   server: normal interpreter, and a tiered C1/C2 compiler
4279#   client: normal interpreter, and C1 (no C2 compiler)
4280#   minimal: reduced form of client with optional features stripped out
4281#   core: normal interpreter only, no compiler
4282#   zero: C++ based interpreter only, no compiler
4283#   zeroshark: C++ based interpreter, and a llvm-based compiler
4284#   custom: baseline JVM with no default features
4285#
4286
4287
4288###############################################################################
4289# Check if dtrace should be enabled and has all prerequisites present.
4290#
4291
4292
4293###############################################################################
4294# Set up all JVM features for each JVM variant.
4295#
4296
4297
4298###############################################################################
4299# Validate JVM features once all setup is complete, including custom setup.
4300#
4301
4302
4303###############################################################################
4304# Support for old hotspot build. Remove once new hotspot build has proven
4305# to work satisfactory.
4306#
4307
4308
4309#
4310# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4311# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4312#
4313# This code is free software; you can redistribute it and/or modify it
4314# under the terms of the GNU General Public License version 2 only, as
4315# published by the Free Software Foundation.  Oracle designates this
4316# particular file as subject to the "Classpath" exception as provided
4317# by Oracle in the LICENSE file that accompanied this code.
4318#
4319# This code is distributed in the hope that it will be useful, but WITHOUT
4320# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4321# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4322# version 2 for more details (a copy is included in the LICENSE file that
4323# accompanied this code).
4324#
4325# You should have received a copy of the GNU General Public License version
4326# 2 along with this work; if not, write to the Free Software Foundation,
4327# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4328#
4329# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4330# or visit www.oracle.com if you need additional information or have any
4331# questions.
4332#
4333
4334###############################################################################
4335# Check which variant of the JDK that we want to build.
4336# Currently we have:
4337#    normal:   standard edition
4338# but the custom make system may add other variants
4339#
4340# Effectively the JDK variant gives a name to a specific set of
4341# modules to compile into the JDK.
4342
4343
4344###############################################################################
4345# Set the debug level
4346#    release: no debug information, all optimizations, no asserts.
4347#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4348#    fastdebug: debug information (-g), all optimizations, all asserts
4349#    slowdebug: debug information (-g), no optimizations, all asserts
4350
4351
4352###############################################################################
4353#
4354# Should we build only OpenJDK even if closed sources are present?
4355#
4356
4357
4358
4359
4360###############################################################################
4361#
4362# Enable or disable the elliptic curve crypto implementation
4363#
4364
4365
4366
4367
4368################################################################################
4369#
4370# Gcov coverage data for hotspot
4371#
4372
4373
4374################################################################################
4375#
4376# Static build support.  When enabled will generate static
4377# libraries instead of shared libraries for all JDK libs.
4378#
4379
4380
4381################################################################################
4382#
4383# jlink options.
4384# We always keep packaged modules in JDK image.
4385#
4386
4387
4388################################################################################
4389#
4390# Check if building of the jtreg failure handler should be enabled.
4391#
4392
4393
4394#
4395# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4396# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4397#
4398# This code is free software; you can redistribute it and/or modify it
4399# under the terms of the GNU General Public License version 2 only, as
4400# published by the Free Software Foundation.  Oracle designates this
4401# particular file as subject to the "Classpath" exception as provided
4402# by Oracle in the LICENSE file that accompanied this code.
4403#
4404# This code is distributed in the hope that it will be useful, but WITHOUT
4405# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4406# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4407# version 2 for more details (a copy is included in the LICENSE file that
4408# accompanied this code).
4409#
4410# You should have received a copy of the GNU General Public License version
4411# 2 along with this work; if not, write to the Free Software Foundation,
4412# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4413#
4414# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4415# or visit www.oracle.com if you need additional information or have any
4416# questions.
4417#
4418
4419###############################################################################
4420#
4421# Setup version numbers
4422#
4423
4424# Verify that a given string represents a valid version number, and assign it
4425# to a variable.
4426
4427# Argument 1: the variable to assign to
4428# Argument 2: the value given by the user
4429
4430
4431
4432
4433#
4434# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4435# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4436#
4437# This code is free software; you can redistribute it and/or modify it
4438# under the terms of the GNU General Public License version 2 only, as
4439# published by the Free Software Foundation.  Oracle designates this
4440# particular file as subject to the "Classpath" exception as provided
4441# by Oracle in the LICENSE file that accompanied this code.
4442#
4443# This code is distributed in the hope that it will be useful, but WITHOUT
4444# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4445# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4446# version 2 for more details (a copy is included in the LICENSE file that
4447# accompanied this code).
4448#
4449# You should have received a copy of the GNU General Public License version
4450# 2 along with this work; if not, write to the Free Software Foundation,
4451# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4452#
4453# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4454# or visit www.oracle.com if you need additional information or have any
4455# questions.
4456#
4457
4458# Major library component reside in separate files.
4459#
4460# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4461# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4462#
4463# This code is free software; you can redistribute it and/or modify it
4464# under the terms of the GNU General Public License version 2 only, as
4465# published by the Free Software Foundation.  Oracle designates this
4466# particular file as subject to the "Classpath" exception as provided
4467# by Oracle in the LICENSE file that accompanied this code.
4468#
4469# This code is distributed in the hope that it will be useful, but WITHOUT
4470# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4471# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4472# version 2 for more details (a copy is included in the LICENSE file that
4473# accompanied this code).
4474#
4475# You should have received a copy of the GNU General Public License version
4476# 2 along with this work; if not, write to the Free Software Foundation,
4477# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4478#
4479# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4480# or visit www.oracle.com if you need additional information or have any
4481# questions.
4482#
4483
4484################################################################################
4485# Setup alsa (Advanced Linux Sound Architecture)
4486################################################################################
4487
4488
4489#
4490# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4491# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4492#
4493# This code is free software; you can redistribute it and/or modify it
4494# under the terms of the GNU General Public License version 2 only, as
4495# published by the Free Software Foundation.  Oracle designates this
4496# particular file as subject to the "Classpath" exception as provided
4497# by Oracle in the LICENSE file that accompanied this code.
4498#
4499# This code is distributed in the hope that it will be useful, but WITHOUT
4500# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4501# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4502# version 2 for more details (a copy is included in the LICENSE file that
4503# accompanied this code).
4504#
4505# You should have received a copy of the GNU General Public License version
4506# 2 along with this work; if not, write to the Free Software Foundation,
4507# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4508#
4509# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4510# or visit www.oracle.com if you need additional information or have any
4511# questions.
4512#
4513
4514################################################################################
4515# Setup bundled libraries.
4516#
4517# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4518# OpenJDK repository. Default is to use these libraries as bundled, but they
4519# might be replaced by en external version by the user.
4520################################################################################
4521
4522
4523################################################################################
4524# Setup libjpeg
4525################################################################################
4526
4527
4528################################################################################
4529# Setup giflib
4530################################################################################
4531
4532
4533################################################################################
4534# Setup libpng
4535################################################################################
4536
4537
4538################################################################################
4539# Setup zlib
4540################################################################################
4541
4542
4543################################################################################
4544# Setup lcms (Little CMS)
4545################################################################################
4546
4547
4548#
4549# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4551#
4552# This code is free software; you can redistribute it and/or modify it
4553# under the terms of the GNU General Public License version 2 only, as
4554# published by the Free Software Foundation.  Oracle designates this
4555# particular file as subject to the "Classpath" exception as provided
4556# by Oracle in the LICENSE file that accompanied this code.
4557#
4558# This code is distributed in the hope that it will be useful, but WITHOUT
4559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4561# version 2 for more details (a copy is included in the LICENSE file that
4562# accompanied this code).
4563#
4564# You should have received a copy of the GNU General Public License version
4565# 2 along with this work; if not, write to the Free Software Foundation,
4566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4567#
4568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4569# or visit www.oracle.com if you need additional information or have any
4570# questions.
4571#
4572
4573################################################################################
4574# Setup cups (Common Unix Printing System)
4575################################################################################
4576
4577
4578#
4579# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4580# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4581#
4582# This code is free software; you can redistribute it and/or modify it
4583# under the terms of the GNU General Public License version 2 only, as
4584# published by the Free Software Foundation.  Oracle designates this
4585# particular file as subject to the "Classpath" exception as provided
4586# by Oracle in the LICENSE file that accompanied this code.
4587#
4588# This code is distributed in the hope that it will be useful, but WITHOUT
4589# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4590# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4591# version 2 for more details (a copy is included in the LICENSE file that
4592# accompanied this code).
4593#
4594# You should have received a copy of the GNU General Public License version
4595# 2 along with this work; if not, write to the Free Software Foundation,
4596# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4597#
4598# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4599# or visit www.oracle.com if you need additional information or have any
4600# questions.
4601#
4602
4603################################################################################
4604# Setup libffi (Foreign Function Interface)
4605################################################################################
4606
4607
4608#
4609# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4610# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4611#
4612# This code is free software; you can redistribute it and/or modify it
4613# under the terms of the GNU General Public License version 2 only, as
4614# published by the Free Software Foundation.  Oracle designates this
4615# particular file as subject to the "Classpath" exception as provided
4616# by Oracle in the LICENSE file that accompanied this code.
4617#
4618# This code is distributed in the hope that it will be useful, but WITHOUT
4619# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4620# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4621# version 2 for more details (a copy is included in the LICENSE file that
4622# accompanied this code).
4623#
4624# You should have received a copy of the GNU General Public License version
4625# 2 along with this work; if not, write to the Free Software Foundation,
4626# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4627#
4628# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4629# or visit www.oracle.com if you need additional information or have any
4630# questions.
4631#
4632
4633################################################################################
4634# Build the freetype lib from source
4635################################################################################
4636
4637
4638################################################################################
4639# Check if a potential freeype library match is correct and usable
4640################################################################################
4641
4642
4643################################################################################
4644# Setup freetype (The FreeType2 font rendering library)
4645################################################################################
4646
4647
4648#
4649# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4650# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4651#
4652# This code is free software; you can redistribute it and/or modify it
4653# under the terms of the GNU General Public License version 2 only, as
4654# published by the Free Software Foundation.  Oracle designates this
4655# particular file as subject to the "Classpath" exception as provided
4656# by Oracle in the LICENSE file that accompanied this code.
4657#
4658# This code is distributed in the hope that it will be useful, but WITHOUT
4659# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4660# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4661# version 2 for more details (a copy is included in the LICENSE file that
4662# accompanied this code).
4663#
4664# You should have received a copy of the GNU General Public License version
4665# 2 along with this work; if not, write to the Free Software Foundation,
4666# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4667#
4668# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4669# or visit www.oracle.com if you need additional information or have any
4670# questions.
4671#
4672
4673################################################################################
4674# Setup the standard C/C++ runtime libraries.
4675#
4676# Most importantly, determine if stdc++ should be linked statically or
4677# dynamically.
4678################################################################################
4679
4680
4681#
4682# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4683# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4684#
4685# This code is free software; you can redistribute it and/or modify it
4686# under the terms of the GNU General Public License version 2 only, as
4687# published by the Free Software Foundation.  Oracle designates this
4688# particular file as subject to the "Classpath" exception as provided
4689# by Oracle in the LICENSE file that accompanied this code.
4690#
4691# This code is distributed in the hope that it will be useful, but WITHOUT
4692# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4693# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4694# version 2 for more details (a copy is included in the LICENSE file that
4695# accompanied this code).
4696#
4697# You should have received a copy of the GNU General Public License version
4698# 2 along with this work; if not, write to the Free Software Foundation,
4699# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4700#
4701# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4702# or visit www.oracle.com if you need additional information or have any
4703# questions.
4704#
4705
4706################################################################################
4707# Setup X11 Windows system
4708################################################################################
4709
4710
4711
4712################################################################################
4713# Determine which libraries are needed for this configuration
4714################################################################################
4715
4716
4717################################################################################
4718# Parse library options, and setup needed libraries
4719################################################################################
4720
4721
4722################################################################################
4723# Setup llvm (Low-Level VM)
4724################################################################################
4725
4726
4727################################################################################
4728# Setup various libraries, typically small system libraries
4729################################################################################
4730
4731
4732#
4733# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4734# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4735#
4736# This code is free software; you can redistribute it and/or modify it
4737# under the terms of the GNU General Public License version 2 only, as
4738# published by the Free Software Foundation.  Oracle designates this
4739# particular file as subject to the "Classpath" exception as provided
4740# by Oracle in the LICENSE file that accompanied this code.
4741#
4742# This code is distributed in the hope that it will be useful, but WITHOUT
4743# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4744# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4745# version 2 for more details (a copy is included in the LICENSE file that
4746# accompanied this code).
4747#
4748# You should have received a copy of the GNU General Public License version
4749# 2 along with this work; if not, write to the Free Software Foundation,
4750# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4751#
4752# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4753# or visit www.oracle.com if you need additional information or have any
4754# questions.
4755#
4756
4757# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4758# Converts autoconf style CPU name to OpenJDK style, into
4759# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4760
4761
4762# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4763# Converts autoconf style OS name to OpenJDK style, into
4764# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4765
4766
4767# Expects $host_os $host_cpu $build_os and $build_cpu
4768# and $with_target_bits to have been setup!
4769#
4770# Translate the standard triplet(quadruplet) definition
4771# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4772# OPENJDK_BUILD_OS, etc.
4773
4774
4775# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4776# accordingly. Must be done after setting up build and target system, but before
4777# doing anything else with these values.
4778
4779
4780# Setup the legacy variables, for controlling the old makefiles.
4781#
4782
4783
4784# $1 - Either TARGET or BUILD to setup the variables for.
4785
4786
4787
4788
4789#%%% Build and target systems %%%
4790
4791
4792
4793
4794# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4795# Add -mX to various FLAGS variables.
4796
4797
4798
4799
4800
4801
4802#
4803# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4804# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4805#
4806# This code is free software; you can redistribute it and/or modify it
4807# under the terms of the GNU General Public License version 2 only, as
4808# published by the Free Software Foundation.  Oracle designates this
4809# particular file as subject to the "Classpath" exception as provided
4810# by Oracle in the LICENSE file that accompanied this code.
4811#
4812# This code is distributed in the hope that it will be useful, but WITHOUT
4813# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4814# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4815# version 2 for more details (a copy is included in the LICENSE file that
4816# accompanied this code).
4817#
4818# You should have received a copy of the GNU General Public License version
4819# 2 along with this work; if not, write to the Free Software Foundation,
4820# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4821#
4822# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4823# or visit www.oracle.com if you need additional information or have any
4824# questions.
4825#
4826
4827
4828
4829
4830
4831
4832
4833################################################################################
4834# Define a mechanism for importing extra prebuilt modules
4835#
4836
4837
4838
4839#
4840# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4841# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4842#
4843# This code is free software; you can redistribute it and/or modify it
4844# under the terms of the GNU General Public License version 2 only, as
4845# published by the Free Software Foundation.  Oracle designates this
4846# particular file as subject to the "Classpath" exception as provided
4847# by Oracle in the LICENSE file that accompanied this code.
4848#
4849# This code is distributed in the hope that it will be useful, but WITHOUT
4850# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4851# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4852# version 2 for more details (a copy is included in the LICENSE file that
4853# accompanied this code).
4854#
4855# You should have received a copy of the GNU General Public License version
4856# 2 along with this work; if not, write to the Free Software Foundation,
4857# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4858#
4859# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4860# or visit www.oracle.com if you need additional information or have any
4861# questions.
4862#
4863
4864########################################################################
4865# This file is responsible for detecting, verifying and setting up the
4866# toolchain, i.e. the compiler, linker and related utilities. It will setup
4867# proper paths to the binaries, but it will not setup any flags.
4868#
4869# The binaries used is determined by the toolchain type, which is the family of
4870# compilers and related tools that are used.
4871########################################################################
4872
4873
4874# All valid toolchains, regardless of platform (used by help.m4)
4875VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4876
4877# These toolchains are valid on different platforms
4878VALID_TOOLCHAINS_linux="gcc clang"
4879VALID_TOOLCHAINS_solaris="solstudio"
4880VALID_TOOLCHAINS_macosx="gcc clang"
4881VALID_TOOLCHAINS_aix="xlc"
4882VALID_TOOLCHAINS_windows="microsoft"
4883
4884# Toolchain descriptions
4885TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4886TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4887TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4888TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4889TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4890
4891# Minimum supported versions, empty means unspecified
4892TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4893TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4894TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4895TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4896TOOLCHAIN_MINIMUM_VERSION_xlc=""
4897
4898# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4899# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4900
4901
4902# Check if the configured compiler (C and C++) is of a specific version or
4903# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4904#
4905# Arguments:
4906#   VERSION:   The version string to check against the found version
4907#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4908#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4909
4910
4911
4912
4913# Setup a number of variables describing how native output files are
4914# named on this platform/toolchain.
4915
4916
4917# Determine which toolchain type to use, and make sure it is valid for this
4918# platform. Setup various information about the selected toolchain.
4919
4920
4921# Before we start detecting the toolchain executables, we might need some
4922# special setup, e.g. additional paths etc.
4923
4924
4925# Restore path, etc
4926
4927
4928# Check if a compiler is of the toolchain type we expect, and save the version
4929# information from it. If the compiler does not match the expected type,
4930# this function will abort using AC_MSG_ERROR. If it matches, the version will
4931# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4932# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4933#
4934# $1 = compiler to test (CC or CXX)
4935# $2 = human readable name of compiler (C or C++)
4936
4937
4938# Try to locate the given C or C++ compiler in the path, or otherwise.
4939#
4940# $1 = compiler to test (CC or CXX)
4941# $2 = human readable name of compiler (C or C++)
4942# $3 = list of compiler names to search for
4943
4944
4945# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4946# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4947# archiver (AR). Verify that the compilers are correct according to the
4948# toolchain type.
4949
4950
4951# Setup additional tools that is considered a part of the toolchain, but not the
4952# core part. Many of these are highly platform-specific and do not exist,
4953# and/or are not needed on all platforms.
4954
4955
4956# Setup the build tools (i.e, the compiler and linker used to build programs
4957# that should be run on the build platform, not the target platform, as a build
4958# helper). Since the non-cross-compile case uses the normal, target compilers
4959# for this, we can only do this after these have been setup.
4960
4961
4962# Setup legacy variables that are still needed as alternative ways to refer to
4963# parts of the toolchain.
4964
4965
4966# Do some additional checks on the detected tools.
4967
4968
4969# Setup the JTReg Regression Test Harness.
4970
4971
4972#
4973# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4974# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4975#
4976# This code is free software; you can redistribute it and/or modify it
4977# under the terms of the GNU General Public License version 2 only, as
4978# published by the Free Software Foundation.  Oracle designates this
4979# particular file as subject to the "Classpath" exception as provided
4980# by Oracle in the LICENSE file that accompanied this code.
4981#
4982# This code is distributed in the hope that it will be useful, but WITHOUT
4983# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4984# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4985# version 2 for more details (a copy is included in the LICENSE file that
4986# accompanied this code).
4987#
4988# You should have received a copy of the GNU General Public License version
4989# 2 along with this work; if not, write to the Free Software Foundation,
4990# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4991#
4992# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4993# or visit www.oracle.com if you need additional information or have any
4994# questions.
4995#
4996
4997################################################################################
4998# The order of these defines the priority by which we try to find them.
4999VALID_VS_VERSIONS="2013 2012 2010"
5000
5001VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5002VS_VERSION_INTERNAL_2010=100
5003VS_MSVCR_2010=msvcr100.dll
5004# We don't use msvcp on Visual Studio 2010
5005#VS_MSVCP_2010=msvcp100.dll
5006VS_ENVVAR_2010="VS100COMNTOOLS"
5007VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5008VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5009VS_VS_PLATFORM_NAME_2010="v100"
5010VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5011
5012VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5013VS_VERSION_INTERNAL_2012=110
5014VS_MSVCR_2012=msvcr110.dll
5015VS_MSVCP_2012=msvcp110.dll
5016VS_ENVVAR_2012="VS110COMNTOOLS"
5017VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5018VS_SDK_INSTALLDIR_2012=
5019VS_VS_PLATFORM_NAME_2012="v110"
5020VS_SDK_PLATFORM_NAME_2012=
5021
5022VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5023VS_VERSION_INTERNAL_2013=120
5024VS_MSVCR_2013=msvcr120.dll
5025VS_MSVCP_2013=msvcp120.dll
5026VS_ENVVAR_2013="VS120COMNTOOLS"
5027VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5028VS_SDK_INSTALLDIR_2013=
5029VS_VS_PLATFORM_NAME_2013="v120"
5030VS_SDK_PLATFORM_NAME_2013=
5031
5032################################################################################
5033
5034
5035
5036################################################################################
5037
5038
5039
5040################################################################################
5041# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5042# build environment and assigns it to VS_ENV_CMD
5043
5044
5045################################################################################
5046
5047
5048
5049################################################################################
5050# Check if the VS env variables were setup prior to running configure.
5051# If not, then find vcvarsall.bat and run it automatically, and integrate
5052# the set env variables into the spec file.
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067# This line needs to be here, verbatim, after all includes and the dummy hook
5068# definitions. It is replaced with custom functionality when building
5069# custom sources.
5070#CUSTOM_AUTOCONF_INCLUDE
5071
5072# Do not change or remove the following line, it is needed for consistency checks:
5073DATE_WHEN_GENERATED=1462194239
5074
5075###############################################################################
5076#
5077# Initialization / Boot-strapping
5078#
5079# The bootstrapping process needs to solve the "chicken or the egg" problem,
5080# thus it jumps back and forth, each time gaining something needed later on.
5081#
5082###############################################################################
5083
5084# If we are requested to print additional help, do that and then exit.
5085# This must be the very first call.
5086
5087  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5088
5089    # Print available toolchains
5090    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5091    $PRINTF "Which are valid to use depends on the build platform.\n"
5092    for toolchain in $VALID_TOOLCHAINS_all; do
5093      # Use indirect variable referencing
5094      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5095      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5096      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5097    done
5098    $PRINTF "\n"
5099
5100    # Print available jvm features
5101    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5102    $PRINTF "Which are valid to use depends on the target platform.\n  "
5103    $PRINTF "%s " $VALID_JVM_FEATURES
5104    $PRINTF "\n"
5105
5106    # And now exit directly
5107    exit 0
5108  fi
5109
5110
5111# Basic initialization that must happen first of all in the normal process.
5112
5113  # Save the original command line. This is passed to us by the wrapper configure script.
5114
5115  # Save the path variable before it gets changed
5116  ORIGINAL_PATH="$PATH"
5117
5118  DATE_WHEN_CONFIGURED=`LANG=C date`
5119
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5121$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5122  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5123$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5124
5125
5126  # Start with tools that do not need have cross compilation support
5127  # and can be expected to be found in the default PATH. These tools are
5128  # used by configure.
5129
5130  # First are all the simple required tools.
5131
5132
5133
5134  # Publish this variable in the help.
5135
5136
5137  if [ -z "${BASENAME+x}" ]; then
5138    # The variable is not set by user, try to locate tool using the code snippet
5139    for ac_prog in basename
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_BASENAME+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $BASENAME in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171BASENAME=$ac_cv_path_BASENAME
5172if test -n "$BASENAME"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5174$as_echo "$BASENAME" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$BASENAME" && break
5182done
5183
5184  else
5185    # The variable is set, but is it from the command line or the environment?
5186
5187    # Try to remove the string !BASENAME! from our list.
5188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5190      # If it failed, the variable was not from the command line. Ignore it,
5191      # but warn the user (except for BASH, which is always set by the calling BASH).
5192      if test "xBASENAME" != xBASH; then
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5194$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5195      fi
5196      # Try to locate tool using the code snippet
5197      for ac_prog in basename
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_BASENAME+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $BASENAME in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229BASENAME=$ac_cv_path_BASENAME
5230if test -n "$BASENAME"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5232$as_echo "$BASENAME" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$BASENAME" && break
5240done
5241
5242    else
5243      # If it succeeded, then it was overridden by the user. We will use it
5244      # for the tool.
5245
5246      # First remove it from the list of overridden variables, so we can test
5247      # for unknown variables in the end.
5248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5249
5250      # Check if we try to supply an empty value
5251      if test "x$BASENAME" = x; then
5252        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5253$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5254        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5255$as_echo_n "checking for BASENAME... " >&6; }
5256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5257$as_echo "disabled" >&6; }
5258      else
5259        # Check if the provided tool contains a complete path.
5260        tool_specified="$BASENAME"
5261        tool_basename="${tool_specified##*/}"
5262        if test "x$tool_basename" = "x$tool_specified"; then
5263          # A command without a complete path is provided, search $PATH.
5264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5265$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5266          # Extract the first word of "$tool_basename", so it can be a program name with args.
5267set dummy $tool_basename; ac_word=$2
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5269$as_echo_n "checking for $ac_word... " >&6; }
5270if ${ac_cv_path_BASENAME+:} false; then :
5271  $as_echo_n "(cached) " >&6
5272else
5273  case $BASENAME in
5274  [\\/]* | ?:[\\/]*)
5275  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5276  ;;
5277  *)
5278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5279for as_dir in $PATH
5280do
5281  IFS=$as_save_IFS
5282  test -z "$as_dir" && as_dir=.
5283    for ac_exec_ext in '' $ac_executable_extensions; do
5284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5285    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5287    break 2
5288  fi
5289done
5290  done
5291IFS=$as_save_IFS
5292
5293  ;;
5294esac
5295fi
5296BASENAME=$ac_cv_path_BASENAME
5297if test -n "$BASENAME"; then
5298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5299$as_echo "$BASENAME" >&6; }
5300else
5301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5302$as_echo "no" >&6; }
5303fi
5304
5305
5306          if test "x$BASENAME" = x; then
5307            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5308          fi
5309        else
5310          # Otherwise we believe it is a complete path. Use it as it is.
5311          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5312$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5313          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5314$as_echo_n "checking for BASENAME... " >&6; }
5315          if test ! -x "$tool_specified"; then
5316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5317$as_echo "not found" >&6; }
5318            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5319          fi
5320          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5321$as_echo "$tool_specified" >&6; }
5322        fi
5323      fi
5324    fi
5325
5326  fi
5327
5328
5329
5330  if test "x$BASENAME" = x; then
5331    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5332  fi
5333
5334
5335
5336
5337
5338  # Publish this variable in the help.
5339
5340
5341  if [ -z "${BASH+x}" ]; then
5342    # The variable is not set by user, try to locate tool using the code snippet
5343    for ac_prog in bash
5344do
5345  # Extract the first word of "$ac_prog", so it can be a program name with args.
5346set dummy $ac_prog; ac_word=$2
5347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5348$as_echo_n "checking for $ac_word... " >&6; }
5349if ${ac_cv_path_BASH+:} false; then :
5350  $as_echo_n "(cached) " >&6
5351else
5352  case $BASH in
5353  [\\/]* | ?:[\\/]*)
5354  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5355  ;;
5356  *)
5357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5358for as_dir in $PATH
5359do
5360  IFS=$as_save_IFS
5361  test -z "$as_dir" && as_dir=.
5362    for ac_exec_ext in '' $ac_executable_extensions; do
5363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5364    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5366    break 2
5367  fi
5368done
5369  done
5370IFS=$as_save_IFS
5371
5372  ;;
5373esac
5374fi
5375BASH=$ac_cv_path_BASH
5376if test -n "$BASH"; then
5377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5378$as_echo "$BASH" >&6; }
5379else
5380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5381$as_echo "no" >&6; }
5382fi
5383
5384
5385  test -n "$BASH" && break
5386done
5387
5388  else
5389    # The variable is set, but is it from the command line or the environment?
5390
5391    # Try to remove the string !BASH! from our list.
5392    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5393    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5394      # If it failed, the variable was not from the command line. Ignore it,
5395      # but warn the user (except for BASH, which is always set by the calling BASH).
5396      if test "xBASH" != xBASH; then
5397        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5398$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5399      fi
5400      # Try to locate tool using the code snippet
5401      for ac_prog in bash
5402do
5403  # Extract the first word of "$ac_prog", so it can be a program name with args.
5404set dummy $ac_prog; ac_word=$2
5405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5406$as_echo_n "checking for $ac_word... " >&6; }
5407if ${ac_cv_path_BASH+:} false; then :
5408  $as_echo_n "(cached) " >&6
5409else
5410  case $BASH in
5411  [\\/]* | ?:[\\/]*)
5412  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5413  ;;
5414  *)
5415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5416for as_dir in $PATH
5417do
5418  IFS=$as_save_IFS
5419  test -z "$as_dir" && as_dir=.
5420    for ac_exec_ext in '' $ac_executable_extensions; do
5421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5422    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5424    break 2
5425  fi
5426done
5427  done
5428IFS=$as_save_IFS
5429
5430  ;;
5431esac
5432fi
5433BASH=$ac_cv_path_BASH
5434if test -n "$BASH"; then
5435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5436$as_echo "$BASH" >&6; }
5437else
5438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5439$as_echo "no" >&6; }
5440fi
5441
5442
5443  test -n "$BASH" && break
5444done
5445
5446    else
5447      # If it succeeded, then it was overridden by the user. We will use it
5448      # for the tool.
5449
5450      # First remove it from the list of overridden variables, so we can test
5451      # for unknown variables in the end.
5452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5453
5454      # Check if we try to supply an empty value
5455      if test "x$BASH" = x; then
5456        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5457$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5458        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5459$as_echo_n "checking for BASH... " >&6; }
5460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5461$as_echo "disabled" >&6; }
5462      else
5463        # Check if the provided tool contains a complete path.
5464        tool_specified="$BASH"
5465        tool_basename="${tool_specified##*/}"
5466        if test "x$tool_basename" = "x$tool_specified"; then
5467          # A command without a complete path is provided, search $PATH.
5468          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5469$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5470          # Extract the first word of "$tool_basename", so it can be a program name with args.
5471set dummy $tool_basename; ac_word=$2
5472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5473$as_echo_n "checking for $ac_word... " >&6; }
5474if ${ac_cv_path_BASH+:} false; then :
5475  $as_echo_n "(cached) " >&6
5476else
5477  case $BASH in
5478  [\\/]* | ?:[\\/]*)
5479  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5480  ;;
5481  *)
5482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5483for as_dir in $PATH
5484do
5485  IFS=$as_save_IFS
5486  test -z "$as_dir" && as_dir=.
5487    for ac_exec_ext in '' $ac_executable_extensions; do
5488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5489    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5491    break 2
5492  fi
5493done
5494  done
5495IFS=$as_save_IFS
5496
5497  ;;
5498esac
5499fi
5500BASH=$ac_cv_path_BASH
5501if test -n "$BASH"; then
5502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5503$as_echo "$BASH" >&6; }
5504else
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
5507fi
5508
5509
5510          if test "x$BASH" = x; then
5511            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5512          fi
5513        else
5514          # Otherwise we believe it is a complete path. Use it as it is.
5515          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5516$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5517          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5518$as_echo_n "checking for BASH... " >&6; }
5519          if test ! -x "$tool_specified"; then
5520            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5521$as_echo "not found" >&6; }
5522            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5523          fi
5524          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5525$as_echo "$tool_specified" >&6; }
5526        fi
5527      fi
5528    fi
5529
5530  fi
5531
5532
5533
5534  if test "x$BASH" = x; then
5535    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5536  fi
5537
5538
5539
5540
5541
5542  # Publish this variable in the help.
5543
5544
5545  if [ -z "${CAT+x}" ]; then
5546    # The variable is not set by user, try to locate tool using the code snippet
5547    for ac_prog in cat
5548do
5549  # Extract the first word of "$ac_prog", so it can be a program name with args.
5550set dummy $ac_prog; ac_word=$2
5551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5552$as_echo_n "checking for $ac_word... " >&6; }
5553if ${ac_cv_path_CAT+:} false; then :
5554  $as_echo_n "(cached) " >&6
5555else
5556  case $CAT in
5557  [\\/]* | ?:[\\/]*)
5558  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5559  ;;
5560  *)
5561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5562for as_dir in $PATH
5563do
5564  IFS=$as_save_IFS
5565  test -z "$as_dir" && as_dir=.
5566    for ac_exec_ext in '' $ac_executable_extensions; do
5567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5568    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5570    break 2
5571  fi
5572done
5573  done
5574IFS=$as_save_IFS
5575
5576  ;;
5577esac
5578fi
5579CAT=$ac_cv_path_CAT
5580if test -n "$CAT"; then
5581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5582$as_echo "$CAT" >&6; }
5583else
5584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5585$as_echo "no" >&6; }
5586fi
5587
5588
5589  test -n "$CAT" && break
5590done
5591
5592  else
5593    # The variable is set, but is it from the command line or the environment?
5594
5595    # Try to remove the string !CAT! from our list.
5596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5598      # If it failed, the variable was not from the command line. Ignore it,
5599      # but warn the user (except for BASH, which is always set by the calling BASH).
5600      if test "xCAT" != xBASH; then
5601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5602$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5603      fi
5604      # Try to locate tool using the code snippet
5605      for ac_prog in cat
5606do
5607  # Extract the first word of "$ac_prog", so it can be a program name with args.
5608set dummy $ac_prog; ac_word=$2
5609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5610$as_echo_n "checking for $ac_word... " >&6; }
5611if ${ac_cv_path_CAT+:} false; then :
5612  $as_echo_n "(cached) " >&6
5613else
5614  case $CAT in
5615  [\\/]* | ?:[\\/]*)
5616  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5617  ;;
5618  *)
5619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5620for as_dir in $PATH
5621do
5622  IFS=$as_save_IFS
5623  test -z "$as_dir" && as_dir=.
5624    for ac_exec_ext in '' $ac_executable_extensions; do
5625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5626    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5628    break 2
5629  fi
5630done
5631  done
5632IFS=$as_save_IFS
5633
5634  ;;
5635esac
5636fi
5637CAT=$ac_cv_path_CAT
5638if test -n "$CAT"; then
5639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5640$as_echo "$CAT" >&6; }
5641else
5642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5643$as_echo "no" >&6; }
5644fi
5645
5646
5647  test -n "$CAT" && break
5648done
5649
5650    else
5651      # If it succeeded, then it was overridden by the user. We will use it
5652      # for the tool.
5653
5654      # First remove it from the list of overridden variables, so we can test
5655      # for unknown variables in the end.
5656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5657
5658      # Check if we try to supply an empty value
5659      if test "x$CAT" = x; then
5660        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5661$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5662        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5663$as_echo_n "checking for CAT... " >&6; }
5664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5665$as_echo "disabled" >&6; }
5666      else
5667        # Check if the provided tool contains a complete path.
5668        tool_specified="$CAT"
5669        tool_basename="${tool_specified##*/}"
5670        if test "x$tool_basename" = "x$tool_specified"; then
5671          # A command without a complete path is provided, search $PATH.
5672          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5673$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5674          # Extract the first word of "$tool_basename", so it can be a program name with args.
5675set dummy $tool_basename; ac_word=$2
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677$as_echo_n "checking for $ac_word... " >&6; }
5678if ${ac_cv_path_CAT+:} false; then :
5679  $as_echo_n "(cached) " >&6
5680else
5681  case $CAT in
5682  [\\/]* | ?:[\\/]*)
5683  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5684  ;;
5685  *)
5686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5687for as_dir in $PATH
5688do
5689  IFS=$as_save_IFS
5690  test -z "$as_dir" && as_dir=.
5691    for ac_exec_ext in '' $ac_executable_extensions; do
5692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5693    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5695    break 2
5696  fi
5697done
5698  done
5699IFS=$as_save_IFS
5700
5701  ;;
5702esac
5703fi
5704CAT=$ac_cv_path_CAT
5705if test -n "$CAT"; then
5706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5707$as_echo "$CAT" >&6; }
5708else
5709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5710$as_echo "no" >&6; }
5711fi
5712
5713
5714          if test "x$CAT" = x; then
5715            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5716          fi
5717        else
5718          # Otherwise we believe it is a complete path. Use it as it is.
5719          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5720$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5721          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5722$as_echo_n "checking for CAT... " >&6; }
5723          if test ! -x "$tool_specified"; then
5724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5725$as_echo "not found" >&6; }
5726            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5727          fi
5728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5729$as_echo "$tool_specified" >&6; }
5730        fi
5731      fi
5732    fi
5733
5734  fi
5735
5736
5737
5738  if test "x$CAT" = x; then
5739    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5740  fi
5741
5742
5743
5744
5745
5746  # Publish this variable in the help.
5747
5748
5749  if [ -z "${CHMOD+x}" ]; then
5750    # The variable is not set by user, try to locate tool using the code snippet
5751    for ac_prog in chmod
5752do
5753  # Extract the first word of "$ac_prog", so it can be a program name with args.
5754set dummy $ac_prog; ac_word=$2
5755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5756$as_echo_n "checking for $ac_word... " >&6; }
5757if ${ac_cv_path_CHMOD+:} false; then :
5758  $as_echo_n "(cached) " >&6
5759else
5760  case $CHMOD in
5761  [\\/]* | ?:[\\/]*)
5762  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5763  ;;
5764  *)
5765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768  IFS=$as_save_IFS
5769  test -z "$as_dir" && as_dir=.
5770    for ac_exec_ext in '' $ac_executable_extensions; do
5771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5772    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5774    break 2
5775  fi
5776done
5777  done
5778IFS=$as_save_IFS
5779
5780  ;;
5781esac
5782fi
5783CHMOD=$ac_cv_path_CHMOD
5784if test -n "$CHMOD"; then
5785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5786$as_echo "$CHMOD" >&6; }
5787else
5788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5789$as_echo "no" >&6; }
5790fi
5791
5792
5793  test -n "$CHMOD" && break
5794done
5795
5796  else
5797    # The variable is set, but is it from the command line or the environment?
5798
5799    # Try to remove the string !CHMOD! from our list.
5800    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5801    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5802      # If it failed, the variable was not from the command line. Ignore it,
5803      # but warn the user (except for BASH, which is always set by the calling BASH).
5804      if test "xCHMOD" != xBASH; then
5805        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5806$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5807      fi
5808      # Try to locate tool using the code snippet
5809      for ac_prog in chmod
5810do
5811  # Extract the first word of "$ac_prog", so it can be a program name with args.
5812set dummy $ac_prog; ac_word=$2
5813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5814$as_echo_n "checking for $ac_word... " >&6; }
5815if ${ac_cv_path_CHMOD+:} false; then :
5816  $as_echo_n "(cached) " >&6
5817else
5818  case $CHMOD in
5819  [\\/]* | ?:[\\/]*)
5820  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5821  ;;
5822  *)
5823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5824for as_dir in $PATH
5825do
5826  IFS=$as_save_IFS
5827  test -z "$as_dir" && as_dir=.
5828    for ac_exec_ext in '' $ac_executable_extensions; do
5829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5830    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5832    break 2
5833  fi
5834done
5835  done
5836IFS=$as_save_IFS
5837
5838  ;;
5839esac
5840fi
5841CHMOD=$ac_cv_path_CHMOD
5842if test -n "$CHMOD"; then
5843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5844$as_echo "$CHMOD" >&6; }
5845else
5846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5847$as_echo "no" >&6; }
5848fi
5849
5850
5851  test -n "$CHMOD" && break
5852done
5853
5854    else
5855      # If it succeeded, then it was overridden by the user. We will use it
5856      # for the tool.
5857
5858      # First remove it from the list of overridden variables, so we can test
5859      # for unknown variables in the end.
5860      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5861
5862      # Check if we try to supply an empty value
5863      if test "x$CHMOD" = x; then
5864        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5865$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5866        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5867$as_echo_n "checking for CHMOD... " >&6; }
5868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5869$as_echo "disabled" >&6; }
5870      else
5871        # Check if the provided tool contains a complete path.
5872        tool_specified="$CHMOD"
5873        tool_basename="${tool_specified##*/}"
5874        if test "x$tool_basename" = "x$tool_specified"; then
5875          # A command without a complete path is provided, search $PATH.
5876          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5877$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5878          # Extract the first word of "$tool_basename", so it can be a program name with args.
5879set dummy $tool_basename; ac_word=$2
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5881$as_echo_n "checking for $ac_word... " >&6; }
5882if ${ac_cv_path_CHMOD+:} false; then :
5883  $as_echo_n "(cached) " >&6
5884else
5885  case $CHMOD in
5886  [\\/]* | ?:[\\/]*)
5887  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5888  ;;
5889  *)
5890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5891for as_dir in $PATH
5892do
5893  IFS=$as_save_IFS
5894  test -z "$as_dir" && as_dir=.
5895    for ac_exec_ext in '' $ac_executable_extensions; do
5896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5897    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5899    break 2
5900  fi
5901done
5902  done
5903IFS=$as_save_IFS
5904
5905  ;;
5906esac
5907fi
5908CHMOD=$ac_cv_path_CHMOD
5909if test -n "$CHMOD"; then
5910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5911$as_echo "$CHMOD" >&6; }
5912else
5913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914$as_echo "no" >&6; }
5915fi
5916
5917
5918          if test "x$CHMOD" = x; then
5919            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5920          fi
5921        else
5922          # Otherwise we believe it is a complete path. Use it as it is.
5923          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5924$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5925          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5926$as_echo_n "checking for CHMOD... " >&6; }
5927          if test ! -x "$tool_specified"; then
5928            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5929$as_echo "not found" >&6; }
5930            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5931          fi
5932          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5933$as_echo "$tool_specified" >&6; }
5934        fi
5935      fi
5936    fi
5937
5938  fi
5939
5940
5941
5942  if test "x$CHMOD" = x; then
5943    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5944  fi
5945
5946
5947
5948
5949
5950  # Publish this variable in the help.
5951
5952
5953  if [ -z "${CMP+x}" ]; then
5954    # The variable is not set by user, try to locate tool using the code snippet
5955    for ac_prog in cmp
5956do
5957  # Extract the first word of "$ac_prog", so it can be a program name with args.
5958set dummy $ac_prog; ac_word=$2
5959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5960$as_echo_n "checking for $ac_word... " >&6; }
5961if ${ac_cv_path_CMP+:} false; then :
5962  $as_echo_n "(cached) " >&6
5963else
5964  case $CMP in
5965  [\\/]* | ?:[\\/]*)
5966  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5967  ;;
5968  *)
5969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5970for as_dir in $PATH
5971do
5972  IFS=$as_save_IFS
5973  test -z "$as_dir" && as_dir=.
5974    for ac_exec_ext in '' $ac_executable_extensions; do
5975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5976    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5978    break 2
5979  fi
5980done
5981  done
5982IFS=$as_save_IFS
5983
5984  ;;
5985esac
5986fi
5987CMP=$ac_cv_path_CMP
5988if test -n "$CMP"; then
5989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5990$as_echo "$CMP" >&6; }
5991else
5992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5993$as_echo "no" >&6; }
5994fi
5995
5996
5997  test -n "$CMP" && break
5998done
5999
6000  else
6001    # The variable is set, but is it from the command line or the environment?
6002
6003    # Try to remove the string !CMP! from our list.
6004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6006      # If it failed, the variable was not from the command line. Ignore it,
6007      # but warn the user (except for BASH, which is always set by the calling BASH).
6008      if test "xCMP" != xBASH; then
6009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6010$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6011      fi
6012      # Try to locate tool using the code snippet
6013      for ac_prog in cmp
6014do
6015  # Extract the first word of "$ac_prog", so it can be a program name with args.
6016set dummy $ac_prog; ac_word=$2
6017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6018$as_echo_n "checking for $ac_word... " >&6; }
6019if ${ac_cv_path_CMP+:} false; then :
6020  $as_echo_n "(cached) " >&6
6021else
6022  case $CMP in
6023  [\\/]* | ?:[\\/]*)
6024  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6025  ;;
6026  *)
6027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6028for as_dir in $PATH
6029do
6030  IFS=$as_save_IFS
6031  test -z "$as_dir" && as_dir=.
6032    for ac_exec_ext in '' $ac_executable_extensions; do
6033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6034    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6036    break 2
6037  fi
6038done
6039  done
6040IFS=$as_save_IFS
6041
6042  ;;
6043esac
6044fi
6045CMP=$ac_cv_path_CMP
6046if test -n "$CMP"; then
6047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6048$as_echo "$CMP" >&6; }
6049else
6050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6051$as_echo "no" >&6; }
6052fi
6053
6054
6055  test -n "$CMP" && break
6056done
6057
6058    else
6059      # If it succeeded, then it was overridden by the user. We will use it
6060      # for the tool.
6061
6062      # First remove it from the list of overridden variables, so we can test
6063      # for unknown variables in the end.
6064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6065
6066      # Check if we try to supply an empty value
6067      if test "x$CMP" = x; then
6068        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6069$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6071$as_echo_n "checking for CMP... " >&6; }
6072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6073$as_echo "disabled" >&6; }
6074      else
6075        # Check if the provided tool contains a complete path.
6076        tool_specified="$CMP"
6077        tool_basename="${tool_specified##*/}"
6078        if test "x$tool_basename" = "x$tool_specified"; then
6079          # A command without a complete path is provided, search $PATH.
6080          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6081$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6082          # Extract the first word of "$tool_basename", so it can be a program name with args.
6083set dummy $tool_basename; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_path_CMP+:} false; then :
6087  $as_echo_n "(cached) " >&6
6088else
6089  case $CMP in
6090  [\\/]* | ?:[\\/]*)
6091  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6092  ;;
6093  *)
6094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6095for as_dir in $PATH
6096do
6097  IFS=$as_save_IFS
6098  test -z "$as_dir" && as_dir=.
6099    for ac_exec_ext in '' $ac_executable_extensions; do
6100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6101    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6103    break 2
6104  fi
6105done
6106  done
6107IFS=$as_save_IFS
6108
6109  ;;
6110esac
6111fi
6112CMP=$ac_cv_path_CMP
6113if test -n "$CMP"; then
6114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6115$as_echo "$CMP" >&6; }
6116else
6117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6118$as_echo "no" >&6; }
6119fi
6120
6121
6122          if test "x$CMP" = x; then
6123            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6124          fi
6125        else
6126          # Otherwise we believe it is a complete path. Use it as it is.
6127          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6128$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6129          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6130$as_echo_n "checking for CMP... " >&6; }
6131          if test ! -x "$tool_specified"; then
6132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6133$as_echo "not found" >&6; }
6134            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6135          fi
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6137$as_echo "$tool_specified" >&6; }
6138        fi
6139      fi
6140    fi
6141
6142  fi
6143
6144
6145
6146  if test "x$CMP" = x; then
6147    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6148  fi
6149
6150
6151
6152
6153
6154  # Publish this variable in the help.
6155
6156
6157  if [ -z "${COMM+x}" ]; then
6158    # The variable is not set by user, try to locate tool using the code snippet
6159    for ac_prog in comm
6160do
6161  # Extract the first word of "$ac_prog", so it can be a program name with args.
6162set dummy $ac_prog; ac_word=$2
6163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6164$as_echo_n "checking for $ac_word... " >&6; }
6165if ${ac_cv_path_COMM+:} false; then :
6166  $as_echo_n "(cached) " >&6
6167else
6168  case $COMM in
6169  [\\/]* | ?:[\\/]*)
6170  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6171  ;;
6172  *)
6173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176  IFS=$as_save_IFS
6177  test -z "$as_dir" && as_dir=.
6178    for ac_exec_ext in '' $ac_executable_extensions; do
6179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6180    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182    break 2
6183  fi
6184done
6185  done
6186IFS=$as_save_IFS
6187
6188  ;;
6189esac
6190fi
6191COMM=$ac_cv_path_COMM
6192if test -n "$COMM"; then
6193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6194$as_echo "$COMM" >&6; }
6195else
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6197$as_echo "no" >&6; }
6198fi
6199
6200
6201  test -n "$COMM" && break
6202done
6203
6204  else
6205    # The variable is set, but is it from the command line or the environment?
6206
6207    # Try to remove the string !COMM! from our list.
6208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6210      # If it failed, the variable was not from the command line. Ignore it,
6211      # but warn the user (except for BASH, which is always set by the calling BASH).
6212      if test "xCOMM" != xBASH; then
6213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6214$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6215      fi
6216      # Try to locate tool using the code snippet
6217      for ac_prog in comm
6218do
6219  # Extract the first word of "$ac_prog", so it can be a program name with args.
6220set dummy $ac_prog; ac_word=$2
6221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6222$as_echo_n "checking for $ac_word... " >&6; }
6223if ${ac_cv_path_COMM+:} false; then :
6224  $as_echo_n "(cached) " >&6
6225else
6226  case $COMM in
6227  [\\/]* | ?:[\\/]*)
6228  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6229  ;;
6230  *)
6231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234  IFS=$as_save_IFS
6235  test -z "$as_dir" && as_dir=.
6236    for ac_exec_ext in '' $ac_executable_extensions; do
6237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6238    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240    break 2
6241  fi
6242done
6243  done
6244IFS=$as_save_IFS
6245
6246  ;;
6247esac
6248fi
6249COMM=$ac_cv_path_COMM
6250if test -n "$COMM"; then
6251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6252$as_echo "$COMM" >&6; }
6253else
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255$as_echo "no" >&6; }
6256fi
6257
6258
6259  test -n "$COMM" && break
6260done
6261
6262    else
6263      # If it succeeded, then it was overridden by the user. We will use it
6264      # for the tool.
6265
6266      # First remove it from the list of overridden variables, so we can test
6267      # for unknown variables in the end.
6268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6269
6270      # Check if we try to supply an empty value
6271      if test "x$COMM" = x; then
6272        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6273$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6275$as_echo_n "checking for COMM... " >&6; }
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6277$as_echo "disabled" >&6; }
6278      else
6279        # Check if the provided tool contains a complete path.
6280        tool_specified="$COMM"
6281        tool_basename="${tool_specified##*/}"
6282        if test "x$tool_basename" = "x$tool_specified"; then
6283          # A command without a complete path is provided, search $PATH.
6284          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6285$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6286          # Extract the first word of "$tool_basename", so it can be a program name with args.
6287set dummy $tool_basename; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if ${ac_cv_path_COMM+:} false; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  case $COMM in
6294  [\\/]* | ?:[\\/]*)
6295  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6296  ;;
6297  *)
6298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301  IFS=$as_save_IFS
6302  test -z "$as_dir" && as_dir=.
6303    for ac_exec_ext in '' $ac_executable_extensions; do
6304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6305    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307    break 2
6308  fi
6309done
6310  done
6311IFS=$as_save_IFS
6312
6313  ;;
6314esac
6315fi
6316COMM=$ac_cv_path_COMM
6317if test -n "$COMM"; then
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6319$as_echo "$COMM" >&6; }
6320else
6321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
6323fi
6324
6325
6326          if test "x$COMM" = x; then
6327            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6328          fi
6329        else
6330          # Otherwise we believe it is a complete path. Use it as it is.
6331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6332$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6333          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6334$as_echo_n "checking for COMM... " >&6; }
6335          if test ! -x "$tool_specified"; then
6336            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6337$as_echo "not found" >&6; }
6338            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6339          fi
6340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6341$as_echo "$tool_specified" >&6; }
6342        fi
6343      fi
6344    fi
6345
6346  fi
6347
6348
6349
6350  if test "x$COMM" = x; then
6351    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6352  fi
6353
6354
6355
6356
6357
6358  # Publish this variable in the help.
6359
6360
6361  if [ -z "${CP+x}" ]; then
6362    # The variable is not set by user, try to locate tool using the code snippet
6363    for ac_prog in cp
6364do
6365  # Extract the first word of "$ac_prog", so it can be a program name with args.
6366set dummy $ac_prog; ac_word=$2
6367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6368$as_echo_n "checking for $ac_word... " >&6; }
6369if ${ac_cv_path_CP+:} false; then :
6370  $as_echo_n "(cached) " >&6
6371else
6372  case $CP in
6373  [\\/]* | ?:[\\/]*)
6374  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6375  ;;
6376  *)
6377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380  IFS=$as_save_IFS
6381  test -z "$as_dir" && as_dir=.
6382    for ac_exec_ext in '' $ac_executable_extensions; do
6383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6384    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6386    break 2
6387  fi
6388done
6389  done
6390IFS=$as_save_IFS
6391
6392  ;;
6393esac
6394fi
6395CP=$ac_cv_path_CP
6396if test -n "$CP"; then
6397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6398$as_echo "$CP" >&6; }
6399else
6400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6401$as_echo "no" >&6; }
6402fi
6403
6404
6405  test -n "$CP" && break
6406done
6407
6408  else
6409    # The variable is set, but is it from the command line or the environment?
6410
6411    # Try to remove the string !CP! from our list.
6412    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6413    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6414      # If it failed, the variable was not from the command line. Ignore it,
6415      # but warn the user (except for BASH, which is always set by the calling BASH).
6416      if test "xCP" != xBASH; then
6417        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6418$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6419      fi
6420      # Try to locate tool using the code snippet
6421      for ac_prog in cp
6422do
6423  # Extract the first word of "$ac_prog", so it can be a program name with args.
6424set dummy $ac_prog; ac_word=$2
6425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6426$as_echo_n "checking for $ac_word... " >&6; }
6427if ${ac_cv_path_CP+:} false; then :
6428  $as_echo_n "(cached) " >&6
6429else
6430  case $CP in
6431  [\\/]* | ?:[\\/]*)
6432  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6433  ;;
6434  *)
6435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6436for as_dir in $PATH
6437do
6438  IFS=$as_save_IFS
6439  test -z "$as_dir" && as_dir=.
6440    for ac_exec_ext in '' $ac_executable_extensions; do
6441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6442    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6444    break 2
6445  fi
6446done
6447  done
6448IFS=$as_save_IFS
6449
6450  ;;
6451esac
6452fi
6453CP=$ac_cv_path_CP
6454if test -n "$CP"; then
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6456$as_echo "$CP" >&6; }
6457else
6458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6459$as_echo "no" >&6; }
6460fi
6461
6462
6463  test -n "$CP" && break
6464done
6465
6466    else
6467      # If it succeeded, then it was overridden by the user. We will use it
6468      # for the tool.
6469
6470      # First remove it from the list of overridden variables, so we can test
6471      # for unknown variables in the end.
6472      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6473
6474      # Check if we try to supply an empty value
6475      if test "x$CP" = x; then
6476        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6477$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6478        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6479$as_echo_n "checking for CP... " >&6; }
6480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6481$as_echo "disabled" >&6; }
6482      else
6483        # Check if the provided tool contains a complete path.
6484        tool_specified="$CP"
6485        tool_basename="${tool_specified##*/}"
6486        if test "x$tool_basename" = "x$tool_specified"; then
6487          # A command without a complete path is provided, search $PATH.
6488          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6489$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6490          # Extract the first word of "$tool_basename", so it can be a program name with args.
6491set dummy $tool_basename; ac_word=$2
6492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493$as_echo_n "checking for $ac_word... " >&6; }
6494if ${ac_cv_path_CP+:} false; then :
6495  $as_echo_n "(cached) " >&6
6496else
6497  case $CP in
6498  [\\/]* | ?:[\\/]*)
6499  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6500  ;;
6501  *)
6502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6503for as_dir in $PATH
6504do
6505  IFS=$as_save_IFS
6506  test -z "$as_dir" && as_dir=.
6507    for ac_exec_ext in '' $ac_executable_extensions; do
6508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6509    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6511    break 2
6512  fi
6513done
6514  done
6515IFS=$as_save_IFS
6516
6517  ;;
6518esac
6519fi
6520CP=$ac_cv_path_CP
6521if test -n "$CP"; then
6522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6523$as_echo "$CP" >&6; }
6524else
6525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529
6530          if test "x$CP" = x; then
6531            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6532          fi
6533        else
6534          # Otherwise we believe it is a complete path. Use it as it is.
6535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6536$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6537          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6538$as_echo_n "checking for CP... " >&6; }
6539          if test ! -x "$tool_specified"; then
6540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6541$as_echo "not found" >&6; }
6542            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6543          fi
6544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6545$as_echo "$tool_specified" >&6; }
6546        fi
6547      fi
6548    fi
6549
6550  fi
6551
6552
6553
6554  if test "x$CP" = x; then
6555    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6556  fi
6557
6558
6559
6560
6561
6562  # Publish this variable in the help.
6563
6564
6565  if [ -z "${CUT+x}" ]; then
6566    # The variable is not set by user, try to locate tool using the code snippet
6567    for ac_prog in cut
6568do
6569  # Extract the first word of "$ac_prog", so it can be a program name with args.
6570set dummy $ac_prog; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_path_CUT+:} false; then :
6574  $as_echo_n "(cached) " >&6
6575else
6576  case $CUT in
6577  [\\/]* | ?:[\\/]*)
6578  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6579  ;;
6580  *)
6581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6582for as_dir in $PATH
6583do
6584  IFS=$as_save_IFS
6585  test -z "$as_dir" && as_dir=.
6586    for ac_exec_ext in '' $ac_executable_extensions; do
6587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6588    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6590    break 2
6591  fi
6592done
6593  done
6594IFS=$as_save_IFS
6595
6596  ;;
6597esac
6598fi
6599CUT=$ac_cv_path_CUT
6600if test -n "$CUT"; then
6601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6602$as_echo "$CUT" >&6; }
6603else
6604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6605$as_echo "no" >&6; }
6606fi
6607
6608
6609  test -n "$CUT" && break
6610done
6611
6612  else
6613    # The variable is set, but is it from the command line or the environment?
6614
6615    # Try to remove the string !CUT! from our list.
6616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6618      # If it failed, the variable was not from the command line. Ignore it,
6619      # but warn the user (except for BASH, which is always set by the calling BASH).
6620      if test "xCUT" != xBASH; then
6621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6622$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6623      fi
6624      # Try to locate tool using the code snippet
6625      for ac_prog in cut
6626do
6627  # Extract the first word of "$ac_prog", so it can be a program name with args.
6628set dummy $ac_prog; ac_word=$2
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6630$as_echo_n "checking for $ac_word... " >&6; }
6631if ${ac_cv_path_CUT+:} false; then :
6632  $as_echo_n "(cached) " >&6
6633else
6634  case $CUT in
6635  [\\/]* | ?:[\\/]*)
6636  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6637  ;;
6638  *)
6639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6640for as_dir in $PATH
6641do
6642  IFS=$as_save_IFS
6643  test -z "$as_dir" && as_dir=.
6644    for ac_exec_ext in '' $ac_executable_extensions; do
6645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6646    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6648    break 2
6649  fi
6650done
6651  done
6652IFS=$as_save_IFS
6653
6654  ;;
6655esac
6656fi
6657CUT=$ac_cv_path_CUT
6658if test -n "$CUT"; then
6659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6660$as_echo "$CUT" >&6; }
6661else
6662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6663$as_echo "no" >&6; }
6664fi
6665
6666
6667  test -n "$CUT" && break
6668done
6669
6670    else
6671      # If it succeeded, then it was overridden by the user. We will use it
6672      # for the tool.
6673
6674      # First remove it from the list of overridden variables, so we can test
6675      # for unknown variables in the end.
6676      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6677
6678      # Check if we try to supply an empty value
6679      if test "x$CUT" = x; then
6680        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6681$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6683$as_echo_n "checking for CUT... " >&6; }
6684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6685$as_echo "disabled" >&6; }
6686      else
6687        # Check if the provided tool contains a complete path.
6688        tool_specified="$CUT"
6689        tool_basename="${tool_specified##*/}"
6690        if test "x$tool_basename" = "x$tool_specified"; then
6691          # A command without a complete path is provided, search $PATH.
6692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6693$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6694          # Extract the first word of "$tool_basename", so it can be a program name with args.
6695set dummy $tool_basename; ac_word=$2
6696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6697$as_echo_n "checking for $ac_word... " >&6; }
6698if ${ac_cv_path_CUT+:} false; then :
6699  $as_echo_n "(cached) " >&6
6700else
6701  case $CUT in
6702  [\\/]* | ?:[\\/]*)
6703  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6704  ;;
6705  *)
6706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6707for as_dir in $PATH
6708do
6709  IFS=$as_save_IFS
6710  test -z "$as_dir" && as_dir=.
6711    for ac_exec_ext in '' $ac_executable_extensions; do
6712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6713    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6715    break 2
6716  fi
6717done
6718  done
6719IFS=$as_save_IFS
6720
6721  ;;
6722esac
6723fi
6724CUT=$ac_cv_path_CUT
6725if test -n "$CUT"; then
6726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6727$as_echo "$CUT" >&6; }
6728else
6729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6730$as_echo "no" >&6; }
6731fi
6732
6733
6734          if test "x$CUT" = x; then
6735            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6736          fi
6737        else
6738          # Otherwise we believe it is a complete path. Use it as it is.
6739          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6740$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6741          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6742$as_echo_n "checking for CUT... " >&6; }
6743          if test ! -x "$tool_specified"; then
6744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6745$as_echo "not found" >&6; }
6746            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6747          fi
6748          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6749$as_echo "$tool_specified" >&6; }
6750        fi
6751      fi
6752    fi
6753
6754  fi
6755
6756
6757
6758  if test "x$CUT" = x; then
6759    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6760  fi
6761
6762
6763
6764
6765
6766  # Publish this variable in the help.
6767
6768
6769  if [ -z "${DATE+x}" ]; then
6770    # The variable is not set by user, try to locate tool using the code snippet
6771    for ac_prog in date
6772do
6773  # Extract the first word of "$ac_prog", so it can be a program name with args.
6774set dummy $ac_prog; ac_word=$2
6775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6776$as_echo_n "checking for $ac_word... " >&6; }
6777if ${ac_cv_path_DATE+:} false; then :
6778  $as_echo_n "(cached) " >&6
6779else
6780  case $DATE in
6781  [\\/]* | ?:[\\/]*)
6782  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6783  ;;
6784  *)
6785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6786for as_dir in $PATH
6787do
6788  IFS=$as_save_IFS
6789  test -z "$as_dir" && as_dir=.
6790    for ac_exec_ext in '' $ac_executable_extensions; do
6791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6792    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6794    break 2
6795  fi
6796done
6797  done
6798IFS=$as_save_IFS
6799
6800  ;;
6801esac
6802fi
6803DATE=$ac_cv_path_DATE
6804if test -n "$DATE"; then
6805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6806$as_echo "$DATE" >&6; }
6807else
6808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6809$as_echo "no" >&6; }
6810fi
6811
6812
6813  test -n "$DATE" && break
6814done
6815
6816  else
6817    # The variable is set, but is it from the command line or the environment?
6818
6819    # Try to remove the string !DATE! from our list.
6820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6822      # If it failed, the variable was not from the command line. Ignore it,
6823      # but warn the user (except for BASH, which is always set by the calling BASH).
6824      if test "xDATE" != xBASH; then
6825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6826$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6827      fi
6828      # Try to locate tool using the code snippet
6829      for ac_prog in date
6830do
6831  # Extract the first word of "$ac_prog", so it can be a program name with args.
6832set dummy $ac_prog; ac_word=$2
6833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6834$as_echo_n "checking for $ac_word... " >&6; }
6835if ${ac_cv_path_DATE+:} false; then :
6836  $as_echo_n "(cached) " >&6
6837else
6838  case $DATE in
6839  [\\/]* | ?:[\\/]*)
6840  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6841  ;;
6842  *)
6843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6844for as_dir in $PATH
6845do
6846  IFS=$as_save_IFS
6847  test -z "$as_dir" && as_dir=.
6848    for ac_exec_ext in '' $ac_executable_extensions; do
6849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6850    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6852    break 2
6853  fi
6854done
6855  done
6856IFS=$as_save_IFS
6857
6858  ;;
6859esac
6860fi
6861DATE=$ac_cv_path_DATE
6862if test -n "$DATE"; then
6863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6864$as_echo "$DATE" >&6; }
6865else
6866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6867$as_echo "no" >&6; }
6868fi
6869
6870
6871  test -n "$DATE" && break
6872done
6873
6874    else
6875      # If it succeeded, then it was overridden by the user. We will use it
6876      # for the tool.
6877
6878      # First remove it from the list of overridden variables, so we can test
6879      # for unknown variables in the end.
6880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6881
6882      # Check if we try to supply an empty value
6883      if test "x$DATE" = x; then
6884        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6885$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6887$as_echo_n "checking for DATE... " >&6; }
6888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6889$as_echo "disabled" >&6; }
6890      else
6891        # Check if the provided tool contains a complete path.
6892        tool_specified="$DATE"
6893        tool_basename="${tool_specified##*/}"
6894        if test "x$tool_basename" = "x$tool_specified"; then
6895          # A command without a complete path is provided, search $PATH.
6896          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6897$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6898          # Extract the first word of "$tool_basename", so it can be a program name with args.
6899set dummy $tool_basename; ac_word=$2
6900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6901$as_echo_n "checking for $ac_word... " >&6; }
6902if ${ac_cv_path_DATE+:} false; then :
6903  $as_echo_n "(cached) " >&6
6904else
6905  case $DATE in
6906  [\\/]* | ?:[\\/]*)
6907  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6908  ;;
6909  *)
6910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6911for as_dir in $PATH
6912do
6913  IFS=$as_save_IFS
6914  test -z "$as_dir" && as_dir=.
6915    for ac_exec_ext in '' $ac_executable_extensions; do
6916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6917    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6919    break 2
6920  fi
6921done
6922  done
6923IFS=$as_save_IFS
6924
6925  ;;
6926esac
6927fi
6928DATE=$ac_cv_path_DATE
6929if test -n "$DATE"; then
6930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6931$as_echo "$DATE" >&6; }
6932else
6933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6934$as_echo "no" >&6; }
6935fi
6936
6937
6938          if test "x$DATE" = x; then
6939            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6940          fi
6941        else
6942          # Otherwise we believe it is a complete path. Use it as it is.
6943          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6944$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6945          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6946$as_echo_n "checking for DATE... " >&6; }
6947          if test ! -x "$tool_specified"; then
6948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6949$as_echo "not found" >&6; }
6950            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6951          fi
6952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6953$as_echo "$tool_specified" >&6; }
6954        fi
6955      fi
6956    fi
6957
6958  fi
6959
6960
6961
6962  if test "x$DATE" = x; then
6963    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6964  fi
6965
6966
6967
6968
6969
6970  # Publish this variable in the help.
6971
6972
6973  if [ -z "${DIFF+x}" ]; then
6974    # The variable is not set by user, try to locate tool using the code snippet
6975    for ac_prog in gdiff diff
6976do
6977  # Extract the first word of "$ac_prog", so it can be a program name with args.
6978set dummy $ac_prog; ac_word=$2
6979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6980$as_echo_n "checking for $ac_word... " >&6; }
6981if ${ac_cv_path_DIFF+:} false; then :
6982  $as_echo_n "(cached) " >&6
6983else
6984  case $DIFF in
6985  [\\/]* | ?:[\\/]*)
6986  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6987  ;;
6988  *)
6989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6990for as_dir in $PATH
6991do
6992  IFS=$as_save_IFS
6993  test -z "$as_dir" && as_dir=.
6994    for ac_exec_ext in '' $ac_executable_extensions; do
6995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6996    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6998    break 2
6999  fi
7000done
7001  done
7002IFS=$as_save_IFS
7003
7004  ;;
7005esac
7006fi
7007DIFF=$ac_cv_path_DIFF
7008if test -n "$DIFF"; then
7009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7010$as_echo "$DIFF" >&6; }
7011else
7012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7013$as_echo "no" >&6; }
7014fi
7015
7016
7017  test -n "$DIFF" && break
7018done
7019
7020  else
7021    # The variable is set, but is it from the command line or the environment?
7022
7023    # Try to remove the string !DIFF! from our list.
7024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7026      # If it failed, the variable was not from the command line. Ignore it,
7027      # but warn the user (except for BASH, which is always set by the calling BASH).
7028      if test "xDIFF" != xBASH; then
7029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7030$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7031      fi
7032      # Try to locate tool using the code snippet
7033      for ac_prog in gdiff diff
7034do
7035  # Extract the first word of "$ac_prog", so it can be a program name with args.
7036set dummy $ac_prog; ac_word=$2
7037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7038$as_echo_n "checking for $ac_word... " >&6; }
7039if ${ac_cv_path_DIFF+:} false; then :
7040  $as_echo_n "(cached) " >&6
7041else
7042  case $DIFF in
7043  [\\/]* | ?:[\\/]*)
7044  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7045  ;;
7046  *)
7047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7048for as_dir in $PATH
7049do
7050  IFS=$as_save_IFS
7051  test -z "$as_dir" && as_dir=.
7052    for ac_exec_ext in '' $ac_executable_extensions; do
7053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7054    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7056    break 2
7057  fi
7058done
7059  done
7060IFS=$as_save_IFS
7061
7062  ;;
7063esac
7064fi
7065DIFF=$ac_cv_path_DIFF
7066if test -n "$DIFF"; then
7067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7068$as_echo "$DIFF" >&6; }
7069else
7070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7071$as_echo "no" >&6; }
7072fi
7073
7074
7075  test -n "$DIFF" && break
7076done
7077
7078    else
7079      # If it succeeded, then it was overridden by the user. We will use it
7080      # for the tool.
7081
7082      # First remove it from the list of overridden variables, so we can test
7083      # for unknown variables in the end.
7084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7085
7086      # Check if we try to supply an empty value
7087      if test "x$DIFF" = x; then
7088        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7089$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7090        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7091$as_echo_n "checking for DIFF... " >&6; }
7092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7093$as_echo "disabled" >&6; }
7094      else
7095        # Check if the provided tool contains a complete path.
7096        tool_specified="$DIFF"
7097        tool_basename="${tool_specified##*/}"
7098        if test "x$tool_basename" = "x$tool_specified"; then
7099          # A command without a complete path is provided, search $PATH.
7100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7101$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7102          # Extract the first word of "$tool_basename", so it can be a program name with args.
7103set dummy $tool_basename; ac_word=$2
7104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7105$as_echo_n "checking for $ac_word... " >&6; }
7106if ${ac_cv_path_DIFF+:} false; then :
7107  $as_echo_n "(cached) " >&6
7108else
7109  case $DIFF in
7110  [\\/]* | ?:[\\/]*)
7111  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7112  ;;
7113  *)
7114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7115for as_dir in $PATH
7116do
7117  IFS=$as_save_IFS
7118  test -z "$as_dir" && as_dir=.
7119    for ac_exec_ext in '' $ac_executable_extensions; do
7120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7121    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7123    break 2
7124  fi
7125done
7126  done
7127IFS=$as_save_IFS
7128
7129  ;;
7130esac
7131fi
7132DIFF=$ac_cv_path_DIFF
7133if test -n "$DIFF"; then
7134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7135$as_echo "$DIFF" >&6; }
7136else
7137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7138$as_echo "no" >&6; }
7139fi
7140
7141
7142          if test "x$DIFF" = x; then
7143            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7144          fi
7145        else
7146          # Otherwise we believe it is a complete path. Use it as it is.
7147          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7148$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7149          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7150$as_echo_n "checking for DIFF... " >&6; }
7151          if test ! -x "$tool_specified"; then
7152            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7153$as_echo "not found" >&6; }
7154            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7155          fi
7156          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7157$as_echo "$tool_specified" >&6; }
7158        fi
7159      fi
7160    fi
7161
7162  fi
7163
7164
7165
7166  if test "x$DIFF" = x; then
7167    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7168  fi
7169
7170
7171
7172
7173
7174  # Publish this variable in the help.
7175
7176
7177  if [ -z "${DIRNAME+x}" ]; then
7178    # The variable is not set by user, try to locate tool using the code snippet
7179    for ac_prog in dirname
7180do
7181  # Extract the first word of "$ac_prog", so it can be a program name with args.
7182set dummy $ac_prog; ac_word=$2
7183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7184$as_echo_n "checking for $ac_word... " >&6; }
7185if ${ac_cv_path_DIRNAME+:} false; then :
7186  $as_echo_n "(cached) " >&6
7187else
7188  case $DIRNAME in
7189  [\\/]* | ?:[\\/]*)
7190  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7191  ;;
7192  *)
7193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7194for as_dir in $PATH
7195do
7196  IFS=$as_save_IFS
7197  test -z "$as_dir" && as_dir=.
7198    for ac_exec_ext in '' $ac_executable_extensions; do
7199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7200    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7202    break 2
7203  fi
7204done
7205  done
7206IFS=$as_save_IFS
7207
7208  ;;
7209esac
7210fi
7211DIRNAME=$ac_cv_path_DIRNAME
7212if test -n "$DIRNAME"; then
7213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7214$as_echo "$DIRNAME" >&6; }
7215else
7216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7217$as_echo "no" >&6; }
7218fi
7219
7220
7221  test -n "$DIRNAME" && break
7222done
7223
7224  else
7225    # The variable is set, but is it from the command line or the environment?
7226
7227    # Try to remove the string !DIRNAME! from our list.
7228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7230      # If it failed, the variable was not from the command line. Ignore it,
7231      # but warn the user (except for BASH, which is always set by the calling BASH).
7232      if test "xDIRNAME" != xBASH; then
7233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7234$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7235      fi
7236      # Try to locate tool using the code snippet
7237      for ac_prog in dirname
7238do
7239  # Extract the first word of "$ac_prog", so it can be a program name with args.
7240set dummy $ac_prog; ac_word=$2
7241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7242$as_echo_n "checking for $ac_word... " >&6; }
7243if ${ac_cv_path_DIRNAME+:} false; then :
7244  $as_echo_n "(cached) " >&6
7245else
7246  case $DIRNAME in
7247  [\\/]* | ?:[\\/]*)
7248  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7249  ;;
7250  *)
7251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7252for as_dir in $PATH
7253do
7254  IFS=$as_save_IFS
7255  test -z "$as_dir" && as_dir=.
7256    for ac_exec_ext in '' $ac_executable_extensions; do
7257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7258    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7260    break 2
7261  fi
7262done
7263  done
7264IFS=$as_save_IFS
7265
7266  ;;
7267esac
7268fi
7269DIRNAME=$ac_cv_path_DIRNAME
7270if test -n "$DIRNAME"; then
7271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7272$as_echo "$DIRNAME" >&6; }
7273else
7274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275$as_echo "no" >&6; }
7276fi
7277
7278
7279  test -n "$DIRNAME" && break
7280done
7281
7282    else
7283      # If it succeeded, then it was overridden by the user. We will use it
7284      # for the tool.
7285
7286      # First remove it from the list of overridden variables, so we can test
7287      # for unknown variables in the end.
7288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7289
7290      # Check if we try to supply an empty value
7291      if test "x$DIRNAME" = x; then
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7293$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7295$as_echo_n "checking for DIRNAME... " >&6; }
7296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7297$as_echo "disabled" >&6; }
7298      else
7299        # Check if the provided tool contains a complete path.
7300        tool_specified="$DIRNAME"
7301        tool_basename="${tool_specified##*/}"
7302        if test "x$tool_basename" = "x$tool_specified"; then
7303          # A command without a complete path is provided, search $PATH.
7304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7305$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7306          # Extract the first word of "$tool_basename", so it can be a program name with args.
7307set dummy $tool_basename; ac_word=$2
7308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7309$as_echo_n "checking for $ac_word... " >&6; }
7310if ${ac_cv_path_DIRNAME+:} false; then :
7311  $as_echo_n "(cached) " >&6
7312else
7313  case $DIRNAME in
7314  [\\/]* | ?:[\\/]*)
7315  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7316  ;;
7317  *)
7318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7319for as_dir in $PATH
7320do
7321  IFS=$as_save_IFS
7322  test -z "$as_dir" && as_dir=.
7323    for ac_exec_ext in '' $ac_executable_extensions; do
7324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7325    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7327    break 2
7328  fi
7329done
7330  done
7331IFS=$as_save_IFS
7332
7333  ;;
7334esac
7335fi
7336DIRNAME=$ac_cv_path_DIRNAME
7337if test -n "$DIRNAME"; then
7338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7339$as_echo "$DIRNAME" >&6; }
7340else
7341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7342$as_echo "no" >&6; }
7343fi
7344
7345
7346          if test "x$DIRNAME" = x; then
7347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7348          fi
7349        else
7350          # Otherwise we believe it is a complete path. Use it as it is.
7351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7352$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7354$as_echo_n "checking for DIRNAME... " >&6; }
7355          if test ! -x "$tool_specified"; then
7356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7357$as_echo "not found" >&6; }
7358            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7359          fi
7360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7361$as_echo "$tool_specified" >&6; }
7362        fi
7363      fi
7364    fi
7365
7366  fi
7367
7368
7369
7370  if test "x$DIRNAME" = x; then
7371    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7372  fi
7373
7374
7375
7376
7377
7378  # Publish this variable in the help.
7379
7380
7381  if [ -z "${ECHO+x}" ]; then
7382    # The variable is not set by user, try to locate tool using the code snippet
7383    for ac_prog in echo
7384do
7385  # Extract the first word of "$ac_prog", so it can be a program name with args.
7386set dummy $ac_prog; ac_word=$2
7387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7388$as_echo_n "checking for $ac_word... " >&6; }
7389if ${ac_cv_path_ECHO+:} false; then :
7390  $as_echo_n "(cached) " >&6
7391else
7392  case $ECHO in
7393  [\\/]* | ?:[\\/]*)
7394  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7395  ;;
7396  *)
7397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398for as_dir in $PATH
7399do
7400  IFS=$as_save_IFS
7401  test -z "$as_dir" && as_dir=.
7402    for ac_exec_ext in '' $ac_executable_extensions; do
7403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7404    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7406    break 2
7407  fi
7408done
7409  done
7410IFS=$as_save_IFS
7411
7412  ;;
7413esac
7414fi
7415ECHO=$ac_cv_path_ECHO
7416if test -n "$ECHO"; then
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7418$as_echo "$ECHO" >&6; }
7419else
7420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421$as_echo "no" >&6; }
7422fi
7423
7424
7425  test -n "$ECHO" && break
7426done
7427
7428  else
7429    # The variable is set, but is it from the command line or the environment?
7430
7431    # Try to remove the string !ECHO! from our list.
7432    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7433    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7434      # If it failed, the variable was not from the command line. Ignore it,
7435      # but warn the user (except for BASH, which is always set by the calling BASH).
7436      if test "xECHO" != xBASH; then
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7438$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7439      fi
7440      # Try to locate tool using the code snippet
7441      for ac_prog in echo
7442do
7443  # Extract the first word of "$ac_prog", so it can be a program name with args.
7444set dummy $ac_prog; ac_word=$2
7445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7446$as_echo_n "checking for $ac_word... " >&6; }
7447if ${ac_cv_path_ECHO+:} false; then :
7448  $as_echo_n "(cached) " >&6
7449else
7450  case $ECHO in
7451  [\\/]* | ?:[\\/]*)
7452  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7453  ;;
7454  *)
7455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7456for as_dir in $PATH
7457do
7458  IFS=$as_save_IFS
7459  test -z "$as_dir" && as_dir=.
7460    for ac_exec_ext in '' $ac_executable_extensions; do
7461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7462    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7464    break 2
7465  fi
7466done
7467  done
7468IFS=$as_save_IFS
7469
7470  ;;
7471esac
7472fi
7473ECHO=$ac_cv_path_ECHO
7474if test -n "$ECHO"; then
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7476$as_echo "$ECHO" >&6; }
7477else
7478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479$as_echo "no" >&6; }
7480fi
7481
7482
7483  test -n "$ECHO" && break
7484done
7485
7486    else
7487      # If it succeeded, then it was overridden by the user. We will use it
7488      # for the tool.
7489
7490      # First remove it from the list of overridden variables, so we can test
7491      # for unknown variables in the end.
7492      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7493
7494      # Check if we try to supply an empty value
7495      if test "x$ECHO" = x; then
7496        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7497$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7498        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7499$as_echo_n "checking for ECHO... " >&6; }
7500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7501$as_echo "disabled" >&6; }
7502      else
7503        # Check if the provided tool contains a complete path.
7504        tool_specified="$ECHO"
7505        tool_basename="${tool_specified##*/}"
7506        if test "x$tool_basename" = "x$tool_specified"; then
7507          # A command without a complete path is provided, search $PATH.
7508          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7509$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7510          # Extract the first word of "$tool_basename", so it can be a program name with args.
7511set dummy $tool_basename; ac_word=$2
7512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7513$as_echo_n "checking for $ac_word... " >&6; }
7514if ${ac_cv_path_ECHO+:} false; then :
7515  $as_echo_n "(cached) " >&6
7516else
7517  case $ECHO in
7518  [\\/]* | ?:[\\/]*)
7519  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7520  ;;
7521  *)
7522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7523for as_dir in $PATH
7524do
7525  IFS=$as_save_IFS
7526  test -z "$as_dir" && as_dir=.
7527    for ac_exec_ext in '' $ac_executable_extensions; do
7528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7529    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7531    break 2
7532  fi
7533done
7534  done
7535IFS=$as_save_IFS
7536
7537  ;;
7538esac
7539fi
7540ECHO=$ac_cv_path_ECHO
7541if test -n "$ECHO"; then
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7543$as_echo "$ECHO" >&6; }
7544else
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7546$as_echo "no" >&6; }
7547fi
7548
7549
7550          if test "x$ECHO" = x; then
7551            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7552          fi
7553        else
7554          # Otherwise we believe it is a complete path. Use it as it is.
7555          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7556$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7557          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7558$as_echo_n "checking for ECHO... " >&6; }
7559          if test ! -x "$tool_specified"; then
7560            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7561$as_echo "not found" >&6; }
7562            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7563          fi
7564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7565$as_echo "$tool_specified" >&6; }
7566        fi
7567      fi
7568    fi
7569
7570  fi
7571
7572
7573
7574  if test "x$ECHO" = x; then
7575    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7576  fi
7577
7578
7579
7580
7581
7582  # Publish this variable in the help.
7583
7584
7585  if [ -z "${EXPR+x}" ]; then
7586    # The variable is not set by user, try to locate tool using the code snippet
7587    for ac_prog in expr
7588do
7589  # Extract the first word of "$ac_prog", so it can be a program name with args.
7590set dummy $ac_prog; ac_word=$2
7591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7592$as_echo_n "checking for $ac_word... " >&6; }
7593if ${ac_cv_path_EXPR+:} false; then :
7594  $as_echo_n "(cached) " >&6
7595else
7596  case $EXPR in
7597  [\\/]* | ?:[\\/]*)
7598  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7599  ;;
7600  *)
7601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7602for as_dir in $PATH
7603do
7604  IFS=$as_save_IFS
7605  test -z "$as_dir" && as_dir=.
7606    for ac_exec_ext in '' $ac_executable_extensions; do
7607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7608    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7610    break 2
7611  fi
7612done
7613  done
7614IFS=$as_save_IFS
7615
7616  ;;
7617esac
7618fi
7619EXPR=$ac_cv_path_EXPR
7620if test -n "$EXPR"; then
7621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7622$as_echo "$EXPR" >&6; }
7623else
7624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625$as_echo "no" >&6; }
7626fi
7627
7628
7629  test -n "$EXPR" && break
7630done
7631
7632  else
7633    # The variable is set, but is it from the command line or the environment?
7634
7635    # Try to remove the string !EXPR! from our list.
7636    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7637    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7638      # If it failed, the variable was not from the command line. Ignore it,
7639      # but warn the user (except for BASH, which is always set by the calling BASH).
7640      if test "xEXPR" != xBASH; then
7641        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7642$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7643      fi
7644      # Try to locate tool using the code snippet
7645      for ac_prog in expr
7646do
7647  # Extract the first word of "$ac_prog", so it can be a program name with args.
7648set dummy $ac_prog; ac_word=$2
7649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7650$as_echo_n "checking for $ac_word... " >&6; }
7651if ${ac_cv_path_EXPR+:} false; then :
7652  $as_echo_n "(cached) " >&6
7653else
7654  case $EXPR in
7655  [\\/]* | ?:[\\/]*)
7656  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7657  ;;
7658  *)
7659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7660for as_dir in $PATH
7661do
7662  IFS=$as_save_IFS
7663  test -z "$as_dir" && as_dir=.
7664    for ac_exec_ext in '' $ac_executable_extensions; do
7665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7666    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7668    break 2
7669  fi
7670done
7671  done
7672IFS=$as_save_IFS
7673
7674  ;;
7675esac
7676fi
7677EXPR=$ac_cv_path_EXPR
7678if test -n "$EXPR"; then
7679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7680$as_echo "$EXPR" >&6; }
7681else
7682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683$as_echo "no" >&6; }
7684fi
7685
7686
7687  test -n "$EXPR" && break
7688done
7689
7690    else
7691      # If it succeeded, then it was overridden by the user. We will use it
7692      # for the tool.
7693
7694      # First remove it from the list of overridden variables, so we can test
7695      # for unknown variables in the end.
7696      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7697
7698      # Check if we try to supply an empty value
7699      if test "x$EXPR" = x; then
7700        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7701$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7703$as_echo_n "checking for EXPR... " >&6; }
7704        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7705$as_echo "disabled" >&6; }
7706      else
7707        # Check if the provided tool contains a complete path.
7708        tool_specified="$EXPR"
7709        tool_basename="${tool_specified##*/}"
7710        if test "x$tool_basename" = "x$tool_specified"; then
7711          # A command without a complete path is provided, search $PATH.
7712          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7713$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7714          # Extract the first word of "$tool_basename", so it can be a program name with args.
7715set dummy $tool_basename; ac_word=$2
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7717$as_echo_n "checking for $ac_word... " >&6; }
7718if ${ac_cv_path_EXPR+:} false; then :
7719  $as_echo_n "(cached) " >&6
7720else
7721  case $EXPR in
7722  [\\/]* | ?:[\\/]*)
7723  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7724  ;;
7725  *)
7726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729  IFS=$as_save_IFS
7730  test -z "$as_dir" && as_dir=.
7731    for ac_exec_ext in '' $ac_executable_extensions; do
7732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735    break 2
7736  fi
7737done
7738  done
7739IFS=$as_save_IFS
7740
7741  ;;
7742esac
7743fi
7744EXPR=$ac_cv_path_EXPR
7745if test -n "$EXPR"; then
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7747$as_echo "$EXPR" >&6; }
7748else
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7750$as_echo "no" >&6; }
7751fi
7752
7753
7754          if test "x$EXPR" = x; then
7755            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7756          fi
7757        else
7758          # Otherwise we believe it is a complete path. Use it as it is.
7759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7760$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7761          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7762$as_echo_n "checking for EXPR... " >&6; }
7763          if test ! -x "$tool_specified"; then
7764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7765$as_echo "not found" >&6; }
7766            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7767          fi
7768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7769$as_echo "$tool_specified" >&6; }
7770        fi
7771      fi
7772    fi
7773
7774  fi
7775
7776
7777
7778  if test "x$EXPR" = x; then
7779    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7780  fi
7781
7782
7783
7784
7785
7786  # Publish this variable in the help.
7787
7788
7789  if [ -z "${FILE+x}" ]; then
7790    # The variable is not set by user, try to locate tool using the code snippet
7791    for ac_prog in file
7792do
7793  # Extract the first word of "$ac_prog", so it can be a program name with args.
7794set dummy $ac_prog; ac_word=$2
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7796$as_echo_n "checking for $ac_word... " >&6; }
7797if ${ac_cv_path_FILE+:} false; then :
7798  $as_echo_n "(cached) " >&6
7799else
7800  case $FILE in
7801  [\\/]* | ?:[\\/]*)
7802  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7803  ;;
7804  *)
7805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7806for as_dir in $PATH
7807do
7808  IFS=$as_save_IFS
7809  test -z "$as_dir" && as_dir=.
7810    for ac_exec_ext in '' $ac_executable_extensions; do
7811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7812    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7814    break 2
7815  fi
7816done
7817  done
7818IFS=$as_save_IFS
7819
7820  ;;
7821esac
7822fi
7823FILE=$ac_cv_path_FILE
7824if test -n "$FILE"; then
7825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7826$as_echo "$FILE" >&6; }
7827else
7828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7829$as_echo "no" >&6; }
7830fi
7831
7832
7833  test -n "$FILE" && break
7834done
7835
7836  else
7837    # The variable is set, but is it from the command line or the environment?
7838
7839    # Try to remove the string !FILE! from our list.
7840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7842      # If it failed, the variable was not from the command line. Ignore it,
7843      # but warn the user (except for BASH, which is always set by the calling BASH).
7844      if test "xFILE" != xBASH; then
7845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7846$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7847      fi
7848      # Try to locate tool using the code snippet
7849      for ac_prog in file
7850do
7851  # Extract the first word of "$ac_prog", so it can be a program name with args.
7852set dummy $ac_prog; ac_word=$2
7853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7854$as_echo_n "checking for $ac_word... " >&6; }
7855if ${ac_cv_path_FILE+:} false; then :
7856  $as_echo_n "(cached) " >&6
7857else
7858  case $FILE in
7859  [\\/]* | ?:[\\/]*)
7860  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7861  ;;
7862  *)
7863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7864for as_dir in $PATH
7865do
7866  IFS=$as_save_IFS
7867  test -z "$as_dir" && as_dir=.
7868    for ac_exec_ext in '' $ac_executable_extensions; do
7869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7870    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7872    break 2
7873  fi
7874done
7875  done
7876IFS=$as_save_IFS
7877
7878  ;;
7879esac
7880fi
7881FILE=$ac_cv_path_FILE
7882if test -n "$FILE"; then
7883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7884$as_echo "$FILE" >&6; }
7885else
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7887$as_echo "no" >&6; }
7888fi
7889
7890
7891  test -n "$FILE" && break
7892done
7893
7894    else
7895      # If it succeeded, then it was overridden by the user. We will use it
7896      # for the tool.
7897
7898      # First remove it from the list of overridden variables, so we can test
7899      # for unknown variables in the end.
7900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7901
7902      # Check if we try to supply an empty value
7903      if test "x$FILE" = x; then
7904        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7905$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7907$as_echo_n "checking for FILE... " >&6; }
7908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7909$as_echo "disabled" >&6; }
7910      else
7911        # Check if the provided tool contains a complete path.
7912        tool_specified="$FILE"
7913        tool_basename="${tool_specified##*/}"
7914        if test "x$tool_basename" = "x$tool_specified"; then
7915          # A command without a complete path is provided, search $PATH.
7916          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7917$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7918          # Extract the first word of "$tool_basename", so it can be a program name with args.
7919set dummy $tool_basename; ac_word=$2
7920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7921$as_echo_n "checking for $ac_word... " >&6; }
7922if ${ac_cv_path_FILE+:} false; then :
7923  $as_echo_n "(cached) " >&6
7924else
7925  case $FILE in
7926  [\\/]* | ?:[\\/]*)
7927  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7928  ;;
7929  *)
7930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7931for as_dir in $PATH
7932do
7933  IFS=$as_save_IFS
7934  test -z "$as_dir" && as_dir=.
7935    for ac_exec_ext in '' $ac_executable_extensions; do
7936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7937    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7939    break 2
7940  fi
7941done
7942  done
7943IFS=$as_save_IFS
7944
7945  ;;
7946esac
7947fi
7948FILE=$ac_cv_path_FILE
7949if test -n "$FILE"; then
7950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7951$as_echo "$FILE" >&6; }
7952else
7953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7954$as_echo "no" >&6; }
7955fi
7956
7957
7958          if test "x$FILE" = x; then
7959            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7960          fi
7961        else
7962          # Otherwise we believe it is a complete path. Use it as it is.
7963          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7964$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7965          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7966$as_echo_n "checking for FILE... " >&6; }
7967          if test ! -x "$tool_specified"; then
7968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7969$as_echo "not found" >&6; }
7970            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7971          fi
7972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7973$as_echo "$tool_specified" >&6; }
7974        fi
7975      fi
7976    fi
7977
7978  fi
7979
7980
7981
7982  if test "x$FILE" = x; then
7983    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7984  fi
7985
7986
7987
7988
7989
7990  # Publish this variable in the help.
7991
7992
7993  if [ -z "${FIND+x}" ]; then
7994    # The variable is not set by user, try to locate tool using the code snippet
7995    for ac_prog in find
7996do
7997  # Extract the first word of "$ac_prog", so it can be a program name with args.
7998set dummy $ac_prog; ac_word=$2
7999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8000$as_echo_n "checking for $ac_word... " >&6; }
8001if ${ac_cv_path_FIND+:} false; then :
8002  $as_echo_n "(cached) " >&6
8003else
8004  case $FIND in
8005  [\\/]* | ?:[\\/]*)
8006  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8007  ;;
8008  *)
8009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8010for as_dir in $PATH
8011do
8012  IFS=$as_save_IFS
8013  test -z "$as_dir" && as_dir=.
8014    for ac_exec_ext in '' $ac_executable_extensions; do
8015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8016    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8018    break 2
8019  fi
8020done
8021  done
8022IFS=$as_save_IFS
8023
8024  ;;
8025esac
8026fi
8027FIND=$ac_cv_path_FIND
8028if test -n "$FIND"; then
8029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8030$as_echo "$FIND" >&6; }
8031else
8032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8033$as_echo "no" >&6; }
8034fi
8035
8036
8037  test -n "$FIND" && break
8038done
8039
8040  else
8041    # The variable is set, but is it from the command line or the environment?
8042
8043    # Try to remove the string !FIND! from our list.
8044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8046      # If it failed, the variable was not from the command line. Ignore it,
8047      # but warn the user (except for BASH, which is always set by the calling BASH).
8048      if test "xFIND" != xBASH; then
8049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8050$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8051      fi
8052      # Try to locate tool using the code snippet
8053      for ac_prog in find
8054do
8055  # Extract the first word of "$ac_prog", so it can be a program name with args.
8056set dummy $ac_prog; ac_word=$2
8057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8058$as_echo_n "checking for $ac_word... " >&6; }
8059if ${ac_cv_path_FIND+:} false; then :
8060  $as_echo_n "(cached) " >&6
8061else
8062  case $FIND in
8063  [\\/]* | ?:[\\/]*)
8064  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8065  ;;
8066  *)
8067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8068for as_dir in $PATH
8069do
8070  IFS=$as_save_IFS
8071  test -z "$as_dir" && as_dir=.
8072    for ac_exec_ext in '' $ac_executable_extensions; do
8073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8074    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8076    break 2
8077  fi
8078done
8079  done
8080IFS=$as_save_IFS
8081
8082  ;;
8083esac
8084fi
8085FIND=$ac_cv_path_FIND
8086if test -n "$FIND"; then
8087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8088$as_echo "$FIND" >&6; }
8089else
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8091$as_echo "no" >&6; }
8092fi
8093
8094
8095  test -n "$FIND" && break
8096done
8097
8098    else
8099      # If it succeeded, then it was overridden by the user. We will use it
8100      # for the tool.
8101
8102      # First remove it from the list of overridden variables, so we can test
8103      # for unknown variables in the end.
8104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8105
8106      # Check if we try to supply an empty value
8107      if test "x$FIND" = x; then
8108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8109$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8111$as_echo_n "checking for FIND... " >&6; }
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8113$as_echo "disabled" >&6; }
8114      else
8115        # Check if the provided tool contains a complete path.
8116        tool_specified="$FIND"
8117        tool_basename="${tool_specified##*/}"
8118        if test "x$tool_basename" = "x$tool_specified"; then
8119          # A command without a complete path is provided, search $PATH.
8120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8121$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8122          # Extract the first word of "$tool_basename", so it can be a program name with args.
8123set dummy $tool_basename; ac_word=$2
8124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8125$as_echo_n "checking for $ac_word... " >&6; }
8126if ${ac_cv_path_FIND+:} false; then :
8127  $as_echo_n "(cached) " >&6
8128else
8129  case $FIND in
8130  [\\/]* | ?:[\\/]*)
8131  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8132  ;;
8133  *)
8134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8135for as_dir in $PATH
8136do
8137  IFS=$as_save_IFS
8138  test -z "$as_dir" && as_dir=.
8139    for ac_exec_ext in '' $ac_executable_extensions; do
8140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8141    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8143    break 2
8144  fi
8145done
8146  done
8147IFS=$as_save_IFS
8148
8149  ;;
8150esac
8151fi
8152FIND=$ac_cv_path_FIND
8153if test -n "$FIND"; then
8154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8155$as_echo "$FIND" >&6; }
8156else
8157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8158$as_echo "no" >&6; }
8159fi
8160
8161
8162          if test "x$FIND" = x; then
8163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8164          fi
8165        else
8166          # Otherwise we believe it is a complete path. Use it as it is.
8167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8168$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8170$as_echo_n "checking for FIND... " >&6; }
8171          if test ! -x "$tool_specified"; then
8172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8173$as_echo "not found" >&6; }
8174            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8175          fi
8176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8177$as_echo "$tool_specified" >&6; }
8178        fi
8179      fi
8180    fi
8181
8182  fi
8183
8184
8185
8186  if test "x$FIND" = x; then
8187    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8188  fi
8189
8190
8191
8192
8193
8194  # Publish this variable in the help.
8195
8196
8197  if [ -z "${HEAD+x}" ]; then
8198    # The variable is not set by user, try to locate tool using the code snippet
8199    for ac_prog in head
8200do
8201  # Extract the first word of "$ac_prog", so it can be a program name with args.
8202set dummy $ac_prog; ac_word=$2
8203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8204$as_echo_n "checking for $ac_word... " >&6; }
8205if ${ac_cv_path_HEAD+:} false; then :
8206  $as_echo_n "(cached) " >&6
8207else
8208  case $HEAD in
8209  [\\/]* | ?:[\\/]*)
8210  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8211  ;;
8212  *)
8213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8214for as_dir in $PATH
8215do
8216  IFS=$as_save_IFS
8217  test -z "$as_dir" && as_dir=.
8218    for ac_exec_ext in '' $ac_executable_extensions; do
8219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8220    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8222    break 2
8223  fi
8224done
8225  done
8226IFS=$as_save_IFS
8227
8228  ;;
8229esac
8230fi
8231HEAD=$ac_cv_path_HEAD
8232if test -n "$HEAD"; then
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8234$as_echo "$HEAD" >&6; }
8235else
8236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8237$as_echo "no" >&6; }
8238fi
8239
8240
8241  test -n "$HEAD" && break
8242done
8243
8244  else
8245    # The variable is set, but is it from the command line or the environment?
8246
8247    # Try to remove the string !HEAD! from our list.
8248    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8249    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8250      # If it failed, the variable was not from the command line. Ignore it,
8251      # but warn the user (except for BASH, which is always set by the calling BASH).
8252      if test "xHEAD" != xBASH; then
8253        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8254$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8255      fi
8256      # Try to locate tool using the code snippet
8257      for ac_prog in head
8258do
8259  # Extract the first word of "$ac_prog", so it can be a program name with args.
8260set dummy $ac_prog; ac_word=$2
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8262$as_echo_n "checking for $ac_word... " >&6; }
8263if ${ac_cv_path_HEAD+:} false; then :
8264  $as_echo_n "(cached) " >&6
8265else
8266  case $HEAD in
8267  [\\/]* | ?:[\\/]*)
8268  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8269  ;;
8270  *)
8271  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8272for as_dir in $PATH
8273do
8274  IFS=$as_save_IFS
8275  test -z "$as_dir" && as_dir=.
8276    for ac_exec_ext in '' $ac_executable_extensions; do
8277  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8278    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8279    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8280    break 2
8281  fi
8282done
8283  done
8284IFS=$as_save_IFS
8285
8286  ;;
8287esac
8288fi
8289HEAD=$ac_cv_path_HEAD
8290if test -n "$HEAD"; then
8291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8292$as_echo "$HEAD" >&6; }
8293else
8294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8295$as_echo "no" >&6; }
8296fi
8297
8298
8299  test -n "$HEAD" && break
8300done
8301
8302    else
8303      # If it succeeded, then it was overridden by the user. We will use it
8304      # for the tool.
8305
8306      # First remove it from the list of overridden variables, so we can test
8307      # for unknown variables in the end.
8308      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8309
8310      # Check if we try to supply an empty value
8311      if test "x$HEAD" = x; then
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8313$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8315$as_echo_n "checking for HEAD... " >&6; }
8316        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8317$as_echo "disabled" >&6; }
8318      else
8319        # Check if the provided tool contains a complete path.
8320        tool_specified="$HEAD"
8321        tool_basename="${tool_specified##*/}"
8322        if test "x$tool_basename" = "x$tool_specified"; then
8323          # A command without a complete path is provided, search $PATH.
8324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8325$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8326          # Extract the first word of "$tool_basename", so it can be a program name with args.
8327set dummy $tool_basename; ac_word=$2
8328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8329$as_echo_n "checking for $ac_word... " >&6; }
8330if ${ac_cv_path_HEAD+:} false; then :
8331  $as_echo_n "(cached) " >&6
8332else
8333  case $HEAD in
8334  [\\/]* | ?:[\\/]*)
8335  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8336  ;;
8337  *)
8338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8339for as_dir in $PATH
8340do
8341  IFS=$as_save_IFS
8342  test -z "$as_dir" && as_dir=.
8343    for ac_exec_ext in '' $ac_executable_extensions; do
8344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8345    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8347    break 2
8348  fi
8349done
8350  done
8351IFS=$as_save_IFS
8352
8353  ;;
8354esac
8355fi
8356HEAD=$ac_cv_path_HEAD
8357if test -n "$HEAD"; then
8358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8359$as_echo "$HEAD" >&6; }
8360else
8361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362$as_echo "no" >&6; }
8363fi
8364
8365
8366          if test "x$HEAD" = x; then
8367            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8368          fi
8369        else
8370          # Otherwise we believe it is a complete path. Use it as it is.
8371          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8372$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8373          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8374$as_echo_n "checking for HEAD... " >&6; }
8375          if test ! -x "$tool_specified"; then
8376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8377$as_echo "not found" >&6; }
8378            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8379          fi
8380          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8381$as_echo "$tool_specified" >&6; }
8382        fi
8383      fi
8384    fi
8385
8386  fi
8387
8388
8389
8390  if test "x$HEAD" = x; then
8391    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8392  fi
8393
8394
8395
8396
8397
8398  # Publish this variable in the help.
8399
8400
8401  if [ -z "${LN+x}" ]; then
8402    # The variable is not set by user, try to locate tool using the code snippet
8403    for ac_prog in ln
8404do
8405  # Extract the first word of "$ac_prog", so it can be a program name with args.
8406set dummy $ac_prog; ac_word=$2
8407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8408$as_echo_n "checking for $ac_word... " >&6; }
8409if ${ac_cv_path_LN+:} false; then :
8410  $as_echo_n "(cached) " >&6
8411else
8412  case $LN in
8413  [\\/]* | ?:[\\/]*)
8414  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8415  ;;
8416  *)
8417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8418for as_dir in $PATH
8419do
8420  IFS=$as_save_IFS
8421  test -z "$as_dir" && as_dir=.
8422    for ac_exec_ext in '' $ac_executable_extensions; do
8423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8424    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8426    break 2
8427  fi
8428done
8429  done
8430IFS=$as_save_IFS
8431
8432  ;;
8433esac
8434fi
8435LN=$ac_cv_path_LN
8436if test -n "$LN"; then
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8438$as_echo "$LN" >&6; }
8439else
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8441$as_echo "no" >&6; }
8442fi
8443
8444
8445  test -n "$LN" && break
8446done
8447
8448  else
8449    # The variable is set, but is it from the command line or the environment?
8450
8451    # Try to remove the string !LN! from our list.
8452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8454      # If it failed, the variable was not from the command line. Ignore it,
8455      # but warn the user (except for BASH, which is always set by the calling BASH).
8456      if test "xLN" != xBASH; then
8457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8458$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8459      fi
8460      # Try to locate tool using the code snippet
8461      for ac_prog in ln
8462do
8463  # Extract the first word of "$ac_prog", so it can be a program name with args.
8464set dummy $ac_prog; ac_word=$2
8465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8466$as_echo_n "checking for $ac_word... " >&6; }
8467if ${ac_cv_path_LN+:} false; then :
8468  $as_echo_n "(cached) " >&6
8469else
8470  case $LN in
8471  [\\/]* | ?:[\\/]*)
8472  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8473  ;;
8474  *)
8475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8476for as_dir in $PATH
8477do
8478  IFS=$as_save_IFS
8479  test -z "$as_dir" && as_dir=.
8480    for ac_exec_ext in '' $ac_executable_extensions; do
8481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8482    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8484    break 2
8485  fi
8486done
8487  done
8488IFS=$as_save_IFS
8489
8490  ;;
8491esac
8492fi
8493LN=$ac_cv_path_LN
8494if test -n "$LN"; then
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8496$as_echo "$LN" >&6; }
8497else
8498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8499$as_echo "no" >&6; }
8500fi
8501
8502
8503  test -n "$LN" && break
8504done
8505
8506    else
8507      # If it succeeded, then it was overridden by the user. We will use it
8508      # for the tool.
8509
8510      # First remove it from the list of overridden variables, so we can test
8511      # for unknown variables in the end.
8512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8513
8514      # Check if we try to supply an empty value
8515      if test "x$LN" = x; then
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8517$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8519$as_echo_n "checking for LN... " >&6; }
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8521$as_echo "disabled" >&6; }
8522      else
8523        # Check if the provided tool contains a complete path.
8524        tool_specified="$LN"
8525        tool_basename="${tool_specified##*/}"
8526        if test "x$tool_basename" = "x$tool_specified"; then
8527          # A command without a complete path is provided, search $PATH.
8528          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8529$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8530          # Extract the first word of "$tool_basename", so it can be a program name with args.
8531set dummy $tool_basename; ac_word=$2
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8533$as_echo_n "checking for $ac_word... " >&6; }
8534if ${ac_cv_path_LN+:} false; then :
8535  $as_echo_n "(cached) " >&6
8536else
8537  case $LN in
8538  [\\/]* | ?:[\\/]*)
8539  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8540  ;;
8541  *)
8542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8543for as_dir in $PATH
8544do
8545  IFS=$as_save_IFS
8546  test -z "$as_dir" && as_dir=.
8547    for ac_exec_ext in '' $ac_executable_extensions; do
8548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8549    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8551    break 2
8552  fi
8553done
8554  done
8555IFS=$as_save_IFS
8556
8557  ;;
8558esac
8559fi
8560LN=$ac_cv_path_LN
8561if test -n "$LN"; then
8562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8563$as_echo "$LN" >&6; }
8564else
8565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8566$as_echo "no" >&6; }
8567fi
8568
8569
8570          if test "x$LN" = x; then
8571            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8572          fi
8573        else
8574          # Otherwise we believe it is a complete path. Use it as it is.
8575          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8576$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8577          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8578$as_echo_n "checking for LN... " >&6; }
8579          if test ! -x "$tool_specified"; then
8580            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8581$as_echo "not found" >&6; }
8582            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8583          fi
8584          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8585$as_echo "$tool_specified" >&6; }
8586        fi
8587      fi
8588    fi
8589
8590  fi
8591
8592
8593
8594  if test "x$LN" = x; then
8595    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8596  fi
8597
8598
8599
8600
8601
8602  # Publish this variable in the help.
8603
8604
8605  if [ -z "${LS+x}" ]; then
8606    # The variable is not set by user, try to locate tool using the code snippet
8607    for ac_prog in ls
8608do
8609  # Extract the first word of "$ac_prog", so it can be a program name with args.
8610set dummy $ac_prog; ac_word=$2
8611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8612$as_echo_n "checking for $ac_word... " >&6; }
8613if ${ac_cv_path_LS+:} false; then :
8614  $as_echo_n "(cached) " >&6
8615else
8616  case $LS in
8617  [\\/]* | ?:[\\/]*)
8618  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8619  ;;
8620  *)
8621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8622for as_dir in $PATH
8623do
8624  IFS=$as_save_IFS
8625  test -z "$as_dir" && as_dir=.
8626    for ac_exec_ext in '' $ac_executable_extensions; do
8627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8628    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8630    break 2
8631  fi
8632done
8633  done
8634IFS=$as_save_IFS
8635
8636  ;;
8637esac
8638fi
8639LS=$ac_cv_path_LS
8640if test -n "$LS"; then
8641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8642$as_echo "$LS" >&6; }
8643else
8644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8645$as_echo "no" >&6; }
8646fi
8647
8648
8649  test -n "$LS" && break
8650done
8651
8652  else
8653    # The variable is set, but is it from the command line or the environment?
8654
8655    # Try to remove the string !LS! from our list.
8656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8658      # If it failed, the variable was not from the command line. Ignore it,
8659      # but warn the user (except for BASH, which is always set by the calling BASH).
8660      if test "xLS" != xBASH; then
8661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8662$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8663      fi
8664      # Try to locate tool using the code snippet
8665      for ac_prog in ls
8666do
8667  # Extract the first word of "$ac_prog", so it can be a program name with args.
8668set dummy $ac_prog; ac_word=$2
8669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8670$as_echo_n "checking for $ac_word... " >&6; }
8671if ${ac_cv_path_LS+:} false; then :
8672  $as_echo_n "(cached) " >&6
8673else
8674  case $LS in
8675  [\\/]* | ?:[\\/]*)
8676  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8677  ;;
8678  *)
8679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8680for as_dir in $PATH
8681do
8682  IFS=$as_save_IFS
8683  test -z "$as_dir" && as_dir=.
8684    for ac_exec_ext in '' $ac_executable_extensions; do
8685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8686    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8688    break 2
8689  fi
8690done
8691  done
8692IFS=$as_save_IFS
8693
8694  ;;
8695esac
8696fi
8697LS=$ac_cv_path_LS
8698if test -n "$LS"; then
8699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8700$as_echo "$LS" >&6; }
8701else
8702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8703$as_echo "no" >&6; }
8704fi
8705
8706
8707  test -n "$LS" && break
8708done
8709
8710    else
8711      # If it succeeded, then it was overridden by the user. We will use it
8712      # for the tool.
8713
8714      # First remove it from the list of overridden variables, so we can test
8715      # for unknown variables in the end.
8716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8717
8718      # Check if we try to supply an empty value
8719      if test "x$LS" = x; then
8720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8721$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8723$as_echo_n "checking for LS... " >&6; }
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8725$as_echo "disabled" >&6; }
8726      else
8727        # Check if the provided tool contains a complete path.
8728        tool_specified="$LS"
8729        tool_basename="${tool_specified##*/}"
8730        if test "x$tool_basename" = "x$tool_specified"; then
8731          # A command without a complete path is provided, search $PATH.
8732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8733$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8734          # Extract the first word of "$tool_basename", so it can be a program name with args.
8735set dummy $tool_basename; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if ${ac_cv_path_LS+:} false; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  case $LS in
8742  [\\/]* | ?:[\\/]*)
8743  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8744  ;;
8745  *)
8746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749  IFS=$as_save_IFS
8750  test -z "$as_dir" && as_dir=.
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8753    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761  ;;
8762esac
8763fi
8764LS=$ac_cv_path_LS
8765if test -n "$LS"; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8767$as_echo "$LS" >&6; }
8768else
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
8771fi
8772
8773
8774          if test "x$LS" = x; then
8775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8776          fi
8777        else
8778          # Otherwise we believe it is a complete path. Use it as it is.
8779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8780$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8782$as_echo_n "checking for LS... " >&6; }
8783          if test ! -x "$tool_specified"; then
8784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8785$as_echo "not found" >&6; }
8786            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8787          fi
8788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8789$as_echo "$tool_specified" >&6; }
8790        fi
8791      fi
8792    fi
8793
8794  fi
8795
8796
8797
8798  if test "x$LS" = x; then
8799    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8800  fi
8801
8802
8803
8804
8805
8806  # Publish this variable in the help.
8807
8808
8809  if [ -z "${MKDIR+x}" ]; then
8810    # The variable is not set by user, try to locate tool using the code snippet
8811    for ac_prog in mkdir
8812do
8813  # Extract the first word of "$ac_prog", so it can be a program name with args.
8814set dummy $ac_prog; ac_word=$2
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8816$as_echo_n "checking for $ac_word... " >&6; }
8817if ${ac_cv_path_MKDIR+:} false; then :
8818  $as_echo_n "(cached) " >&6
8819else
8820  case $MKDIR in
8821  [\\/]* | ?:[\\/]*)
8822  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8823  ;;
8824  *)
8825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8826for as_dir in $PATH
8827do
8828  IFS=$as_save_IFS
8829  test -z "$as_dir" && as_dir=.
8830    for ac_exec_ext in '' $ac_executable_extensions; do
8831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8832    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8834    break 2
8835  fi
8836done
8837  done
8838IFS=$as_save_IFS
8839
8840  ;;
8841esac
8842fi
8843MKDIR=$ac_cv_path_MKDIR
8844if test -n "$MKDIR"; then
8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8846$as_echo "$MKDIR" >&6; }
8847else
8848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8849$as_echo "no" >&6; }
8850fi
8851
8852
8853  test -n "$MKDIR" && break
8854done
8855
8856  else
8857    # The variable is set, but is it from the command line or the environment?
8858
8859    # Try to remove the string !MKDIR! from our list.
8860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8862      # If it failed, the variable was not from the command line. Ignore it,
8863      # but warn the user (except for BASH, which is always set by the calling BASH).
8864      if test "xMKDIR" != xBASH; then
8865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8866$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8867      fi
8868      # Try to locate tool using the code snippet
8869      for ac_prog in mkdir
8870do
8871  # Extract the first word of "$ac_prog", so it can be a program name with args.
8872set dummy $ac_prog; ac_word=$2
8873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874$as_echo_n "checking for $ac_word... " >&6; }
8875if ${ac_cv_path_MKDIR+:} false; then :
8876  $as_echo_n "(cached) " >&6
8877else
8878  case $MKDIR in
8879  [\\/]* | ?:[\\/]*)
8880  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8881  ;;
8882  *)
8883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884for as_dir in $PATH
8885do
8886  IFS=$as_save_IFS
8887  test -z "$as_dir" && as_dir=.
8888    for ac_exec_ext in '' $ac_executable_extensions; do
8889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892    break 2
8893  fi
8894done
8895  done
8896IFS=$as_save_IFS
8897
8898  ;;
8899esac
8900fi
8901MKDIR=$ac_cv_path_MKDIR
8902if test -n "$MKDIR"; then
8903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8904$as_echo "$MKDIR" >&6; }
8905else
8906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
8908fi
8909
8910
8911  test -n "$MKDIR" && break
8912done
8913
8914    else
8915      # If it succeeded, then it was overridden by the user. We will use it
8916      # for the tool.
8917
8918      # First remove it from the list of overridden variables, so we can test
8919      # for unknown variables in the end.
8920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8921
8922      # Check if we try to supply an empty value
8923      if test "x$MKDIR" = x; then
8924        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8925$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8926        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8927$as_echo_n "checking for MKDIR... " >&6; }
8928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8929$as_echo "disabled" >&6; }
8930      else
8931        # Check if the provided tool contains a complete path.
8932        tool_specified="$MKDIR"
8933        tool_basename="${tool_specified##*/}"
8934        if test "x$tool_basename" = "x$tool_specified"; then
8935          # A command without a complete path is provided, search $PATH.
8936          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8937$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8938          # Extract the first word of "$tool_basename", so it can be a program name with args.
8939set dummy $tool_basename; ac_word=$2
8940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8941$as_echo_n "checking for $ac_word... " >&6; }
8942if ${ac_cv_path_MKDIR+:} false; then :
8943  $as_echo_n "(cached) " >&6
8944else
8945  case $MKDIR in
8946  [\\/]* | ?:[\\/]*)
8947  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8948  ;;
8949  *)
8950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8951for as_dir in $PATH
8952do
8953  IFS=$as_save_IFS
8954  test -z "$as_dir" && as_dir=.
8955    for ac_exec_ext in '' $ac_executable_extensions; do
8956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8957    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8959    break 2
8960  fi
8961done
8962  done
8963IFS=$as_save_IFS
8964
8965  ;;
8966esac
8967fi
8968MKDIR=$ac_cv_path_MKDIR
8969if test -n "$MKDIR"; then
8970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8971$as_echo "$MKDIR" >&6; }
8972else
8973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8974$as_echo "no" >&6; }
8975fi
8976
8977
8978          if test "x$MKDIR" = x; then
8979            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8980          fi
8981        else
8982          # Otherwise we believe it is a complete path. Use it as it is.
8983          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8984$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8985          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8986$as_echo_n "checking for MKDIR... " >&6; }
8987          if test ! -x "$tool_specified"; then
8988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8989$as_echo "not found" >&6; }
8990            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8991          fi
8992          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8993$as_echo "$tool_specified" >&6; }
8994        fi
8995      fi
8996    fi
8997
8998  fi
8999
9000
9001
9002  if test "x$MKDIR" = x; then
9003    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9004  fi
9005
9006
9007
9008
9009
9010  # Publish this variable in the help.
9011
9012
9013  if [ -z "${MKTEMP+x}" ]; then
9014    # The variable is not set by user, try to locate tool using the code snippet
9015    for ac_prog in mktemp
9016do
9017  # Extract the first word of "$ac_prog", so it can be a program name with args.
9018set dummy $ac_prog; ac_word=$2
9019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9020$as_echo_n "checking for $ac_word... " >&6; }
9021if ${ac_cv_path_MKTEMP+:} false; then :
9022  $as_echo_n "(cached) " >&6
9023else
9024  case $MKTEMP in
9025  [\\/]* | ?:[\\/]*)
9026  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9027  ;;
9028  *)
9029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9030for as_dir in $PATH
9031do
9032  IFS=$as_save_IFS
9033  test -z "$as_dir" && as_dir=.
9034    for ac_exec_ext in '' $ac_executable_extensions; do
9035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9036    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9038    break 2
9039  fi
9040done
9041  done
9042IFS=$as_save_IFS
9043
9044  ;;
9045esac
9046fi
9047MKTEMP=$ac_cv_path_MKTEMP
9048if test -n "$MKTEMP"; then
9049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9050$as_echo "$MKTEMP" >&6; }
9051else
9052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9053$as_echo "no" >&6; }
9054fi
9055
9056
9057  test -n "$MKTEMP" && break
9058done
9059
9060  else
9061    # The variable is set, but is it from the command line or the environment?
9062
9063    # Try to remove the string !MKTEMP! from our list.
9064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9066      # If it failed, the variable was not from the command line. Ignore it,
9067      # but warn the user (except for BASH, which is always set by the calling BASH).
9068      if test "xMKTEMP" != xBASH; then
9069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9070$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9071      fi
9072      # Try to locate tool using the code snippet
9073      for ac_prog in mktemp
9074do
9075  # Extract the first word of "$ac_prog", so it can be a program name with args.
9076set dummy $ac_prog; ac_word=$2
9077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9078$as_echo_n "checking for $ac_word... " >&6; }
9079if ${ac_cv_path_MKTEMP+:} false; then :
9080  $as_echo_n "(cached) " >&6
9081else
9082  case $MKTEMP in
9083  [\\/]* | ?:[\\/]*)
9084  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9085  ;;
9086  *)
9087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9088for as_dir in $PATH
9089do
9090  IFS=$as_save_IFS
9091  test -z "$as_dir" && as_dir=.
9092    for ac_exec_ext in '' $ac_executable_extensions; do
9093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9094    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9096    break 2
9097  fi
9098done
9099  done
9100IFS=$as_save_IFS
9101
9102  ;;
9103esac
9104fi
9105MKTEMP=$ac_cv_path_MKTEMP
9106if test -n "$MKTEMP"; then
9107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9108$as_echo "$MKTEMP" >&6; }
9109else
9110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9111$as_echo "no" >&6; }
9112fi
9113
9114
9115  test -n "$MKTEMP" && break
9116done
9117
9118    else
9119      # If it succeeded, then it was overridden by the user. We will use it
9120      # for the tool.
9121
9122      # First remove it from the list of overridden variables, so we can test
9123      # for unknown variables in the end.
9124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9125
9126      # Check if we try to supply an empty value
9127      if test "x$MKTEMP" = x; then
9128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9129$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9131$as_echo_n "checking for MKTEMP... " >&6; }
9132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9133$as_echo "disabled" >&6; }
9134      else
9135        # Check if the provided tool contains a complete path.
9136        tool_specified="$MKTEMP"
9137        tool_basename="${tool_specified##*/}"
9138        if test "x$tool_basename" = "x$tool_specified"; then
9139          # A command without a complete path is provided, search $PATH.
9140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9141$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9142          # Extract the first word of "$tool_basename", so it can be a program name with args.
9143set dummy $tool_basename; ac_word=$2
9144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9145$as_echo_n "checking for $ac_word... " >&6; }
9146if ${ac_cv_path_MKTEMP+:} false; then :
9147  $as_echo_n "(cached) " >&6
9148else
9149  case $MKTEMP in
9150  [\\/]* | ?:[\\/]*)
9151  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9152  ;;
9153  *)
9154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9155for as_dir in $PATH
9156do
9157  IFS=$as_save_IFS
9158  test -z "$as_dir" && as_dir=.
9159    for ac_exec_ext in '' $ac_executable_extensions; do
9160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9161    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9163    break 2
9164  fi
9165done
9166  done
9167IFS=$as_save_IFS
9168
9169  ;;
9170esac
9171fi
9172MKTEMP=$ac_cv_path_MKTEMP
9173if test -n "$MKTEMP"; then
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9175$as_echo "$MKTEMP" >&6; }
9176else
9177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
9180
9181
9182          if test "x$MKTEMP" = x; then
9183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9184          fi
9185        else
9186          # Otherwise we believe it is a complete path. Use it as it is.
9187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9188$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9190$as_echo_n "checking for MKTEMP... " >&6; }
9191          if test ! -x "$tool_specified"; then
9192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9193$as_echo "not found" >&6; }
9194            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9195          fi
9196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9197$as_echo "$tool_specified" >&6; }
9198        fi
9199      fi
9200    fi
9201
9202  fi
9203
9204
9205
9206  if test "x$MKTEMP" = x; then
9207    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9208  fi
9209
9210
9211
9212
9213
9214  # Publish this variable in the help.
9215
9216
9217  if [ -z "${MV+x}" ]; then
9218    # The variable is not set by user, try to locate tool using the code snippet
9219    for ac_prog in mv
9220do
9221  # Extract the first word of "$ac_prog", so it can be a program name with args.
9222set dummy $ac_prog; ac_word=$2
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9224$as_echo_n "checking for $ac_word... " >&6; }
9225if ${ac_cv_path_MV+:} false; then :
9226  $as_echo_n "(cached) " >&6
9227else
9228  case $MV in
9229  [\\/]* | ?:[\\/]*)
9230  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9231  ;;
9232  *)
9233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9234for as_dir in $PATH
9235do
9236  IFS=$as_save_IFS
9237  test -z "$as_dir" && as_dir=.
9238    for ac_exec_ext in '' $ac_executable_extensions; do
9239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9240    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9242    break 2
9243  fi
9244done
9245  done
9246IFS=$as_save_IFS
9247
9248  ;;
9249esac
9250fi
9251MV=$ac_cv_path_MV
9252if test -n "$MV"; then
9253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9254$as_echo "$MV" >&6; }
9255else
9256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9257$as_echo "no" >&6; }
9258fi
9259
9260
9261  test -n "$MV" && break
9262done
9263
9264  else
9265    # The variable is set, but is it from the command line or the environment?
9266
9267    # Try to remove the string !MV! from our list.
9268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9270      # If it failed, the variable was not from the command line. Ignore it,
9271      # but warn the user (except for BASH, which is always set by the calling BASH).
9272      if test "xMV" != xBASH; then
9273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9274$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9275      fi
9276      # Try to locate tool using the code snippet
9277      for ac_prog in mv
9278do
9279  # Extract the first word of "$ac_prog", so it can be a program name with args.
9280set dummy $ac_prog; ac_word=$2
9281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9282$as_echo_n "checking for $ac_word... " >&6; }
9283if ${ac_cv_path_MV+:} false; then :
9284  $as_echo_n "(cached) " >&6
9285else
9286  case $MV in
9287  [\\/]* | ?:[\\/]*)
9288  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9289  ;;
9290  *)
9291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9292for as_dir in $PATH
9293do
9294  IFS=$as_save_IFS
9295  test -z "$as_dir" && as_dir=.
9296    for ac_exec_ext in '' $ac_executable_extensions; do
9297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9298    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9300    break 2
9301  fi
9302done
9303  done
9304IFS=$as_save_IFS
9305
9306  ;;
9307esac
9308fi
9309MV=$ac_cv_path_MV
9310if test -n "$MV"; then
9311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9312$as_echo "$MV" >&6; }
9313else
9314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
9316fi
9317
9318
9319  test -n "$MV" && break
9320done
9321
9322    else
9323      # If it succeeded, then it was overridden by the user. We will use it
9324      # for the tool.
9325
9326      # First remove it from the list of overridden variables, so we can test
9327      # for unknown variables in the end.
9328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9329
9330      # Check if we try to supply an empty value
9331      if test "x$MV" = x; then
9332        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9333$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9334        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9335$as_echo_n "checking for MV... " >&6; }
9336        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9337$as_echo "disabled" >&6; }
9338      else
9339        # Check if the provided tool contains a complete path.
9340        tool_specified="$MV"
9341        tool_basename="${tool_specified##*/}"
9342        if test "x$tool_basename" = "x$tool_specified"; then
9343          # A command without a complete path is provided, search $PATH.
9344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9345$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9346          # Extract the first word of "$tool_basename", so it can be a program name with args.
9347set dummy $tool_basename; ac_word=$2
9348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9349$as_echo_n "checking for $ac_word... " >&6; }
9350if ${ac_cv_path_MV+:} false; then :
9351  $as_echo_n "(cached) " >&6
9352else
9353  case $MV in
9354  [\\/]* | ?:[\\/]*)
9355  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9356  ;;
9357  *)
9358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359for as_dir in $PATH
9360do
9361  IFS=$as_save_IFS
9362  test -z "$as_dir" && as_dir=.
9363    for ac_exec_ext in '' $ac_executable_extensions; do
9364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9365    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9367    break 2
9368  fi
9369done
9370  done
9371IFS=$as_save_IFS
9372
9373  ;;
9374esac
9375fi
9376MV=$ac_cv_path_MV
9377if test -n "$MV"; then
9378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9379$as_echo "$MV" >&6; }
9380else
9381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9382$as_echo "no" >&6; }
9383fi
9384
9385
9386          if test "x$MV" = x; then
9387            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9388          fi
9389        else
9390          # Otherwise we believe it is a complete path. Use it as it is.
9391          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9392$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9393          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9394$as_echo_n "checking for MV... " >&6; }
9395          if test ! -x "$tool_specified"; then
9396            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9397$as_echo "not found" >&6; }
9398            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9399          fi
9400          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9401$as_echo "$tool_specified" >&6; }
9402        fi
9403      fi
9404    fi
9405
9406  fi
9407
9408
9409
9410  if test "x$MV" = x; then
9411    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9412  fi
9413
9414
9415
9416
9417
9418  # Publish this variable in the help.
9419
9420
9421  if [ -z "${NAWK+x}" ]; then
9422    # The variable is not set by user, try to locate tool using the code snippet
9423    for ac_prog in nawk gawk awk
9424do
9425  # Extract the first word of "$ac_prog", so it can be a program name with args.
9426set dummy $ac_prog; ac_word=$2
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428$as_echo_n "checking for $ac_word... " >&6; }
9429if ${ac_cv_path_NAWK+:} false; then :
9430  $as_echo_n "(cached) " >&6
9431else
9432  case $NAWK in
9433  [\\/]* | ?:[\\/]*)
9434  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9435  ;;
9436  *)
9437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438for as_dir in $PATH
9439do
9440  IFS=$as_save_IFS
9441  test -z "$as_dir" && as_dir=.
9442    for ac_exec_ext in '' $ac_executable_extensions; do
9443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446    break 2
9447  fi
9448done
9449  done
9450IFS=$as_save_IFS
9451
9452  ;;
9453esac
9454fi
9455NAWK=$ac_cv_path_NAWK
9456if test -n "$NAWK"; then
9457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9458$as_echo "$NAWK" >&6; }
9459else
9460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
9462fi
9463
9464
9465  test -n "$NAWK" && break
9466done
9467
9468  else
9469    # The variable is set, but is it from the command line or the environment?
9470
9471    # Try to remove the string !NAWK! from our list.
9472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9474      # If it failed, the variable was not from the command line. Ignore it,
9475      # but warn the user (except for BASH, which is always set by the calling BASH).
9476      if test "xNAWK" != xBASH; then
9477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9478$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9479      fi
9480      # Try to locate tool using the code snippet
9481      for ac_prog in nawk gawk awk
9482do
9483  # Extract the first word of "$ac_prog", so it can be a program name with args.
9484set dummy $ac_prog; ac_word=$2
9485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9486$as_echo_n "checking for $ac_word... " >&6; }
9487if ${ac_cv_path_NAWK+:} false; then :
9488  $as_echo_n "(cached) " >&6
9489else
9490  case $NAWK in
9491  [\\/]* | ?:[\\/]*)
9492  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9493  ;;
9494  *)
9495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9496for as_dir in $PATH
9497do
9498  IFS=$as_save_IFS
9499  test -z "$as_dir" && as_dir=.
9500    for ac_exec_ext in '' $ac_executable_extensions; do
9501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9502    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9504    break 2
9505  fi
9506done
9507  done
9508IFS=$as_save_IFS
9509
9510  ;;
9511esac
9512fi
9513NAWK=$ac_cv_path_NAWK
9514if test -n "$NAWK"; then
9515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9516$as_echo "$NAWK" >&6; }
9517else
9518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519$as_echo "no" >&6; }
9520fi
9521
9522
9523  test -n "$NAWK" && break
9524done
9525
9526    else
9527      # If it succeeded, then it was overridden by the user. We will use it
9528      # for the tool.
9529
9530      # First remove it from the list of overridden variables, so we can test
9531      # for unknown variables in the end.
9532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9533
9534      # Check if we try to supply an empty value
9535      if test "x$NAWK" = x; then
9536        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9537$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9539$as_echo_n "checking for NAWK... " >&6; }
9540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9541$as_echo "disabled" >&6; }
9542      else
9543        # Check if the provided tool contains a complete path.
9544        tool_specified="$NAWK"
9545        tool_basename="${tool_specified##*/}"
9546        if test "x$tool_basename" = "x$tool_specified"; then
9547          # A command without a complete path is provided, search $PATH.
9548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9549$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9550          # Extract the first word of "$tool_basename", so it can be a program name with args.
9551set dummy $tool_basename; ac_word=$2
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9553$as_echo_n "checking for $ac_word... " >&6; }
9554if ${ac_cv_path_NAWK+:} false; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557  case $NAWK in
9558  [\\/]* | ?:[\\/]*)
9559  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9560  ;;
9561  *)
9562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563for as_dir in $PATH
9564do
9565  IFS=$as_save_IFS
9566  test -z "$as_dir" && as_dir=.
9567    for ac_exec_ext in '' $ac_executable_extensions; do
9568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9569    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571    break 2
9572  fi
9573done
9574  done
9575IFS=$as_save_IFS
9576
9577  ;;
9578esac
9579fi
9580NAWK=$ac_cv_path_NAWK
9581if test -n "$NAWK"; then
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9583$as_echo "$NAWK" >&6; }
9584else
9585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
9587fi
9588
9589
9590          if test "x$NAWK" = x; then
9591            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9592          fi
9593        else
9594          # Otherwise we believe it is a complete path. Use it as it is.
9595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9596$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9597          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9598$as_echo_n "checking for NAWK... " >&6; }
9599          if test ! -x "$tool_specified"; then
9600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9601$as_echo "not found" >&6; }
9602            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9603          fi
9604          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9605$as_echo "$tool_specified" >&6; }
9606        fi
9607      fi
9608    fi
9609
9610  fi
9611
9612
9613
9614  if test "x$NAWK" = x; then
9615    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9616  fi
9617
9618
9619
9620
9621
9622  # Publish this variable in the help.
9623
9624
9625  if [ -z "${PRINTF+x}" ]; then
9626    # The variable is not set by user, try to locate tool using the code snippet
9627    for ac_prog in printf
9628do
9629  # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if ${ac_cv_path_PRINTF+:} false; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $PRINTF in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9648    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659PRINTF=$ac_cv_path_PRINTF
9660if test -n "$PRINTF"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9662$as_echo "$PRINTF" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669  test -n "$PRINTF" && break
9670done
9671
9672  else
9673    # The variable is set, but is it from the command line or the environment?
9674
9675    # Try to remove the string !PRINTF! from our list.
9676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9678      # If it failed, the variable was not from the command line. Ignore it,
9679      # but warn the user (except for BASH, which is always set by the calling BASH).
9680      if test "xPRINTF" != xBASH; then
9681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9682$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9683      fi
9684      # Try to locate tool using the code snippet
9685      for ac_prog in printf
9686do
9687  # Extract the first word of "$ac_prog", so it can be a program name with args.
9688set dummy $ac_prog; ac_word=$2
9689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9690$as_echo_n "checking for $ac_word... " >&6; }
9691if ${ac_cv_path_PRINTF+:} false; then :
9692  $as_echo_n "(cached) " >&6
9693else
9694  case $PRINTF in
9695  [\\/]* | ?:[\\/]*)
9696  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9697  ;;
9698  *)
9699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9700for as_dir in $PATH
9701do
9702  IFS=$as_save_IFS
9703  test -z "$as_dir" && as_dir=.
9704    for ac_exec_ext in '' $ac_executable_extensions; do
9705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9706    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9708    break 2
9709  fi
9710done
9711  done
9712IFS=$as_save_IFS
9713
9714  ;;
9715esac
9716fi
9717PRINTF=$ac_cv_path_PRINTF
9718if test -n "$PRINTF"; then
9719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9720$as_echo "$PRINTF" >&6; }
9721else
9722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9723$as_echo "no" >&6; }
9724fi
9725
9726
9727  test -n "$PRINTF" && break
9728done
9729
9730    else
9731      # If it succeeded, then it was overridden by the user. We will use it
9732      # for the tool.
9733
9734      # First remove it from the list of overridden variables, so we can test
9735      # for unknown variables in the end.
9736      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9737
9738      # Check if we try to supply an empty value
9739      if test "x$PRINTF" = x; then
9740        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9741$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9742        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9743$as_echo_n "checking for PRINTF... " >&6; }
9744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9745$as_echo "disabled" >&6; }
9746      else
9747        # Check if the provided tool contains a complete path.
9748        tool_specified="$PRINTF"
9749        tool_basename="${tool_specified##*/}"
9750        if test "x$tool_basename" = "x$tool_specified"; then
9751          # A command without a complete path is provided, search $PATH.
9752          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9753$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9754          # Extract the first word of "$tool_basename", so it can be a program name with args.
9755set dummy $tool_basename; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_PRINTF+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $PRINTF in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784PRINTF=$ac_cv_path_PRINTF
9785if test -n "$PRINTF"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9787$as_echo "$PRINTF" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
9794          if test "x$PRINTF" = x; then
9795            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9796          fi
9797        else
9798          # Otherwise we believe it is a complete path. Use it as it is.
9799          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9800$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9801          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9802$as_echo_n "checking for PRINTF... " >&6; }
9803          if test ! -x "$tool_specified"; then
9804            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9805$as_echo "not found" >&6; }
9806            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9807          fi
9808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9809$as_echo "$tool_specified" >&6; }
9810        fi
9811      fi
9812    fi
9813
9814  fi
9815
9816
9817
9818  if test "x$PRINTF" = x; then
9819    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9820  fi
9821
9822
9823
9824
9825
9826  # Publish this variable in the help.
9827
9828
9829  if [ -z "${RM+x}" ]; then
9830    # The variable is not set by user, try to locate tool using the code snippet
9831    for ac_prog in rm
9832do
9833  # Extract the first word of "$ac_prog", so it can be a program name with args.
9834set dummy $ac_prog; ac_word=$2
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9836$as_echo_n "checking for $ac_word... " >&6; }
9837if ${ac_cv_path_RM+:} false; then :
9838  $as_echo_n "(cached) " >&6
9839else
9840  case $RM in
9841  [\\/]* | ?:[\\/]*)
9842  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9843  ;;
9844  *)
9845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846for as_dir in $PATH
9847do
9848  IFS=$as_save_IFS
9849  test -z "$as_dir" && as_dir=.
9850    for ac_exec_ext in '' $ac_executable_extensions; do
9851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854    break 2
9855  fi
9856done
9857  done
9858IFS=$as_save_IFS
9859
9860  ;;
9861esac
9862fi
9863RM=$ac_cv_path_RM
9864if test -n "$RM"; then
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9866$as_echo "$RM" >&6; }
9867else
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9869$as_echo "no" >&6; }
9870fi
9871
9872
9873  test -n "$RM" && break
9874done
9875
9876  else
9877    # The variable is set, but is it from the command line or the environment?
9878
9879    # Try to remove the string !RM! from our list.
9880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9882      # If it failed, the variable was not from the command line. Ignore it,
9883      # but warn the user (except for BASH, which is always set by the calling BASH).
9884      if test "xRM" != xBASH; then
9885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9886$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9887      fi
9888      # Try to locate tool using the code snippet
9889      for ac_prog in rm
9890do
9891  # Extract the first word of "$ac_prog", so it can be a program name with args.
9892set dummy $ac_prog; ac_word=$2
9893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9894$as_echo_n "checking for $ac_word... " >&6; }
9895if ${ac_cv_path_RM+:} false; then :
9896  $as_echo_n "(cached) " >&6
9897else
9898  case $RM in
9899  [\\/]* | ?:[\\/]*)
9900  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9901  ;;
9902  *)
9903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9904for as_dir in $PATH
9905do
9906  IFS=$as_save_IFS
9907  test -z "$as_dir" && as_dir=.
9908    for ac_exec_ext in '' $ac_executable_extensions; do
9909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9910    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9912    break 2
9913  fi
9914done
9915  done
9916IFS=$as_save_IFS
9917
9918  ;;
9919esac
9920fi
9921RM=$ac_cv_path_RM
9922if test -n "$RM"; then
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9924$as_echo "$RM" >&6; }
9925else
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9927$as_echo "no" >&6; }
9928fi
9929
9930
9931  test -n "$RM" && break
9932done
9933
9934    else
9935      # If it succeeded, then it was overridden by the user. We will use it
9936      # for the tool.
9937
9938      # First remove it from the list of overridden variables, so we can test
9939      # for unknown variables in the end.
9940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9941
9942      # Check if we try to supply an empty value
9943      if test "x$RM" = x; then
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9945$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9947$as_echo_n "checking for RM... " >&6; }
9948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9949$as_echo "disabled" >&6; }
9950      else
9951        # Check if the provided tool contains a complete path.
9952        tool_specified="$RM"
9953        tool_basename="${tool_specified##*/}"
9954        if test "x$tool_basename" = "x$tool_specified"; then
9955          # A command without a complete path is provided, search $PATH.
9956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9957$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9958          # Extract the first word of "$tool_basename", so it can be a program name with args.
9959set dummy $tool_basename; ac_word=$2
9960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9961$as_echo_n "checking for $ac_word... " >&6; }
9962if ${ac_cv_path_RM+:} false; then :
9963  $as_echo_n "(cached) " >&6
9964else
9965  case $RM in
9966  [\\/]* | ?:[\\/]*)
9967  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9968  ;;
9969  *)
9970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9971for as_dir in $PATH
9972do
9973  IFS=$as_save_IFS
9974  test -z "$as_dir" && as_dir=.
9975    for ac_exec_ext in '' $ac_executable_extensions; do
9976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9977    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9979    break 2
9980  fi
9981done
9982  done
9983IFS=$as_save_IFS
9984
9985  ;;
9986esac
9987fi
9988RM=$ac_cv_path_RM
9989if test -n "$RM"; then
9990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9991$as_echo "$RM" >&6; }
9992else
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9994$as_echo "no" >&6; }
9995fi
9996
9997
9998          if test "x$RM" = x; then
9999            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10000          fi
10001        else
10002          # Otherwise we believe it is a complete path. Use it as it is.
10003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10004$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10005          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10006$as_echo_n "checking for RM... " >&6; }
10007          if test ! -x "$tool_specified"; then
10008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10009$as_echo "not found" >&6; }
10010            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10011          fi
10012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10013$as_echo "$tool_specified" >&6; }
10014        fi
10015      fi
10016    fi
10017
10018  fi
10019
10020
10021
10022  if test "x$RM" = x; then
10023    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10024  fi
10025
10026
10027
10028
10029
10030  # Publish this variable in the help.
10031
10032
10033  if [ -z "${RMDIR+x}" ]; then
10034    # The variable is not set by user, try to locate tool using the code snippet
10035    for ac_prog in rmdir
10036do
10037  # Extract the first word of "$ac_prog", so it can be a program name with args.
10038set dummy $ac_prog; ac_word=$2
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10040$as_echo_n "checking for $ac_word... " >&6; }
10041if ${ac_cv_path_RMDIR+:} false; then :
10042  $as_echo_n "(cached) " >&6
10043else
10044  case $RMDIR in
10045  [\\/]* | ?:[\\/]*)
10046  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10047  ;;
10048  *)
10049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10050for as_dir in $PATH
10051do
10052  IFS=$as_save_IFS
10053  test -z "$as_dir" && as_dir=.
10054    for ac_exec_ext in '' $ac_executable_extensions; do
10055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10056    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10058    break 2
10059  fi
10060done
10061  done
10062IFS=$as_save_IFS
10063
10064  ;;
10065esac
10066fi
10067RMDIR=$ac_cv_path_RMDIR
10068if test -n "$RMDIR"; then
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10070$as_echo "$RMDIR" >&6; }
10071else
10072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10073$as_echo "no" >&6; }
10074fi
10075
10076
10077  test -n "$RMDIR" && break
10078done
10079
10080  else
10081    # The variable is set, but is it from the command line or the environment?
10082
10083    # Try to remove the string !RMDIR! from our list.
10084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10086      # If it failed, the variable was not from the command line. Ignore it,
10087      # but warn the user (except for BASH, which is always set by the calling BASH).
10088      if test "xRMDIR" != xBASH; then
10089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10090$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10091      fi
10092      # Try to locate tool using the code snippet
10093      for ac_prog in rmdir
10094do
10095  # Extract the first word of "$ac_prog", so it can be a program name with args.
10096set dummy $ac_prog; ac_word=$2
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10098$as_echo_n "checking for $ac_word... " >&6; }
10099if ${ac_cv_path_RMDIR+:} false; then :
10100  $as_echo_n "(cached) " >&6
10101else
10102  case $RMDIR in
10103  [\\/]* | ?:[\\/]*)
10104  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10105  ;;
10106  *)
10107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10108for as_dir in $PATH
10109do
10110  IFS=$as_save_IFS
10111  test -z "$as_dir" && as_dir=.
10112    for ac_exec_ext in '' $ac_executable_extensions; do
10113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10114    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10116    break 2
10117  fi
10118done
10119  done
10120IFS=$as_save_IFS
10121
10122  ;;
10123esac
10124fi
10125RMDIR=$ac_cv_path_RMDIR
10126if test -n "$RMDIR"; then
10127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10128$as_echo "$RMDIR" >&6; }
10129else
10130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
10132fi
10133
10134
10135  test -n "$RMDIR" && break
10136done
10137
10138    else
10139      # If it succeeded, then it was overridden by the user. We will use it
10140      # for the tool.
10141
10142      # First remove it from the list of overridden variables, so we can test
10143      # for unknown variables in the end.
10144      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10145
10146      # Check if we try to supply an empty value
10147      if test "x$RMDIR" = x; then
10148        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10149$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10150        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10151$as_echo_n "checking for RMDIR... " >&6; }
10152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10153$as_echo "disabled" >&6; }
10154      else
10155        # Check if the provided tool contains a complete path.
10156        tool_specified="$RMDIR"
10157        tool_basename="${tool_specified##*/}"
10158        if test "x$tool_basename" = "x$tool_specified"; then
10159          # A command without a complete path is provided, search $PATH.
10160          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10161$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10162          # Extract the first word of "$tool_basename", so it can be a program name with args.
10163set dummy $tool_basename; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if ${ac_cv_path_RMDIR+:} false; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $RMDIR in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10181    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192RMDIR=$ac_cv_path_RMDIR
10193if test -n "$RMDIR"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10195$as_echo "$RMDIR" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202          if test "x$RMDIR" = x; then
10203            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10204          fi
10205        else
10206          # Otherwise we believe it is a complete path. Use it as it is.
10207          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10208$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10209          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10210$as_echo_n "checking for RMDIR... " >&6; }
10211          if test ! -x "$tool_specified"; then
10212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10213$as_echo "not found" >&6; }
10214            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10215          fi
10216          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10217$as_echo "$tool_specified" >&6; }
10218        fi
10219      fi
10220    fi
10221
10222  fi
10223
10224
10225
10226  if test "x$RMDIR" = x; then
10227    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10228  fi
10229
10230
10231
10232
10233
10234  # Publish this variable in the help.
10235
10236
10237  if [ -z "${SH+x}" ]; then
10238    # The variable is not set by user, try to locate tool using the code snippet
10239    for ac_prog in sh
10240do
10241  # Extract the first word of "$ac_prog", so it can be a program name with args.
10242set dummy $ac_prog; ac_word=$2
10243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10244$as_echo_n "checking for $ac_word... " >&6; }
10245if ${ac_cv_path_SH+:} false; then :
10246  $as_echo_n "(cached) " >&6
10247else
10248  case $SH in
10249  [\\/]* | ?:[\\/]*)
10250  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10251  ;;
10252  *)
10253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10254for as_dir in $PATH
10255do
10256  IFS=$as_save_IFS
10257  test -z "$as_dir" && as_dir=.
10258    for ac_exec_ext in '' $ac_executable_extensions; do
10259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10260    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10262    break 2
10263  fi
10264done
10265  done
10266IFS=$as_save_IFS
10267
10268  ;;
10269esac
10270fi
10271SH=$ac_cv_path_SH
10272if test -n "$SH"; then
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10274$as_echo "$SH" >&6; }
10275else
10276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10277$as_echo "no" >&6; }
10278fi
10279
10280
10281  test -n "$SH" && break
10282done
10283
10284  else
10285    # The variable is set, but is it from the command line or the environment?
10286
10287    # Try to remove the string !SH! from our list.
10288    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10289    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10290      # If it failed, the variable was not from the command line. Ignore it,
10291      # but warn the user (except for BASH, which is always set by the calling BASH).
10292      if test "xSH" != xBASH; then
10293        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10294$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10295      fi
10296      # Try to locate tool using the code snippet
10297      for ac_prog in sh
10298do
10299  # Extract the first word of "$ac_prog", so it can be a program name with args.
10300set dummy $ac_prog; ac_word=$2
10301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10302$as_echo_n "checking for $ac_word... " >&6; }
10303if ${ac_cv_path_SH+:} false; then :
10304  $as_echo_n "(cached) " >&6
10305else
10306  case $SH in
10307  [\\/]* | ?:[\\/]*)
10308  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10309  ;;
10310  *)
10311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10312for as_dir in $PATH
10313do
10314  IFS=$as_save_IFS
10315  test -z "$as_dir" && as_dir=.
10316    for ac_exec_ext in '' $ac_executable_extensions; do
10317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10318    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10320    break 2
10321  fi
10322done
10323  done
10324IFS=$as_save_IFS
10325
10326  ;;
10327esac
10328fi
10329SH=$ac_cv_path_SH
10330if test -n "$SH"; then
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10332$as_echo "$SH" >&6; }
10333else
10334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10335$as_echo "no" >&6; }
10336fi
10337
10338
10339  test -n "$SH" && break
10340done
10341
10342    else
10343      # If it succeeded, then it was overridden by the user. We will use it
10344      # for the tool.
10345
10346      # First remove it from the list of overridden variables, so we can test
10347      # for unknown variables in the end.
10348      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10349
10350      # Check if we try to supply an empty value
10351      if test "x$SH" = x; then
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10353$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10354        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10355$as_echo_n "checking for SH... " >&6; }
10356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10357$as_echo "disabled" >&6; }
10358      else
10359        # Check if the provided tool contains a complete path.
10360        tool_specified="$SH"
10361        tool_basename="${tool_specified##*/}"
10362        if test "x$tool_basename" = "x$tool_specified"; then
10363          # A command without a complete path is provided, search $PATH.
10364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10365$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10366          # Extract the first word of "$tool_basename", so it can be a program name with args.
10367set dummy $tool_basename; ac_word=$2
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10369$as_echo_n "checking for $ac_word... " >&6; }
10370if ${ac_cv_path_SH+:} false; then :
10371  $as_echo_n "(cached) " >&6
10372else
10373  case $SH in
10374  [\\/]* | ?:[\\/]*)
10375  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10376  ;;
10377  *)
10378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10379for as_dir in $PATH
10380do
10381  IFS=$as_save_IFS
10382  test -z "$as_dir" && as_dir=.
10383    for ac_exec_ext in '' $ac_executable_extensions; do
10384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10385    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10387    break 2
10388  fi
10389done
10390  done
10391IFS=$as_save_IFS
10392
10393  ;;
10394esac
10395fi
10396SH=$ac_cv_path_SH
10397if test -n "$SH"; then
10398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10399$as_echo "$SH" >&6; }
10400else
10401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
10403fi
10404
10405
10406          if test "x$SH" = x; then
10407            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10408          fi
10409        else
10410          # Otherwise we believe it is a complete path. Use it as it is.
10411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10412$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10413          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10414$as_echo_n "checking for SH... " >&6; }
10415          if test ! -x "$tool_specified"; then
10416            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10417$as_echo "not found" >&6; }
10418            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10419          fi
10420          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10421$as_echo "$tool_specified" >&6; }
10422        fi
10423      fi
10424    fi
10425
10426  fi
10427
10428
10429
10430  if test "x$SH" = x; then
10431    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10432  fi
10433
10434
10435
10436
10437
10438  # Publish this variable in the help.
10439
10440
10441  if [ -z "${SORT+x}" ]; then
10442    # The variable is not set by user, try to locate tool using the code snippet
10443    for ac_prog in sort
10444do
10445  # Extract the first word of "$ac_prog", so it can be a program name with args.
10446set dummy $ac_prog; ac_word=$2
10447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10448$as_echo_n "checking for $ac_word... " >&6; }
10449if ${ac_cv_path_SORT+:} false; then :
10450  $as_echo_n "(cached) " >&6
10451else
10452  case $SORT in
10453  [\\/]* | ?:[\\/]*)
10454  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10455  ;;
10456  *)
10457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10458for as_dir in $PATH
10459do
10460  IFS=$as_save_IFS
10461  test -z "$as_dir" && as_dir=.
10462    for ac_exec_ext in '' $ac_executable_extensions; do
10463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10464    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10466    break 2
10467  fi
10468done
10469  done
10470IFS=$as_save_IFS
10471
10472  ;;
10473esac
10474fi
10475SORT=$ac_cv_path_SORT
10476if test -n "$SORT"; then
10477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10478$as_echo "$SORT" >&6; }
10479else
10480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481$as_echo "no" >&6; }
10482fi
10483
10484
10485  test -n "$SORT" && break
10486done
10487
10488  else
10489    # The variable is set, but is it from the command line or the environment?
10490
10491    # Try to remove the string !SORT! from our list.
10492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10494      # If it failed, the variable was not from the command line. Ignore it,
10495      # but warn the user (except for BASH, which is always set by the calling BASH).
10496      if test "xSORT" != xBASH; then
10497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10498$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10499      fi
10500      # Try to locate tool using the code snippet
10501      for ac_prog in sort
10502do
10503  # Extract the first word of "$ac_prog", so it can be a program name with args.
10504set dummy $ac_prog; ac_word=$2
10505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10506$as_echo_n "checking for $ac_word... " >&6; }
10507if ${ac_cv_path_SORT+:} false; then :
10508  $as_echo_n "(cached) " >&6
10509else
10510  case $SORT in
10511  [\\/]* | ?:[\\/]*)
10512  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10513  ;;
10514  *)
10515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10516for as_dir in $PATH
10517do
10518  IFS=$as_save_IFS
10519  test -z "$as_dir" && as_dir=.
10520    for ac_exec_ext in '' $ac_executable_extensions; do
10521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10522    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10524    break 2
10525  fi
10526done
10527  done
10528IFS=$as_save_IFS
10529
10530  ;;
10531esac
10532fi
10533SORT=$ac_cv_path_SORT
10534if test -n "$SORT"; then
10535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10536$as_echo "$SORT" >&6; }
10537else
10538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10539$as_echo "no" >&6; }
10540fi
10541
10542
10543  test -n "$SORT" && break
10544done
10545
10546    else
10547      # If it succeeded, then it was overridden by the user. We will use it
10548      # for the tool.
10549
10550      # First remove it from the list of overridden variables, so we can test
10551      # for unknown variables in the end.
10552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10553
10554      # Check if we try to supply an empty value
10555      if test "x$SORT" = x; then
10556        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10557$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10559$as_echo_n "checking for SORT... " >&6; }
10560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10561$as_echo "disabled" >&6; }
10562      else
10563        # Check if the provided tool contains a complete path.
10564        tool_specified="$SORT"
10565        tool_basename="${tool_specified##*/}"
10566        if test "x$tool_basename" = "x$tool_specified"; then
10567          # A command without a complete path is provided, search $PATH.
10568          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10569$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10570          # Extract the first word of "$tool_basename", so it can be a program name with args.
10571set dummy $tool_basename; ac_word=$2
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10573$as_echo_n "checking for $ac_word... " >&6; }
10574if ${ac_cv_path_SORT+:} false; then :
10575  $as_echo_n "(cached) " >&6
10576else
10577  case $SORT in
10578  [\\/]* | ?:[\\/]*)
10579  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10580  ;;
10581  *)
10582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10583for as_dir in $PATH
10584do
10585  IFS=$as_save_IFS
10586  test -z "$as_dir" && as_dir=.
10587    for ac_exec_ext in '' $ac_executable_extensions; do
10588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10589    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10591    break 2
10592  fi
10593done
10594  done
10595IFS=$as_save_IFS
10596
10597  ;;
10598esac
10599fi
10600SORT=$ac_cv_path_SORT
10601if test -n "$SORT"; then
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10603$as_echo "$SORT" >&6; }
10604else
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607fi
10608
10609
10610          if test "x$SORT" = x; then
10611            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10612          fi
10613        else
10614          # Otherwise we believe it is a complete path. Use it as it is.
10615          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10616$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10617          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10618$as_echo_n "checking for SORT... " >&6; }
10619          if test ! -x "$tool_specified"; then
10620            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10621$as_echo "not found" >&6; }
10622            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10623          fi
10624          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10625$as_echo "$tool_specified" >&6; }
10626        fi
10627      fi
10628    fi
10629
10630  fi
10631
10632
10633
10634  if test "x$SORT" = x; then
10635    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10636  fi
10637
10638
10639
10640
10641
10642  # Publish this variable in the help.
10643
10644
10645  if [ -z "${TAIL+x}" ]; then
10646    # The variable is not set by user, try to locate tool using the code snippet
10647    for ac_prog in tail
10648do
10649  # Extract the first word of "$ac_prog", so it can be a program name with args.
10650set dummy $ac_prog; ac_word=$2
10651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10652$as_echo_n "checking for $ac_word... " >&6; }
10653if ${ac_cv_path_TAIL+:} false; then :
10654  $as_echo_n "(cached) " >&6
10655else
10656  case $TAIL in
10657  [\\/]* | ?:[\\/]*)
10658  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10659  ;;
10660  *)
10661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10662for as_dir in $PATH
10663do
10664  IFS=$as_save_IFS
10665  test -z "$as_dir" && as_dir=.
10666    for ac_exec_ext in '' $ac_executable_extensions; do
10667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10668    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10670    break 2
10671  fi
10672done
10673  done
10674IFS=$as_save_IFS
10675
10676  ;;
10677esac
10678fi
10679TAIL=$ac_cv_path_TAIL
10680if test -n "$TAIL"; then
10681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10682$as_echo "$TAIL" >&6; }
10683else
10684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10685$as_echo "no" >&6; }
10686fi
10687
10688
10689  test -n "$TAIL" && break
10690done
10691
10692  else
10693    # The variable is set, but is it from the command line or the environment?
10694
10695    # Try to remove the string !TAIL! from our list.
10696    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10697    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10698      # If it failed, the variable was not from the command line. Ignore it,
10699      # but warn the user (except for BASH, which is always set by the calling BASH).
10700      if test "xTAIL" != xBASH; then
10701        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10702$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10703      fi
10704      # Try to locate tool using the code snippet
10705      for ac_prog in tail
10706do
10707  # Extract the first word of "$ac_prog", so it can be a program name with args.
10708set dummy $ac_prog; ac_word=$2
10709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10710$as_echo_n "checking for $ac_word... " >&6; }
10711if ${ac_cv_path_TAIL+:} false; then :
10712  $as_echo_n "(cached) " >&6
10713else
10714  case $TAIL in
10715  [\\/]* | ?:[\\/]*)
10716  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10717  ;;
10718  *)
10719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10720for as_dir in $PATH
10721do
10722  IFS=$as_save_IFS
10723  test -z "$as_dir" && as_dir=.
10724    for ac_exec_ext in '' $ac_executable_extensions; do
10725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10726    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10728    break 2
10729  fi
10730done
10731  done
10732IFS=$as_save_IFS
10733
10734  ;;
10735esac
10736fi
10737TAIL=$ac_cv_path_TAIL
10738if test -n "$TAIL"; then
10739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10740$as_echo "$TAIL" >&6; }
10741else
10742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10743$as_echo "no" >&6; }
10744fi
10745
10746
10747  test -n "$TAIL" && break
10748done
10749
10750    else
10751      # If it succeeded, then it was overridden by the user. We will use it
10752      # for the tool.
10753
10754      # First remove it from the list of overridden variables, so we can test
10755      # for unknown variables in the end.
10756      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10757
10758      # Check if we try to supply an empty value
10759      if test "x$TAIL" = x; then
10760        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10761$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10763$as_echo_n "checking for TAIL... " >&6; }
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10765$as_echo "disabled" >&6; }
10766      else
10767        # Check if the provided tool contains a complete path.
10768        tool_specified="$TAIL"
10769        tool_basename="${tool_specified##*/}"
10770        if test "x$tool_basename" = "x$tool_specified"; then
10771          # A command without a complete path is provided, search $PATH.
10772          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10773$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10774          # Extract the first word of "$tool_basename", so it can be a program name with args.
10775set dummy $tool_basename; ac_word=$2
10776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10777$as_echo_n "checking for $ac_word... " >&6; }
10778if ${ac_cv_path_TAIL+:} false; then :
10779  $as_echo_n "(cached) " >&6
10780else
10781  case $TAIL in
10782  [\\/]* | ?:[\\/]*)
10783  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10784  ;;
10785  *)
10786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10787for as_dir in $PATH
10788do
10789  IFS=$as_save_IFS
10790  test -z "$as_dir" && as_dir=.
10791    for ac_exec_ext in '' $ac_executable_extensions; do
10792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10793    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10795    break 2
10796  fi
10797done
10798  done
10799IFS=$as_save_IFS
10800
10801  ;;
10802esac
10803fi
10804TAIL=$ac_cv_path_TAIL
10805if test -n "$TAIL"; then
10806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10807$as_echo "$TAIL" >&6; }
10808else
10809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10810$as_echo "no" >&6; }
10811fi
10812
10813
10814          if test "x$TAIL" = x; then
10815            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10816          fi
10817        else
10818          # Otherwise we believe it is a complete path. Use it as it is.
10819          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10820$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10821          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10822$as_echo_n "checking for TAIL... " >&6; }
10823          if test ! -x "$tool_specified"; then
10824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10825$as_echo "not found" >&6; }
10826            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10827          fi
10828          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10829$as_echo "$tool_specified" >&6; }
10830        fi
10831      fi
10832    fi
10833
10834  fi
10835
10836
10837
10838  if test "x$TAIL" = x; then
10839    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10840  fi
10841
10842
10843
10844
10845
10846  # Publish this variable in the help.
10847
10848
10849  if [ -z "${TAR+x}" ]; then
10850    # The variable is not set by user, try to locate tool using the code snippet
10851    for ac_prog in tar
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_TAR+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $TAR in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883TAR=$ac_cv_path_TAR
10884if test -n "$TAR"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10886$as_echo "$TAR" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$TAR" && break
10894done
10895
10896  else
10897    # The variable is set, but is it from the command line or the environment?
10898
10899    # Try to remove the string !TAR! from our list.
10900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10902      # If it failed, the variable was not from the command line. Ignore it,
10903      # but warn the user (except for BASH, which is always set by the calling BASH).
10904      if test "xTAR" != xBASH; then
10905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10906$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10907      fi
10908      # Try to locate tool using the code snippet
10909      for ac_prog in tar
10910do
10911  # Extract the first word of "$ac_prog", so it can be a program name with args.
10912set dummy $ac_prog; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_TAR+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $TAR in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941TAR=$ac_cv_path_TAR
10942if test -n "$TAR"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10944$as_echo "$TAR" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951  test -n "$TAR" && break
10952done
10953
10954    else
10955      # If it succeeded, then it was overridden by the user. We will use it
10956      # for the tool.
10957
10958      # First remove it from the list of overridden variables, so we can test
10959      # for unknown variables in the end.
10960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10961
10962      # Check if we try to supply an empty value
10963      if test "x$TAR" = x; then
10964        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10965$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10966        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10967$as_echo_n "checking for TAR... " >&6; }
10968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10969$as_echo "disabled" >&6; }
10970      else
10971        # Check if the provided tool contains a complete path.
10972        tool_specified="$TAR"
10973        tool_basename="${tool_specified##*/}"
10974        if test "x$tool_basename" = "x$tool_specified"; then
10975          # A command without a complete path is provided, search $PATH.
10976          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10977$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10978          # Extract the first word of "$tool_basename", so it can be a program name with args.
10979set dummy $tool_basename; ac_word=$2
10980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10981$as_echo_n "checking for $ac_word... " >&6; }
10982if ${ac_cv_path_TAR+:} false; then :
10983  $as_echo_n "(cached) " >&6
10984else
10985  case $TAR in
10986  [\\/]* | ?:[\\/]*)
10987  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10988  ;;
10989  *)
10990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10991for as_dir in $PATH
10992do
10993  IFS=$as_save_IFS
10994  test -z "$as_dir" && as_dir=.
10995    for ac_exec_ext in '' $ac_executable_extensions; do
10996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10997    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10999    break 2
11000  fi
11001done
11002  done
11003IFS=$as_save_IFS
11004
11005  ;;
11006esac
11007fi
11008TAR=$ac_cv_path_TAR
11009if test -n "$TAR"; then
11010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11011$as_echo "$TAR" >&6; }
11012else
11013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11014$as_echo "no" >&6; }
11015fi
11016
11017
11018          if test "x$TAR" = x; then
11019            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11020          fi
11021        else
11022          # Otherwise we believe it is a complete path. Use it as it is.
11023          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11024$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11025          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11026$as_echo_n "checking for TAR... " >&6; }
11027          if test ! -x "$tool_specified"; then
11028            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11029$as_echo "not found" >&6; }
11030            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11031          fi
11032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11033$as_echo "$tool_specified" >&6; }
11034        fi
11035      fi
11036    fi
11037
11038  fi
11039
11040
11041
11042  if test "x$TAR" = x; then
11043    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11044  fi
11045
11046
11047
11048
11049
11050  # Publish this variable in the help.
11051
11052
11053  if [ -z "${TEE+x}" ]; then
11054    # The variable is not set by user, try to locate tool using the code snippet
11055    for ac_prog in tee
11056do
11057  # Extract the first word of "$ac_prog", so it can be a program name with args.
11058set dummy $ac_prog; ac_word=$2
11059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11060$as_echo_n "checking for $ac_word... " >&6; }
11061if ${ac_cv_path_TEE+:} false; then :
11062  $as_echo_n "(cached) " >&6
11063else
11064  case $TEE in
11065  [\\/]* | ?:[\\/]*)
11066  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11067  ;;
11068  *)
11069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11070for as_dir in $PATH
11071do
11072  IFS=$as_save_IFS
11073  test -z "$as_dir" && as_dir=.
11074    for ac_exec_ext in '' $ac_executable_extensions; do
11075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11076    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11078    break 2
11079  fi
11080done
11081  done
11082IFS=$as_save_IFS
11083
11084  ;;
11085esac
11086fi
11087TEE=$ac_cv_path_TEE
11088if test -n "$TEE"; then
11089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11090$as_echo "$TEE" >&6; }
11091else
11092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11093$as_echo "no" >&6; }
11094fi
11095
11096
11097  test -n "$TEE" && break
11098done
11099
11100  else
11101    # The variable is set, but is it from the command line or the environment?
11102
11103    # Try to remove the string !TEE! from our list.
11104    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11105    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11106      # If it failed, the variable was not from the command line. Ignore it,
11107      # but warn the user (except for BASH, which is always set by the calling BASH).
11108      if test "xTEE" != xBASH; then
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11110$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11111      fi
11112      # Try to locate tool using the code snippet
11113      for ac_prog in tee
11114do
11115  # Extract the first word of "$ac_prog", so it can be a program name with args.
11116set dummy $ac_prog; ac_word=$2
11117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11118$as_echo_n "checking for $ac_word... " >&6; }
11119if ${ac_cv_path_TEE+:} false; then :
11120  $as_echo_n "(cached) " >&6
11121else
11122  case $TEE in
11123  [\\/]* | ?:[\\/]*)
11124  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11125  ;;
11126  *)
11127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11128for as_dir in $PATH
11129do
11130  IFS=$as_save_IFS
11131  test -z "$as_dir" && as_dir=.
11132    for ac_exec_ext in '' $ac_executable_extensions; do
11133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11134    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11136    break 2
11137  fi
11138done
11139  done
11140IFS=$as_save_IFS
11141
11142  ;;
11143esac
11144fi
11145TEE=$ac_cv_path_TEE
11146if test -n "$TEE"; then
11147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11148$as_echo "$TEE" >&6; }
11149else
11150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
11152fi
11153
11154
11155  test -n "$TEE" && break
11156done
11157
11158    else
11159      # If it succeeded, then it was overridden by the user. We will use it
11160      # for the tool.
11161
11162      # First remove it from the list of overridden variables, so we can test
11163      # for unknown variables in the end.
11164      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11165
11166      # Check if we try to supply an empty value
11167      if test "x$TEE" = x; then
11168        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11169$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11170        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11171$as_echo_n "checking for TEE... " >&6; }
11172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11173$as_echo "disabled" >&6; }
11174      else
11175        # Check if the provided tool contains a complete path.
11176        tool_specified="$TEE"
11177        tool_basename="${tool_specified##*/}"
11178        if test "x$tool_basename" = "x$tool_specified"; then
11179          # A command without a complete path is provided, search $PATH.
11180          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11181$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11182          # Extract the first word of "$tool_basename", so it can be a program name with args.
11183set dummy $tool_basename; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_TEE+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $TEE in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212TEE=$ac_cv_path_TEE
11213if test -n "$TEE"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11215$as_echo "$TEE" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222          if test "x$TEE" = x; then
11223            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11224          fi
11225        else
11226          # Otherwise we believe it is a complete path. Use it as it is.
11227          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11228$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11229          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11230$as_echo_n "checking for TEE... " >&6; }
11231          if test ! -x "$tool_specified"; then
11232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11233$as_echo "not found" >&6; }
11234            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11235          fi
11236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11237$as_echo "$tool_specified" >&6; }
11238        fi
11239      fi
11240    fi
11241
11242  fi
11243
11244
11245
11246  if test "x$TEE" = x; then
11247    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11248  fi
11249
11250
11251
11252
11253
11254  # Publish this variable in the help.
11255
11256
11257  if [ -z "${TOUCH+x}" ]; then
11258    # The variable is not set by user, try to locate tool using the code snippet
11259    for ac_prog in touch
11260do
11261  # Extract the first word of "$ac_prog", so it can be a program name with args.
11262set dummy $ac_prog; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_TOUCH+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $TOUCH in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291TOUCH=$ac_cv_path_TOUCH
11292if test -n "$TOUCH"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11294$as_echo "$TOUCH" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301  test -n "$TOUCH" && break
11302done
11303
11304  else
11305    # The variable is set, but is it from the command line or the environment?
11306
11307    # Try to remove the string !TOUCH! from our list.
11308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11310      # If it failed, the variable was not from the command line. Ignore it,
11311      # but warn the user (except for BASH, which is always set by the calling BASH).
11312      if test "xTOUCH" != xBASH; then
11313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11314$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11315      fi
11316      # Try to locate tool using the code snippet
11317      for ac_prog in touch
11318do
11319  # Extract the first word of "$ac_prog", so it can be a program name with args.
11320set dummy $ac_prog; ac_word=$2
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11322$as_echo_n "checking for $ac_word... " >&6; }
11323if ${ac_cv_path_TOUCH+:} false; then :
11324  $as_echo_n "(cached) " >&6
11325else
11326  case $TOUCH in
11327  [\\/]* | ?:[\\/]*)
11328  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11329  ;;
11330  *)
11331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11332for as_dir in $PATH
11333do
11334  IFS=$as_save_IFS
11335  test -z "$as_dir" && as_dir=.
11336    for ac_exec_ext in '' $ac_executable_extensions; do
11337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11338    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11340    break 2
11341  fi
11342done
11343  done
11344IFS=$as_save_IFS
11345
11346  ;;
11347esac
11348fi
11349TOUCH=$ac_cv_path_TOUCH
11350if test -n "$TOUCH"; then
11351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11352$as_echo "$TOUCH" >&6; }
11353else
11354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
11356fi
11357
11358
11359  test -n "$TOUCH" && break
11360done
11361
11362    else
11363      # If it succeeded, then it was overridden by the user. We will use it
11364      # for the tool.
11365
11366      # First remove it from the list of overridden variables, so we can test
11367      # for unknown variables in the end.
11368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11369
11370      # Check if we try to supply an empty value
11371      if test "x$TOUCH" = x; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11373$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11375$as_echo_n "checking for TOUCH... " >&6; }
11376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11377$as_echo "disabled" >&6; }
11378      else
11379        # Check if the provided tool contains a complete path.
11380        tool_specified="$TOUCH"
11381        tool_basename="${tool_specified##*/}"
11382        if test "x$tool_basename" = "x$tool_specified"; then
11383          # A command without a complete path is provided, search $PATH.
11384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11385$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11386          # Extract the first word of "$tool_basename", so it can be a program name with args.
11387set dummy $tool_basename; ac_word=$2
11388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11389$as_echo_n "checking for $ac_word... " >&6; }
11390if ${ac_cv_path_TOUCH+:} false; then :
11391  $as_echo_n "(cached) " >&6
11392else
11393  case $TOUCH in
11394  [\\/]* | ?:[\\/]*)
11395  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11396  ;;
11397  *)
11398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11399for as_dir in $PATH
11400do
11401  IFS=$as_save_IFS
11402  test -z "$as_dir" && as_dir=.
11403    for ac_exec_ext in '' $ac_executable_extensions; do
11404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11405    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11407    break 2
11408  fi
11409done
11410  done
11411IFS=$as_save_IFS
11412
11413  ;;
11414esac
11415fi
11416TOUCH=$ac_cv_path_TOUCH
11417if test -n "$TOUCH"; then
11418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11419$as_echo "$TOUCH" >&6; }
11420else
11421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11422$as_echo "no" >&6; }
11423fi
11424
11425
11426          if test "x$TOUCH" = x; then
11427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11428          fi
11429        else
11430          # Otherwise we believe it is a complete path. Use it as it is.
11431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11432$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11434$as_echo_n "checking for TOUCH... " >&6; }
11435          if test ! -x "$tool_specified"; then
11436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11437$as_echo "not found" >&6; }
11438            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11439          fi
11440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11441$as_echo "$tool_specified" >&6; }
11442        fi
11443      fi
11444    fi
11445
11446  fi
11447
11448
11449
11450  if test "x$TOUCH" = x; then
11451    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11452  fi
11453
11454
11455
11456
11457
11458  # Publish this variable in the help.
11459
11460
11461  if [ -z "${TR+x}" ]; then
11462    # The variable is not set by user, try to locate tool using the code snippet
11463    for ac_prog in tr
11464do
11465  # Extract the first word of "$ac_prog", so it can be a program name with args.
11466set dummy $ac_prog; ac_word=$2
11467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11468$as_echo_n "checking for $ac_word... " >&6; }
11469if ${ac_cv_path_TR+:} false; then :
11470  $as_echo_n "(cached) " >&6
11471else
11472  case $TR in
11473  [\\/]* | ?:[\\/]*)
11474  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11475  ;;
11476  *)
11477  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11478for as_dir in $PATH
11479do
11480  IFS=$as_save_IFS
11481  test -z "$as_dir" && as_dir=.
11482    for ac_exec_ext in '' $ac_executable_extensions; do
11483  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11484    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11485    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11486    break 2
11487  fi
11488done
11489  done
11490IFS=$as_save_IFS
11491
11492  ;;
11493esac
11494fi
11495TR=$ac_cv_path_TR
11496if test -n "$TR"; then
11497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11498$as_echo "$TR" >&6; }
11499else
11500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11501$as_echo "no" >&6; }
11502fi
11503
11504
11505  test -n "$TR" && break
11506done
11507
11508  else
11509    # The variable is set, but is it from the command line or the environment?
11510
11511    # Try to remove the string !TR! from our list.
11512    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11513    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11514      # If it failed, the variable was not from the command line. Ignore it,
11515      # but warn the user (except for BASH, which is always set by the calling BASH).
11516      if test "xTR" != xBASH; then
11517        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11518$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11519      fi
11520      # Try to locate tool using the code snippet
11521      for ac_prog in tr
11522do
11523  # Extract the first word of "$ac_prog", so it can be a program name with args.
11524set dummy $ac_prog; ac_word=$2
11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11526$as_echo_n "checking for $ac_word... " >&6; }
11527if ${ac_cv_path_TR+:} false; then :
11528  $as_echo_n "(cached) " >&6
11529else
11530  case $TR in
11531  [\\/]* | ?:[\\/]*)
11532  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11533  ;;
11534  *)
11535  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11536for as_dir in $PATH
11537do
11538  IFS=$as_save_IFS
11539  test -z "$as_dir" && as_dir=.
11540    for ac_exec_ext in '' $ac_executable_extensions; do
11541  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11542    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11543    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11544    break 2
11545  fi
11546done
11547  done
11548IFS=$as_save_IFS
11549
11550  ;;
11551esac
11552fi
11553TR=$ac_cv_path_TR
11554if test -n "$TR"; then
11555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11556$as_echo "$TR" >&6; }
11557else
11558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
11560fi
11561
11562
11563  test -n "$TR" && break
11564done
11565
11566    else
11567      # If it succeeded, then it was overridden by the user. We will use it
11568      # for the tool.
11569
11570      # First remove it from the list of overridden variables, so we can test
11571      # for unknown variables in the end.
11572      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11573
11574      # Check if we try to supply an empty value
11575      if test "x$TR" = x; then
11576        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11577$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11579$as_echo_n "checking for TR... " >&6; }
11580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11581$as_echo "disabled" >&6; }
11582      else
11583        # Check if the provided tool contains a complete path.
11584        tool_specified="$TR"
11585        tool_basename="${tool_specified##*/}"
11586        if test "x$tool_basename" = "x$tool_specified"; then
11587          # A command without a complete path is provided, search $PATH.
11588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11589$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11590          # Extract the first word of "$tool_basename", so it can be a program name with args.
11591set dummy $tool_basename; ac_word=$2
11592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11593$as_echo_n "checking for $ac_word... " >&6; }
11594if ${ac_cv_path_TR+:} false; then :
11595  $as_echo_n "(cached) " >&6
11596else
11597  case $TR in
11598  [\\/]* | ?:[\\/]*)
11599  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11600  ;;
11601  *)
11602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11603for as_dir in $PATH
11604do
11605  IFS=$as_save_IFS
11606  test -z "$as_dir" && as_dir=.
11607    for ac_exec_ext in '' $ac_executable_extensions; do
11608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11609    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11611    break 2
11612  fi
11613done
11614  done
11615IFS=$as_save_IFS
11616
11617  ;;
11618esac
11619fi
11620TR=$ac_cv_path_TR
11621if test -n "$TR"; then
11622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11623$as_echo "$TR" >&6; }
11624else
11625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11626$as_echo "no" >&6; }
11627fi
11628
11629
11630          if test "x$TR" = x; then
11631            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11632          fi
11633        else
11634          # Otherwise we believe it is a complete path. Use it as it is.
11635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11636$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11637          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11638$as_echo_n "checking for TR... " >&6; }
11639          if test ! -x "$tool_specified"; then
11640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11641$as_echo "not found" >&6; }
11642            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11643          fi
11644          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11645$as_echo "$tool_specified" >&6; }
11646        fi
11647      fi
11648    fi
11649
11650  fi
11651
11652
11653
11654  if test "x$TR" = x; then
11655    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11656  fi
11657
11658
11659
11660
11661
11662  # Publish this variable in the help.
11663
11664
11665  if [ -z "${UNAME+x}" ]; then
11666    # The variable is not set by user, try to locate tool using the code snippet
11667    for ac_prog in uname
11668do
11669  # Extract the first word of "$ac_prog", so it can be a program name with args.
11670set dummy $ac_prog; ac_word=$2
11671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11672$as_echo_n "checking for $ac_word... " >&6; }
11673if ${ac_cv_path_UNAME+:} false; then :
11674  $as_echo_n "(cached) " >&6
11675else
11676  case $UNAME in
11677  [\\/]* | ?:[\\/]*)
11678  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11679  ;;
11680  *)
11681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11682for as_dir in $PATH
11683do
11684  IFS=$as_save_IFS
11685  test -z "$as_dir" && as_dir=.
11686    for ac_exec_ext in '' $ac_executable_extensions; do
11687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11688    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11690    break 2
11691  fi
11692done
11693  done
11694IFS=$as_save_IFS
11695
11696  ;;
11697esac
11698fi
11699UNAME=$ac_cv_path_UNAME
11700if test -n "$UNAME"; then
11701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11702$as_echo "$UNAME" >&6; }
11703else
11704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
11706fi
11707
11708
11709  test -n "$UNAME" && break
11710done
11711
11712  else
11713    # The variable is set, but is it from the command line or the environment?
11714
11715    # Try to remove the string !UNAME! from our list.
11716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11718      # If it failed, the variable was not from the command line. Ignore it,
11719      # but warn the user (except for BASH, which is always set by the calling BASH).
11720      if test "xUNAME" != xBASH; then
11721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11722$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11723      fi
11724      # Try to locate tool using the code snippet
11725      for ac_prog in uname
11726do
11727  # Extract the first word of "$ac_prog", so it can be a program name with args.
11728set dummy $ac_prog; ac_word=$2
11729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11730$as_echo_n "checking for $ac_word... " >&6; }
11731if ${ac_cv_path_UNAME+:} false; then :
11732  $as_echo_n "(cached) " >&6
11733else
11734  case $UNAME in
11735  [\\/]* | ?:[\\/]*)
11736  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11737  ;;
11738  *)
11739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11740for as_dir in $PATH
11741do
11742  IFS=$as_save_IFS
11743  test -z "$as_dir" && as_dir=.
11744    for ac_exec_ext in '' $ac_executable_extensions; do
11745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11746    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11748    break 2
11749  fi
11750done
11751  done
11752IFS=$as_save_IFS
11753
11754  ;;
11755esac
11756fi
11757UNAME=$ac_cv_path_UNAME
11758if test -n "$UNAME"; then
11759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11760$as_echo "$UNAME" >&6; }
11761else
11762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11763$as_echo "no" >&6; }
11764fi
11765
11766
11767  test -n "$UNAME" && break
11768done
11769
11770    else
11771      # If it succeeded, then it was overridden by the user. We will use it
11772      # for the tool.
11773
11774      # First remove it from the list of overridden variables, so we can test
11775      # for unknown variables in the end.
11776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11777
11778      # Check if we try to supply an empty value
11779      if test "x$UNAME" = x; then
11780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11781$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11783$as_echo_n "checking for UNAME... " >&6; }
11784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11785$as_echo "disabled" >&6; }
11786      else
11787        # Check if the provided tool contains a complete path.
11788        tool_specified="$UNAME"
11789        tool_basename="${tool_specified##*/}"
11790        if test "x$tool_basename" = "x$tool_specified"; then
11791          # A command without a complete path is provided, search $PATH.
11792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11793$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11794          # Extract the first word of "$tool_basename", so it can be a program name with args.
11795set dummy $tool_basename; ac_word=$2
11796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11797$as_echo_n "checking for $ac_word... " >&6; }
11798if ${ac_cv_path_UNAME+:} false; then :
11799  $as_echo_n "(cached) " >&6
11800else
11801  case $UNAME in
11802  [\\/]* | ?:[\\/]*)
11803  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11804  ;;
11805  *)
11806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11807for as_dir in $PATH
11808do
11809  IFS=$as_save_IFS
11810  test -z "$as_dir" && as_dir=.
11811    for ac_exec_ext in '' $ac_executable_extensions; do
11812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11813    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11815    break 2
11816  fi
11817done
11818  done
11819IFS=$as_save_IFS
11820
11821  ;;
11822esac
11823fi
11824UNAME=$ac_cv_path_UNAME
11825if test -n "$UNAME"; then
11826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11827$as_echo "$UNAME" >&6; }
11828else
11829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11830$as_echo "no" >&6; }
11831fi
11832
11833
11834          if test "x$UNAME" = x; then
11835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11836          fi
11837        else
11838          # Otherwise we believe it is a complete path. Use it as it is.
11839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11840$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11842$as_echo_n "checking for UNAME... " >&6; }
11843          if test ! -x "$tool_specified"; then
11844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11845$as_echo "not found" >&6; }
11846            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11847          fi
11848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11849$as_echo "$tool_specified" >&6; }
11850        fi
11851      fi
11852    fi
11853
11854  fi
11855
11856
11857
11858  if test "x$UNAME" = x; then
11859    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11860  fi
11861
11862
11863
11864
11865
11866  # Publish this variable in the help.
11867
11868
11869  if [ -z "${UNIQ+x}" ]; then
11870    # The variable is not set by user, try to locate tool using the code snippet
11871    for ac_prog in uniq
11872do
11873  # Extract the first word of "$ac_prog", so it can be a program name with args.
11874set dummy $ac_prog; ac_word=$2
11875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11876$as_echo_n "checking for $ac_word... " >&6; }
11877if ${ac_cv_path_UNIQ+:} false; then :
11878  $as_echo_n "(cached) " >&6
11879else
11880  case $UNIQ in
11881  [\\/]* | ?:[\\/]*)
11882  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11883  ;;
11884  *)
11885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11886for as_dir in $PATH
11887do
11888  IFS=$as_save_IFS
11889  test -z "$as_dir" && as_dir=.
11890    for ac_exec_ext in '' $ac_executable_extensions; do
11891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11892    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11894    break 2
11895  fi
11896done
11897  done
11898IFS=$as_save_IFS
11899
11900  ;;
11901esac
11902fi
11903UNIQ=$ac_cv_path_UNIQ
11904if test -n "$UNIQ"; then
11905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11906$as_echo "$UNIQ" >&6; }
11907else
11908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11909$as_echo "no" >&6; }
11910fi
11911
11912
11913  test -n "$UNIQ" && break
11914done
11915
11916  else
11917    # The variable is set, but is it from the command line or the environment?
11918
11919    # Try to remove the string !UNIQ! from our list.
11920    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11921    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11922      # If it failed, the variable was not from the command line. Ignore it,
11923      # but warn the user (except for BASH, which is always set by the calling BASH).
11924      if test "xUNIQ" != xBASH; then
11925        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11926$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11927      fi
11928      # Try to locate tool using the code snippet
11929      for ac_prog in uniq
11930do
11931  # Extract the first word of "$ac_prog", so it can be a program name with args.
11932set dummy $ac_prog; ac_word=$2
11933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11934$as_echo_n "checking for $ac_word... " >&6; }
11935if ${ac_cv_path_UNIQ+:} false; then :
11936  $as_echo_n "(cached) " >&6
11937else
11938  case $UNIQ in
11939  [\\/]* | ?:[\\/]*)
11940  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11941  ;;
11942  *)
11943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11944for as_dir in $PATH
11945do
11946  IFS=$as_save_IFS
11947  test -z "$as_dir" && as_dir=.
11948    for ac_exec_ext in '' $ac_executable_extensions; do
11949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11950    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11952    break 2
11953  fi
11954done
11955  done
11956IFS=$as_save_IFS
11957
11958  ;;
11959esac
11960fi
11961UNIQ=$ac_cv_path_UNIQ
11962if test -n "$UNIQ"; then
11963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11964$as_echo "$UNIQ" >&6; }
11965else
11966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11967$as_echo "no" >&6; }
11968fi
11969
11970
11971  test -n "$UNIQ" && break
11972done
11973
11974    else
11975      # If it succeeded, then it was overridden by the user. We will use it
11976      # for the tool.
11977
11978      # First remove it from the list of overridden variables, so we can test
11979      # for unknown variables in the end.
11980      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11981
11982      # Check if we try to supply an empty value
11983      if test "x$UNIQ" = x; then
11984        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11985$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11986        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11987$as_echo_n "checking for UNIQ... " >&6; }
11988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11989$as_echo "disabled" >&6; }
11990      else
11991        # Check if the provided tool contains a complete path.
11992        tool_specified="$UNIQ"
11993        tool_basename="${tool_specified##*/}"
11994        if test "x$tool_basename" = "x$tool_specified"; then
11995          # A command without a complete path is provided, search $PATH.
11996          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11997$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11998          # Extract the first word of "$tool_basename", so it can be a program name with args.
11999set dummy $tool_basename; ac_word=$2
12000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12001$as_echo_n "checking for $ac_word... " >&6; }
12002if ${ac_cv_path_UNIQ+:} false; then :
12003  $as_echo_n "(cached) " >&6
12004else
12005  case $UNIQ in
12006  [\\/]* | ?:[\\/]*)
12007  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12008  ;;
12009  *)
12010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12011for as_dir in $PATH
12012do
12013  IFS=$as_save_IFS
12014  test -z "$as_dir" && as_dir=.
12015    for ac_exec_ext in '' $ac_executable_extensions; do
12016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12017    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12019    break 2
12020  fi
12021done
12022  done
12023IFS=$as_save_IFS
12024
12025  ;;
12026esac
12027fi
12028UNIQ=$ac_cv_path_UNIQ
12029if test -n "$UNIQ"; then
12030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12031$as_echo "$UNIQ" >&6; }
12032else
12033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12034$as_echo "no" >&6; }
12035fi
12036
12037
12038          if test "x$UNIQ" = x; then
12039            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12040          fi
12041        else
12042          # Otherwise we believe it is a complete path. Use it as it is.
12043          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12044$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12045          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12046$as_echo_n "checking for UNIQ... " >&6; }
12047          if test ! -x "$tool_specified"; then
12048            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12049$as_echo "not found" >&6; }
12050            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12051          fi
12052          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12053$as_echo "$tool_specified" >&6; }
12054        fi
12055      fi
12056    fi
12057
12058  fi
12059
12060
12061
12062  if test "x$UNIQ" = x; then
12063    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12064  fi
12065
12066
12067
12068
12069
12070  # Publish this variable in the help.
12071
12072
12073  if [ -z "${WC+x}" ]; then
12074    # The variable is not set by user, try to locate tool using the code snippet
12075    for ac_prog in wc
12076do
12077  # Extract the first word of "$ac_prog", so it can be a program name with args.
12078set dummy $ac_prog; ac_word=$2
12079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12080$as_echo_n "checking for $ac_word... " >&6; }
12081if ${ac_cv_path_WC+:} false; then :
12082  $as_echo_n "(cached) " >&6
12083else
12084  case $WC in
12085  [\\/]* | ?:[\\/]*)
12086  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12087  ;;
12088  *)
12089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12090for as_dir in $PATH
12091do
12092  IFS=$as_save_IFS
12093  test -z "$as_dir" && as_dir=.
12094    for ac_exec_ext in '' $ac_executable_extensions; do
12095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12096    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12098    break 2
12099  fi
12100done
12101  done
12102IFS=$as_save_IFS
12103
12104  ;;
12105esac
12106fi
12107WC=$ac_cv_path_WC
12108if test -n "$WC"; then
12109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12110$as_echo "$WC" >&6; }
12111else
12112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12113$as_echo "no" >&6; }
12114fi
12115
12116
12117  test -n "$WC" && break
12118done
12119
12120  else
12121    # The variable is set, but is it from the command line or the environment?
12122
12123    # Try to remove the string !WC! from our list.
12124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12126      # If it failed, the variable was not from the command line. Ignore it,
12127      # but warn the user (except for BASH, which is always set by the calling BASH).
12128      if test "xWC" != xBASH; then
12129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12130$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12131      fi
12132      # Try to locate tool using the code snippet
12133      for ac_prog in wc
12134do
12135  # Extract the first word of "$ac_prog", so it can be a program name with args.
12136set dummy $ac_prog; ac_word=$2
12137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12138$as_echo_n "checking for $ac_word... " >&6; }
12139if ${ac_cv_path_WC+:} false; then :
12140  $as_echo_n "(cached) " >&6
12141else
12142  case $WC in
12143  [\\/]* | ?:[\\/]*)
12144  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12145  ;;
12146  *)
12147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12148for as_dir in $PATH
12149do
12150  IFS=$as_save_IFS
12151  test -z "$as_dir" && as_dir=.
12152    for ac_exec_ext in '' $ac_executable_extensions; do
12153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12154    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12156    break 2
12157  fi
12158done
12159  done
12160IFS=$as_save_IFS
12161
12162  ;;
12163esac
12164fi
12165WC=$ac_cv_path_WC
12166if test -n "$WC"; then
12167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12168$as_echo "$WC" >&6; }
12169else
12170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12171$as_echo "no" >&6; }
12172fi
12173
12174
12175  test -n "$WC" && break
12176done
12177
12178    else
12179      # If it succeeded, then it was overridden by the user. We will use it
12180      # for the tool.
12181
12182      # First remove it from the list of overridden variables, so we can test
12183      # for unknown variables in the end.
12184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12185
12186      # Check if we try to supply an empty value
12187      if test "x$WC" = x; then
12188        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12189$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12191$as_echo_n "checking for WC... " >&6; }
12192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12193$as_echo "disabled" >&6; }
12194      else
12195        # Check if the provided tool contains a complete path.
12196        tool_specified="$WC"
12197        tool_basename="${tool_specified##*/}"
12198        if test "x$tool_basename" = "x$tool_specified"; then
12199          # A command without a complete path is provided, search $PATH.
12200          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12201$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12202          # Extract the first word of "$tool_basename", so it can be a program name with args.
12203set dummy $tool_basename; ac_word=$2
12204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12205$as_echo_n "checking for $ac_word... " >&6; }
12206if ${ac_cv_path_WC+:} false; then :
12207  $as_echo_n "(cached) " >&6
12208else
12209  case $WC in
12210  [\\/]* | ?:[\\/]*)
12211  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12212  ;;
12213  *)
12214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12215for as_dir in $PATH
12216do
12217  IFS=$as_save_IFS
12218  test -z "$as_dir" && as_dir=.
12219    for ac_exec_ext in '' $ac_executable_extensions; do
12220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12221    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12223    break 2
12224  fi
12225done
12226  done
12227IFS=$as_save_IFS
12228
12229  ;;
12230esac
12231fi
12232WC=$ac_cv_path_WC
12233if test -n "$WC"; then
12234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12235$as_echo "$WC" >&6; }
12236else
12237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12238$as_echo "no" >&6; }
12239fi
12240
12241
12242          if test "x$WC" = x; then
12243            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12244          fi
12245        else
12246          # Otherwise we believe it is a complete path. Use it as it is.
12247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12248$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12249          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12250$as_echo_n "checking for WC... " >&6; }
12251          if test ! -x "$tool_specified"; then
12252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12253$as_echo "not found" >&6; }
12254            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12255          fi
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12257$as_echo "$tool_specified" >&6; }
12258        fi
12259      fi
12260    fi
12261
12262  fi
12263
12264
12265
12266  if test "x$WC" = x; then
12267    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12268  fi
12269
12270
12271
12272
12273
12274  # Publish this variable in the help.
12275
12276
12277  if [ -z "${WHICH+x}" ]; then
12278    # The variable is not set by user, try to locate tool using the code snippet
12279    for ac_prog in which
12280do
12281  # Extract the first word of "$ac_prog", so it can be a program name with args.
12282set dummy $ac_prog; ac_word=$2
12283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12284$as_echo_n "checking for $ac_word... " >&6; }
12285if ${ac_cv_path_WHICH+:} false; then :
12286  $as_echo_n "(cached) " >&6
12287else
12288  case $WHICH in
12289  [\\/]* | ?:[\\/]*)
12290  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12291  ;;
12292  *)
12293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12294for as_dir in $PATH
12295do
12296  IFS=$as_save_IFS
12297  test -z "$as_dir" && as_dir=.
12298    for ac_exec_ext in '' $ac_executable_extensions; do
12299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12300    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12302    break 2
12303  fi
12304done
12305  done
12306IFS=$as_save_IFS
12307
12308  ;;
12309esac
12310fi
12311WHICH=$ac_cv_path_WHICH
12312if test -n "$WHICH"; then
12313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12314$as_echo "$WHICH" >&6; }
12315else
12316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12317$as_echo "no" >&6; }
12318fi
12319
12320
12321  test -n "$WHICH" && break
12322done
12323
12324  else
12325    # The variable is set, but is it from the command line or the environment?
12326
12327    # Try to remove the string !WHICH! from our list.
12328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12330      # If it failed, the variable was not from the command line. Ignore it,
12331      # but warn the user (except for BASH, which is always set by the calling BASH).
12332      if test "xWHICH" != xBASH; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12334$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12335      fi
12336      # Try to locate tool using the code snippet
12337      for ac_prog in which
12338do
12339  # Extract the first word of "$ac_prog", so it can be a program name with args.
12340set dummy $ac_prog; ac_word=$2
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12342$as_echo_n "checking for $ac_word... " >&6; }
12343if ${ac_cv_path_WHICH+:} false; then :
12344  $as_echo_n "(cached) " >&6
12345else
12346  case $WHICH in
12347  [\\/]* | ?:[\\/]*)
12348  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12349  ;;
12350  *)
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_exec_ext in '' $ac_executable_extensions; do
12357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12358    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12360    break 2
12361  fi
12362done
12363  done
12364IFS=$as_save_IFS
12365
12366  ;;
12367esac
12368fi
12369WHICH=$ac_cv_path_WHICH
12370if test -n "$WHICH"; then
12371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12372$as_echo "$WHICH" >&6; }
12373else
12374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
12376fi
12377
12378
12379  test -n "$WHICH" && break
12380done
12381
12382    else
12383      # If it succeeded, then it was overridden by the user. We will use it
12384      # for the tool.
12385
12386      # First remove it from the list of overridden variables, so we can test
12387      # for unknown variables in the end.
12388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12389
12390      # Check if we try to supply an empty value
12391      if test "x$WHICH" = x; then
12392        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12393$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12395$as_echo_n "checking for WHICH... " >&6; }
12396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12397$as_echo "disabled" >&6; }
12398      else
12399        # Check if the provided tool contains a complete path.
12400        tool_specified="$WHICH"
12401        tool_basename="${tool_specified##*/}"
12402        if test "x$tool_basename" = "x$tool_specified"; then
12403          # A command without a complete path is provided, search $PATH.
12404          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12405$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12406          # Extract the first word of "$tool_basename", so it can be a program name with args.
12407set dummy $tool_basename; ac_word=$2
12408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12409$as_echo_n "checking for $ac_word... " >&6; }
12410if ${ac_cv_path_WHICH+:} false; then :
12411  $as_echo_n "(cached) " >&6
12412else
12413  case $WHICH in
12414  [\\/]* | ?:[\\/]*)
12415  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12416  ;;
12417  *)
12418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12419for as_dir in $PATH
12420do
12421  IFS=$as_save_IFS
12422  test -z "$as_dir" && as_dir=.
12423    for ac_exec_ext in '' $ac_executable_extensions; do
12424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12425    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12427    break 2
12428  fi
12429done
12430  done
12431IFS=$as_save_IFS
12432
12433  ;;
12434esac
12435fi
12436WHICH=$ac_cv_path_WHICH
12437if test -n "$WHICH"; then
12438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12439$as_echo "$WHICH" >&6; }
12440else
12441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12442$as_echo "no" >&6; }
12443fi
12444
12445
12446          if test "x$WHICH" = x; then
12447            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12448          fi
12449        else
12450          # Otherwise we believe it is a complete path. Use it as it is.
12451          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12452$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12453          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12454$as_echo_n "checking for WHICH... " >&6; }
12455          if test ! -x "$tool_specified"; then
12456            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12457$as_echo "not found" >&6; }
12458            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12459          fi
12460          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12461$as_echo "$tool_specified" >&6; }
12462        fi
12463      fi
12464    fi
12465
12466  fi
12467
12468
12469
12470  if test "x$WHICH" = x; then
12471    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12472  fi
12473
12474
12475
12476
12477
12478  # Publish this variable in the help.
12479
12480
12481  if [ -z "${XARGS+x}" ]; then
12482    # The variable is not set by user, try to locate tool using the code snippet
12483    for ac_prog in xargs
12484do
12485  # Extract the first word of "$ac_prog", so it can be a program name with args.
12486set dummy $ac_prog; ac_word=$2
12487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12488$as_echo_n "checking for $ac_word... " >&6; }
12489if ${ac_cv_path_XARGS+:} false; then :
12490  $as_echo_n "(cached) " >&6
12491else
12492  case $XARGS in
12493  [\\/]* | ?:[\\/]*)
12494  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12495  ;;
12496  *)
12497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12498for as_dir in $PATH
12499do
12500  IFS=$as_save_IFS
12501  test -z "$as_dir" && as_dir=.
12502    for ac_exec_ext in '' $ac_executable_extensions; do
12503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12504    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12506    break 2
12507  fi
12508done
12509  done
12510IFS=$as_save_IFS
12511
12512  ;;
12513esac
12514fi
12515XARGS=$ac_cv_path_XARGS
12516if test -n "$XARGS"; then
12517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12518$as_echo "$XARGS" >&6; }
12519else
12520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12521$as_echo "no" >&6; }
12522fi
12523
12524
12525  test -n "$XARGS" && break
12526done
12527
12528  else
12529    # The variable is set, but is it from the command line or the environment?
12530
12531    # Try to remove the string !XARGS! from our list.
12532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12534      # If it failed, the variable was not from the command line. Ignore it,
12535      # but warn the user (except for BASH, which is always set by the calling BASH).
12536      if test "xXARGS" != xBASH; then
12537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12538$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12539      fi
12540      # Try to locate tool using the code snippet
12541      for ac_prog in xargs
12542do
12543  # Extract the first word of "$ac_prog", so it can be a program name with args.
12544set dummy $ac_prog; ac_word=$2
12545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12546$as_echo_n "checking for $ac_word... " >&6; }
12547if ${ac_cv_path_XARGS+:} false; then :
12548  $as_echo_n "(cached) " >&6
12549else
12550  case $XARGS in
12551  [\\/]* | ?:[\\/]*)
12552  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12553  ;;
12554  *)
12555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12556for as_dir in $PATH
12557do
12558  IFS=$as_save_IFS
12559  test -z "$as_dir" && as_dir=.
12560    for ac_exec_ext in '' $ac_executable_extensions; do
12561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12562    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12564    break 2
12565  fi
12566done
12567  done
12568IFS=$as_save_IFS
12569
12570  ;;
12571esac
12572fi
12573XARGS=$ac_cv_path_XARGS
12574if test -n "$XARGS"; then
12575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12576$as_echo "$XARGS" >&6; }
12577else
12578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12579$as_echo "no" >&6; }
12580fi
12581
12582
12583  test -n "$XARGS" && break
12584done
12585
12586    else
12587      # If it succeeded, then it was overridden by the user. We will use it
12588      # for the tool.
12589
12590      # First remove it from the list of overridden variables, so we can test
12591      # for unknown variables in the end.
12592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12593
12594      # Check if we try to supply an empty value
12595      if test "x$XARGS" = x; then
12596        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12597$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12599$as_echo_n "checking for XARGS... " >&6; }
12600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12601$as_echo "disabled" >&6; }
12602      else
12603        # Check if the provided tool contains a complete path.
12604        tool_specified="$XARGS"
12605        tool_basename="${tool_specified##*/}"
12606        if test "x$tool_basename" = "x$tool_specified"; then
12607          # A command without a complete path is provided, search $PATH.
12608          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12609$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12610          # Extract the first word of "$tool_basename", so it can be a program name with args.
12611set dummy $tool_basename; ac_word=$2
12612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12613$as_echo_n "checking for $ac_word... " >&6; }
12614if ${ac_cv_path_XARGS+:} false; then :
12615  $as_echo_n "(cached) " >&6
12616else
12617  case $XARGS in
12618  [\\/]* | ?:[\\/]*)
12619  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12620  ;;
12621  *)
12622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12623for as_dir in $PATH
12624do
12625  IFS=$as_save_IFS
12626  test -z "$as_dir" && as_dir=.
12627    for ac_exec_ext in '' $ac_executable_extensions; do
12628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12629    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12631    break 2
12632  fi
12633done
12634  done
12635IFS=$as_save_IFS
12636
12637  ;;
12638esac
12639fi
12640XARGS=$ac_cv_path_XARGS
12641if test -n "$XARGS"; then
12642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12643$as_echo "$XARGS" >&6; }
12644else
12645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12646$as_echo "no" >&6; }
12647fi
12648
12649
12650          if test "x$XARGS" = x; then
12651            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12652          fi
12653        else
12654          # Otherwise we believe it is a complete path. Use it as it is.
12655          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12656$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12657          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12658$as_echo_n "checking for XARGS... " >&6; }
12659          if test ! -x "$tool_specified"; then
12660            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12661$as_echo "not found" >&6; }
12662            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12663          fi
12664          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12665$as_echo "$tool_specified" >&6; }
12666        fi
12667      fi
12668    fi
12669
12670  fi
12671
12672
12673
12674  if test "x$XARGS" = x; then
12675    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12676  fi
12677
12678
12679
12680  # Then required tools that require some special treatment.
12681
12682
12683  # Publish this variable in the help.
12684
12685
12686  if [ -z "${AWK+x}" ]; then
12687    # The variable is not set by user, try to locate tool using the code snippet
12688    for ac_prog in gawk mawk nawk awk
12689do
12690  # Extract the first word of "$ac_prog", so it can be a program name with args.
12691set dummy $ac_prog; ac_word=$2
12692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12693$as_echo_n "checking for $ac_word... " >&6; }
12694if ${ac_cv_prog_AWK+:} false; then :
12695  $as_echo_n "(cached) " >&6
12696else
12697  if test -n "$AWK"; then
12698  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12699else
12700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701for as_dir in $PATH
12702do
12703  IFS=$as_save_IFS
12704  test -z "$as_dir" && as_dir=.
12705    for ac_exec_ext in '' $ac_executable_extensions; do
12706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707    ac_cv_prog_AWK="$ac_prog"
12708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709    break 2
12710  fi
12711done
12712  done
12713IFS=$as_save_IFS
12714
12715fi
12716fi
12717AWK=$ac_cv_prog_AWK
12718if test -n "$AWK"; then
12719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12720$as_echo "$AWK" >&6; }
12721else
12722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
12724fi
12725
12726
12727  test -n "$AWK" && break
12728done
12729
12730  else
12731    # The variable is set, but is it from the command line or the environment?
12732
12733    # Try to remove the string !AWK! from our list.
12734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12736      # If it failed, the variable was not from the command line. Ignore it,
12737      # but warn the user (except for BASH, which is always set by the calling BASH).
12738      if test "xAWK" != xBASH; then
12739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12740$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12741      fi
12742      # Try to locate tool using the code snippet
12743      for ac_prog in gawk mawk nawk awk
12744do
12745  # Extract the first word of "$ac_prog", so it can be a program name with args.
12746set dummy $ac_prog; ac_word=$2
12747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12748$as_echo_n "checking for $ac_word... " >&6; }
12749if ${ac_cv_prog_AWK+:} false; then :
12750  $as_echo_n "(cached) " >&6
12751else
12752  if test -n "$AWK"; then
12753  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12754else
12755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12756for as_dir in $PATH
12757do
12758  IFS=$as_save_IFS
12759  test -z "$as_dir" && as_dir=.
12760    for ac_exec_ext in '' $ac_executable_extensions; do
12761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12762    ac_cv_prog_AWK="$ac_prog"
12763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12764    break 2
12765  fi
12766done
12767  done
12768IFS=$as_save_IFS
12769
12770fi
12771fi
12772AWK=$ac_cv_prog_AWK
12773if test -n "$AWK"; then
12774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12775$as_echo "$AWK" >&6; }
12776else
12777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12778$as_echo "no" >&6; }
12779fi
12780
12781
12782  test -n "$AWK" && break
12783done
12784
12785    else
12786      # If it succeeded, then it was overridden by the user. We will use it
12787      # for the tool.
12788
12789      # First remove it from the list of overridden variables, so we can test
12790      # for unknown variables in the end.
12791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12792
12793      # Check if we try to supply an empty value
12794      if test "x$AWK" = x; then
12795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12796$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12798$as_echo_n "checking for AWK... " >&6; }
12799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12800$as_echo "disabled" >&6; }
12801      else
12802        # Check if the provided tool contains a complete path.
12803        tool_specified="$AWK"
12804        tool_basename="${tool_specified##*/}"
12805        if test "x$tool_basename" = "x$tool_specified"; then
12806          # A command without a complete path is provided, search $PATH.
12807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12808$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12809          # Extract the first word of "$tool_basename", so it can be a program name with args.
12810set dummy $tool_basename; ac_word=$2
12811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12812$as_echo_n "checking for $ac_word... " >&6; }
12813if ${ac_cv_path_AWK+:} false; then :
12814  $as_echo_n "(cached) " >&6
12815else
12816  case $AWK in
12817  [\\/]* | ?:[\\/]*)
12818  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12819  ;;
12820  *)
12821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12822for as_dir in $PATH
12823do
12824  IFS=$as_save_IFS
12825  test -z "$as_dir" && as_dir=.
12826    for ac_exec_ext in '' $ac_executable_extensions; do
12827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12828    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12830    break 2
12831  fi
12832done
12833  done
12834IFS=$as_save_IFS
12835
12836  ;;
12837esac
12838fi
12839AWK=$ac_cv_path_AWK
12840if test -n "$AWK"; then
12841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12842$as_echo "$AWK" >&6; }
12843else
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12845$as_echo "no" >&6; }
12846fi
12847
12848
12849          if test "x$AWK" = x; then
12850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12851          fi
12852        else
12853          # Otherwise we believe it is a complete path. Use it as it is.
12854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12855$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12857$as_echo_n "checking for AWK... " >&6; }
12858          if test ! -x "$tool_specified"; then
12859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12860$as_echo "not found" >&6; }
12861            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12862          fi
12863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12864$as_echo "$tool_specified" >&6; }
12865        fi
12866      fi
12867    fi
12868
12869  fi
12870
12871
12872  if test "x$AWK" = x; then
12873    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12874  fi
12875
12876
12877
12878
12879  # Publish this variable in the help.
12880
12881
12882  if [ -z "${GREP+x}" ]; then
12883    # The variable is not set by user, try to locate tool using the code snippet
12884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12885$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12886if ${ac_cv_path_GREP+:} false; then :
12887  $as_echo_n "(cached) " >&6
12888else
12889  if test -z "$GREP"; then
12890  ac_path_GREP_found=false
12891  # Loop through the user's path and test for each of PROGNAME-LIST
12892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12893for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12894do
12895  IFS=$as_save_IFS
12896  test -z "$as_dir" && as_dir=.
12897    for ac_prog in grep ggrep; do
12898    for ac_exec_ext in '' $ac_executable_extensions; do
12899      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12900      as_fn_executable_p "$ac_path_GREP" || continue
12901# Check for GNU ac_path_GREP and select it if it is found.
12902  # Check for GNU $ac_path_GREP
12903case `"$ac_path_GREP" --version 2>&1` in
12904*GNU*)
12905  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12906*)
12907  ac_count=0
12908  $as_echo_n 0123456789 >"conftest.in"
12909  while :
12910  do
12911    cat "conftest.in" "conftest.in" >"conftest.tmp"
12912    mv "conftest.tmp" "conftest.in"
12913    cp "conftest.in" "conftest.nl"
12914    $as_echo 'GREP' >> "conftest.nl"
12915    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12916    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12917    as_fn_arith $ac_count + 1 && ac_count=$as_val
12918    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12919      # Best one so far, save it but keep looking for a better one
12920      ac_cv_path_GREP="$ac_path_GREP"
12921      ac_path_GREP_max=$ac_count
12922    fi
12923    # 10*(2^10) chars as input seems more than enough
12924    test $ac_count -gt 10 && break
12925  done
12926  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12927esac
12928
12929      $ac_path_GREP_found && break 3
12930    done
12931  done
12932  done
12933IFS=$as_save_IFS
12934  if test -z "$ac_cv_path_GREP"; then
12935    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12936  fi
12937else
12938  ac_cv_path_GREP=$GREP
12939fi
12940
12941fi
12942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12943$as_echo "$ac_cv_path_GREP" >&6; }
12944 GREP="$ac_cv_path_GREP"
12945
12946
12947  else
12948    # The variable is set, but is it from the command line or the environment?
12949
12950    # Try to remove the string !GREP! from our list.
12951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12953      # If it failed, the variable was not from the command line. Ignore it,
12954      # but warn the user (except for BASH, which is always set by the calling BASH).
12955      if test "xGREP" != xBASH; then
12956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12957$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12958      fi
12959      # Try to locate tool using the code snippet
12960      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12961$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12962if ${ac_cv_path_GREP+:} false; then :
12963  $as_echo_n "(cached) " >&6
12964else
12965  if test -z "$GREP"; then
12966  ac_path_GREP_found=false
12967  # Loop through the user's path and test for each of PROGNAME-LIST
12968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12969for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12970do
12971  IFS=$as_save_IFS
12972  test -z "$as_dir" && as_dir=.
12973    for ac_prog in grep ggrep; do
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12976      as_fn_executable_p "$ac_path_GREP" || continue
12977# Check for GNU ac_path_GREP and select it if it is found.
12978  # Check for GNU $ac_path_GREP
12979case `"$ac_path_GREP" --version 2>&1` in
12980*GNU*)
12981  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12982*)
12983  ac_count=0
12984  $as_echo_n 0123456789 >"conftest.in"
12985  while :
12986  do
12987    cat "conftest.in" "conftest.in" >"conftest.tmp"
12988    mv "conftest.tmp" "conftest.in"
12989    cp "conftest.in" "conftest.nl"
12990    $as_echo 'GREP' >> "conftest.nl"
12991    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12992    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12993    as_fn_arith $ac_count + 1 && ac_count=$as_val
12994    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12995      # Best one so far, save it but keep looking for a better one
12996      ac_cv_path_GREP="$ac_path_GREP"
12997      ac_path_GREP_max=$ac_count
12998    fi
12999    # 10*(2^10) chars as input seems more than enough
13000    test $ac_count -gt 10 && break
13001  done
13002  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13003esac
13004
13005      $ac_path_GREP_found && break 3
13006    done
13007  done
13008  done
13009IFS=$as_save_IFS
13010  if test -z "$ac_cv_path_GREP"; then
13011    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13012  fi
13013else
13014  ac_cv_path_GREP=$GREP
13015fi
13016
13017fi
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13019$as_echo "$ac_cv_path_GREP" >&6; }
13020 GREP="$ac_cv_path_GREP"
13021
13022
13023    else
13024      # If it succeeded, then it was overridden by the user. We will use it
13025      # for the tool.
13026
13027      # First remove it from the list of overridden variables, so we can test
13028      # for unknown variables in the end.
13029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13030
13031      # Check if we try to supply an empty value
13032      if test "x$GREP" = x; then
13033        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13034$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13036$as_echo_n "checking for GREP... " >&6; }
13037        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13038$as_echo "disabled" >&6; }
13039      else
13040        # Check if the provided tool contains a complete path.
13041        tool_specified="$GREP"
13042        tool_basename="${tool_specified##*/}"
13043        if test "x$tool_basename" = "x$tool_specified"; then
13044          # A command without a complete path is provided, search $PATH.
13045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13046$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13047          # Extract the first word of "$tool_basename", so it can be a program name with args.
13048set dummy $tool_basename; ac_word=$2
13049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13050$as_echo_n "checking for $ac_word... " >&6; }
13051if ${ac_cv_path_GREP+:} false; then :
13052  $as_echo_n "(cached) " >&6
13053else
13054  case $GREP in
13055  [\\/]* | ?:[\\/]*)
13056  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13057  ;;
13058  *)
13059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13060for as_dir in $PATH
13061do
13062  IFS=$as_save_IFS
13063  test -z "$as_dir" && as_dir=.
13064    for ac_exec_ext in '' $ac_executable_extensions; do
13065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13066    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13068    break 2
13069  fi
13070done
13071  done
13072IFS=$as_save_IFS
13073
13074  ;;
13075esac
13076fi
13077GREP=$ac_cv_path_GREP
13078if test -n "$GREP"; then
13079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13080$as_echo "$GREP" >&6; }
13081else
13082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13083$as_echo "no" >&6; }
13084fi
13085
13086
13087          if test "x$GREP" = x; then
13088            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13089          fi
13090        else
13091          # Otherwise we believe it is a complete path. Use it as it is.
13092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13093$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13094          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13095$as_echo_n "checking for GREP... " >&6; }
13096          if test ! -x "$tool_specified"; then
13097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13098$as_echo "not found" >&6; }
13099            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13100          fi
13101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13102$as_echo "$tool_specified" >&6; }
13103        fi
13104      fi
13105    fi
13106
13107  fi
13108
13109
13110  if test "x$GREP" = x; then
13111    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13112  fi
13113
13114
13115
13116
13117  # Publish this variable in the help.
13118
13119
13120  if [ -z "${EGREP+x}" ]; then
13121    # The variable is not set by user, try to locate tool using the code snippet
13122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13123$as_echo_n "checking for egrep... " >&6; }
13124if ${ac_cv_path_EGREP+:} false; then :
13125  $as_echo_n "(cached) " >&6
13126else
13127  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13128   then ac_cv_path_EGREP="$GREP -E"
13129   else
13130     if test -z "$EGREP"; then
13131  ac_path_EGREP_found=false
13132  # Loop through the user's path and test for each of PROGNAME-LIST
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_prog in egrep; do
13139    for ac_exec_ext in '' $ac_executable_extensions; do
13140      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13141      as_fn_executable_p "$ac_path_EGREP" || continue
13142# Check for GNU ac_path_EGREP and select it if it is found.
13143  # Check for GNU $ac_path_EGREP
13144case `"$ac_path_EGREP" --version 2>&1` in
13145*GNU*)
13146  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13147*)
13148  ac_count=0
13149  $as_echo_n 0123456789 >"conftest.in"
13150  while :
13151  do
13152    cat "conftest.in" "conftest.in" >"conftest.tmp"
13153    mv "conftest.tmp" "conftest.in"
13154    cp "conftest.in" "conftest.nl"
13155    $as_echo 'EGREP' >> "conftest.nl"
13156    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13157    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13158    as_fn_arith $ac_count + 1 && ac_count=$as_val
13159    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13160      # Best one so far, save it but keep looking for a better one
13161      ac_cv_path_EGREP="$ac_path_EGREP"
13162      ac_path_EGREP_max=$ac_count
13163    fi
13164    # 10*(2^10) chars as input seems more than enough
13165    test $ac_count -gt 10 && break
13166  done
13167  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13168esac
13169
13170      $ac_path_EGREP_found && break 3
13171    done
13172  done
13173  done
13174IFS=$as_save_IFS
13175  if test -z "$ac_cv_path_EGREP"; then
13176    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13177  fi
13178else
13179  ac_cv_path_EGREP=$EGREP
13180fi
13181
13182   fi
13183fi
13184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13185$as_echo "$ac_cv_path_EGREP" >&6; }
13186 EGREP="$ac_cv_path_EGREP"
13187
13188
13189  else
13190    # The variable is set, but is it from the command line or the environment?
13191
13192    # Try to remove the string !EGREP! from our list.
13193    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13194    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13195      # If it failed, the variable was not from the command line. Ignore it,
13196      # but warn the user (except for BASH, which is always set by the calling BASH).
13197      if test "xEGREP" != xBASH; then
13198        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13199$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13200      fi
13201      # Try to locate tool using the code snippet
13202      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13203$as_echo_n "checking for egrep... " >&6; }
13204if ${ac_cv_path_EGREP+:} false; then :
13205  $as_echo_n "(cached) " >&6
13206else
13207  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13208   then ac_cv_path_EGREP="$GREP -E"
13209   else
13210     if test -z "$EGREP"; then
13211  ac_path_EGREP_found=false
13212  # Loop through the user's path and test for each of PROGNAME-LIST
13213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13214for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13215do
13216  IFS=$as_save_IFS
13217  test -z "$as_dir" && as_dir=.
13218    for ac_prog in egrep; do
13219    for ac_exec_ext in '' $ac_executable_extensions; do
13220      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13221      as_fn_executable_p "$ac_path_EGREP" || continue
13222# Check for GNU ac_path_EGREP and select it if it is found.
13223  # Check for GNU $ac_path_EGREP
13224case `"$ac_path_EGREP" --version 2>&1` in
13225*GNU*)
13226  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13227*)
13228  ac_count=0
13229  $as_echo_n 0123456789 >"conftest.in"
13230  while :
13231  do
13232    cat "conftest.in" "conftest.in" >"conftest.tmp"
13233    mv "conftest.tmp" "conftest.in"
13234    cp "conftest.in" "conftest.nl"
13235    $as_echo 'EGREP' >> "conftest.nl"
13236    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13237    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13238    as_fn_arith $ac_count + 1 && ac_count=$as_val
13239    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13240      # Best one so far, save it but keep looking for a better one
13241      ac_cv_path_EGREP="$ac_path_EGREP"
13242      ac_path_EGREP_max=$ac_count
13243    fi
13244    # 10*(2^10) chars as input seems more than enough
13245    test $ac_count -gt 10 && break
13246  done
13247  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13248esac
13249
13250      $ac_path_EGREP_found && break 3
13251    done
13252  done
13253  done
13254IFS=$as_save_IFS
13255  if test -z "$ac_cv_path_EGREP"; then
13256    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13257  fi
13258else
13259  ac_cv_path_EGREP=$EGREP
13260fi
13261
13262   fi
13263fi
13264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13265$as_echo "$ac_cv_path_EGREP" >&6; }
13266 EGREP="$ac_cv_path_EGREP"
13267
13268
13269    else
13270      # If it succeeded, then it was overridden by the user. We will use it
13271      # for the tool.
13272
13273      # First remove it from the list of overridden variables, so we can test
13274      # for unknown variables in the end.
13275      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13276
13277      # Check if we try to supply an empty value
13278      if test "x$EGREP" = x; then
13279        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13280$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13282$as_echo_n "checking for EGREP... " >&6; }
13283        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13284$as_echo "disabled" >&6; }
13285      else
13286        # Check if the provided tool contains a complete path.
13287        tool_specified="$EGREP"
13288        tool_basename="${tool_specified##*/}"
13289        if test "x$tool_basename" = "x$tool_specified"; then
13290          # A command without a complete path is provided, search $PATH.
13291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13292$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13293          # Extract the first word of "$tool_basename", so it can be a program name with args.
13294set dummy $tool_basename; ac_word=$2
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13296$as_echo_n "checking for $ac_word... " >&6; }
13297if ${ac_cv_path_EGREP+:} false; then :
13298  $as_echo_n "(cached) " >&6
13299else
13300  case $EGREP in
13301  [\\/]* | ?:[\\/]*)
13302  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13303  ;;
13304  *)
13305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13306for as_dir in $PATH
13307do
13308  IFS=$as_save_IFS
13309  test -z "$as_dir" && as_dir=.
13310    for ac_exec_ext in '' $ac_executable_extensions; do
13311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13312    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13314    break 2
13315  fi
13316done
13317  done
13318IFS=$as_save_IFS
13319
13320  ;;
13321esac
13322fi
13323EGREP=$ac_cv_path_EGREP
13324if test -n "$EGREP"; then
13325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13326$as_echo "$EGREP" >&6; }
13327else
13328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
13330fi
13331
13332
13333          if test "x$EGREP" = x; then
13334            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13335          fi
13336        else
13337          # Otherwise we believe it is a complete path. Use it as it is.
13338          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13339$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13340          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13341$as_echo_n "checking for EGREP... " >&6; }
13342          if test ! -x "$tool_specified"; then
13343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13344$as_echo "not found" >&6; }
13345            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13346          fi
13347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13348$as_echo "$tool_specified" >&6; }
13349        fi
13350      fi
13351    fi
13352
13353  fi
13354
13355
13356  if test "x$EGREP" = x; then
13357    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13358  fi
13359
13360
13361
13362
13363  # Publish this variable in the help.
13364
13365
13366  if [ -z "${FGREP+x}" ]; then
13367    # The variable is not set by user, try to locate tool using the code snippet
13368    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13369$as_echo_n "checking for fgrep... " >&6; }
13370if ${ac_cv_path_FGREP+:} false; then :
13371  $as_echo_n "(cached) " >&6
13372else
13373  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13374   then ac_cv_path_FGREP="$GREP -F"
13375   else
13376     if test -z "$FGREP"; then
13377  ac_path_FGREP_found=false
13378  # Loop through the user's path and test for each of PROGNAME-LIST
13379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13380for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13381do
13382  IFS=$as_save_IFS
13383  test -z "$as_dir" && as_dir=.
13384    for ac_prog in fgrep; do
13385    for ac_exec_ext in '' $ac_executable_extensions; do
13386      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13387      as_fn_executable_p "$ac_path_FGREP" || continue
13388# Check for GNU ac_path_FGREP and select it if it is found.
13389  # Check for GNU $ac_path_FGREP
13390case `"$ac_path_FGREP" --version 2>&1` in
13391*GNU*)
13392  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13393*)
13394  ac_count=0
13395  $as_echo_n 0123456789 >"conftest.in"
13396  while :
13397  do
13398    cat "conftest.in" "conftest.in" >"conftest.tmp"
13399    mv "conftest.tmp" "conftest.in"
13400    cp "conftest.in" "conftest.nl"
13401    $as_echo 'FGREP' >> "conftest.nl"
13402    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13403    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13404    as_fn_arith $ac_count + 1 && ac_count=$as_val
13405    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13406      # Best one so far, save it but keep looking for a better one
13407      ac_cv_path_FGREP="$ac_path_FGREP"
13408      ac_path_FGREP_max=$ac_count
13409    fi
13410    # 10*(2^10) chars as input seems more than enough
13411    test $ac_count -gt 10 && break
13412  done
13413  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13414esac
13415
13416      $ac_path_FGREP_found && break 3
13417    done
13418  done
13419  done
13420IFS=$as_save_IFS
13421  if test -z "$ac_cv_path_FGREP"; then
13422    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13423  fi
13424else
13425  ac_cv_path_FGREP=$FGREP
13426fi
13427
13428   fi
13429fi
13430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13431$as_echo "$ac_cv_path_FGREP" >&6; }
13432 FGREP="$ac_cv_path_FGREP"
13433
13434
13435  else
13436    # The variable is set, but is it from the command line or the environment?
13437
13438    # Try to remove the string !FGREP! from our list.
13439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13441      # If it failed, the variable was not from the command line. Ignore it,
13442      # but warn the user (except for BASH, which is always set by the calling BASH).
13443      if test "xFGREP" != xBASH; then
13444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13445$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13446      fi
13447      # Try to locate tool using the code snippet
13448      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13449$as_echo_n "checking for fgrep... " >&6; }
13450if ${ac_cv_path_FGREP+:} false; then :
13451  $as_echo_n "(cached) " >&6
13452else
13453  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13454   then ac_cv_path_FGREP="$GREP -F"
13455   else
13456     if test -z "$FGREP"; then
13457  ac_path_FGREP_found=false
13458  # Loop through the user's path and test for each of PROGNAME-LIST
13459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13460for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13461do
13462  IFS=$as_save_IFS
13463  test -z "$as_dir" && as_dir=.
13464    for ac_prog in fgrep; do
13465    for ac_exec_ext in '' $ac_executable_extensions; do
13466      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13467      as_fn_executable_p "$ac_path_FGREP" || continue
13468# Check for GNU ac_path_FGREP and select it if it is found.
13469  # Check for GNU $ac_path_FGREP
13470case `"$ac_path_FGREP" --version 2>&1` in
13471*GNU*)
13472  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13473*)
13474  ac_count=0
13475  $as_echo_n 0123456789 >"conftest.in"
13476  while :
13477  do
13478    cat "conftest.in" "conftest.in" >"conftest.tmp"
13479    mv "conftest.tmp" "conftest.in"
13480    cp "conftest.in" "conftest.nl"
13481    $as_echo 'FGREP' >> "conftest.nl"
13482    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13483    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13484    as_fn_arith $ac_count + 1 && ac_count=$as_val
13485    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13486      # Best one so far, save it but keep looking for a better one
13487      ac_cv_path_FGREP="$ac_path_FGREP"
13488      ac_path_FGREP_max=$ac_count
13489    fi
13490    # 10*(2^10) chars as input seems more than enough
13491    test $ac_count -gt 10 && break
13492  done
13493  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13494esac
13495
13496      $ac_path_FGREP_found && break 3
13497    done
13498  done
13499  done
13500IFS=$as_save_IFS
13501  if test -z "$ac_cv_path_FGREP"; then
13502    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13503  fi
13504else
13505  ac_cv_path_FGREP=$FGREP
13506fi
13507
13508   fi
13509fi
13510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13511$as_echo "$ac_cv_path_FGREP" >&6; }
13512 FGREP="$ac_cv_path_FGREP"
13513
13514
13515    else
13516      # If it succeeded, then it was overridden by the user. We will use it
13517      # for the tool.
13518
13519      # First remove it from the list of overridden variables, so we can test
13520      # for unknown variables in the end.
13521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13522
13523      # Check if we try to supply an empty value
13524      if test "x$FGREP" = x; then
13525        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13526$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13527        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13528$as_echo_n "checking for FGREP... " >&6; }
13529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13530$as_echo "disabled" >&6; }
13531      else
13532        # Check if the provided tool contains a complete path.
13533        tool_specified="$FGREP"
13534        tool_basename="${tool_specified##*/}"
13535        if test "x$tool_basename" = "x$tool_specified"; then
13536          # A command without a complete path is provided, search $PATH.
13537          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13538$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13539          # Extract the first word of "$tool_basename", so it can be a program name with args.
13540set dummy $tool_basename; ac_word=$2
13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13542$as_echo_n "checking for $ac_word... " >&6; }
13543if ${ac_cv_path_FGREP+:} false; then :
13544  $as_echo_n "(cached) " >&6
13545else
13546  case $FGREP in
13547  [\\/]* | ?:[\\/]*)
13548  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13549  ;;
13550  *)
13551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13552for as_dir in $PATH
13553do
13554  IFS=$as_save_IFS
13555  test -z "$as_dir" && as_dir=.
13556    for ac_exec_ext in '' $ac_executable_extensions; do
13557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13558    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13560    break 2
13561  fi
13562done
13563  done
13564IFS=$as_save_IFS
13565
13566  ;;
13567esac
13568fi
13569FGREP=$ac_cv_path_FGREP
13570if test -n "$FGREP"; then
13571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13572$as_echo "$FGREP" >&6; }
13573else
13574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13575$as_echo "no" >&6; }
13576fi
13577
13578
13579          if test "x$FGREP" = x; then
13580            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13581          fi
13582        else
13583          # Otherwise we believe it is a complete path. Use it as it is.
13584          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13585$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13586          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13587$as_echo_n "checking for FGREP... " >&6; }
13588          if test ! -x "$tool_specified"; then
13589            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13590$as_echo "not found" >&6; }
13591            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13592          fi
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13594$as_echo "$tool_specified" >&6; }
13595        fi
13596      fi
13597    fi
13598
13599  fi
13600
13601
13602  if test "x$FGREP" = x; then
13603    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13604  fi
13605
13606
13607
13608
13609  # Publish this variable in the help.
13610
13611
13612  if [ -z "${SED+x}" ]; then
13613    # The variable is not set by user, try to locate tool using the code snippet
13614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13615$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13616if ${ac_cv_path_SED+:} false; then :
13617  $as_echo_n "(cached) " >&6
13618else
13619            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13620     for ac_i in 1 2 3 4 5 6 7; do
13621       ac_script="$ac_script$as_nl$ac_script"
13622     done
13623     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13624     { ac_script=; unset ac_script;}
13625     if test -z "$SED"; then
13626  ac_path_SED_found=false
13627  # Loop through the user's path and test for each of PROGNAME-LIST
13628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13629for as_dir in $PATH
13630do
13631  IFS=$as_save_IFS
13632  test -z "$as_dir" && as_dir=.
13633    for ac_prog in sed gsed; do
13634    for ac_exec_ext in '' $ac_executable_extensions; do
13635      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13636      as_fn_executable_p "$ac_path_SED" || continue
13637# Check for GNU ac_path_SED and select it if it is found.
13638  # Check for GNU $ac_path_SED
13639case `"$ac_path_SED" --version 2>&1` in
13640*GNU*)
13641  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13642*)
13643  ac_count=0
13644  $as_echo_n 0123456789 >"conftest.in"
13645  while :
13646  do
13647    cat "conftest.in" "conftest.in" >"conftest.tmp"
13648    mv "conftest.tmp" "conftest.in"
13649    cp "conftest.in" "conftest.nl"
13650    $as_echo '' >> "conftest.nl"
13651    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13652    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13653    as_fn_arith $ac_count + 1 && ac_count=$as_val
13654    if test $ac_count -gt ${ac_path_SED_max-0}; then
13655      # Best one so far, save it but keep looking for a better one
13656      ac_cv_path_SED="$ac_path_SED"
13657      ac_path_SED_max=$ac_count
13658    fi
13659    # 10*(2^10) chars as input seems more than enough
13660    test $ac_count -gt 10 && break
13661  done
13662  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13663esac
13664
13665      $ac_path_SED_found && break 3
13666    done
13667  done
13668  done
13669IFS=$as_save_IFS
13670  if test -z "$ac_cv_path_SED"; then
13671    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13672  fi
13673else
13674  ac_cv_path_SED=$SED
13675fi
13676
13677fi
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13679$as_echo "$ac_cv_path_SED" >&6; }
13680 SED="$ac_cv_path_SED"
13681  rm -f conftest.sed
13682
13683  else
13684    # The variable is set, but is it from the command line or the environment?
13685
13686    # Try to remove the string !SED! from our list.
13687    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13688    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13689      # If it failed, the variable was not from the command line. Ignore it,
13690      # but warn the user (except for BASH, which is always set by the calling BASH).
13691      if test "xSED" != xBASH; then
13692        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13693$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13694      fi
13695      # Try to locate tool using the code snippet
13696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13697$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13698if ${ac_cv_path_SED+:} false; then :
13699  $as_echo_n "(cached) " >&6
13700else
13701            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13702     for ac_i in 1 2 3 4 5 6 7; do
13703       ac_script="$ac_script$as_nl$ac_script"
13704     done
13705     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13706     { ac_script=; unset ac_script;}
13707     if test -z "$SED"; then
13708  ac_path_SED_found=false
13709  # Loop through the user's path and test for each of PROGNAME-LIST
13710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13711for as_dir in $PATH
13712do
13713  IFS=$as_save_IFS
13714  test -z "$as_dir" && as_dir=.
13715    for ac_prog in sed gsed; do
13716    for ac_exec_ext in '' $ac_executable_extensions; do
13717      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13718      as_fn_executable_p "$ac_path_SED" || continue
13719# Check for GNU ac_path_SED and select it if it is found.
13720  # Check for GNU $ac_path_SED
13721case `"$ac_path_SED" --version 2>&1` in
13722*GNU*)
13723  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13724*)
13725  ac_count=0
13726  $as_echo_n 0123456789 >"conftest.in"
13727  while :
13728  do
13729    cat "conftest.in" "conftest.in" >"conftest.tmp"
13730    mv "conftest.tmp" "conftest.in"
13731    cp "conftest.in" "conftest.nl"
13732    $as_echo '' >> "conftest.nl"
13733    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13734    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13735    as_fn_arith $ac_count + 1 && ac_count=$as_val
13736    if test $ac_count -gt ${ac_path_SED_max-0}; then
13737      # Best one so far, save it but keep looking for a better one
13738      ac_cv_path_SED="$ac_path_SED"
13739      ac_path_SED_max=$ac_count
13740    fi
13741    # 10*(2^10) chars as input seems more than enough
13742    test $ac_count -gt 10 && break
13743  done
13744  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13745esac
13746
13747      $ac_path_SED_found && break 3
13748    done
13749  done
13750  done
13751IFS=$as_save_IFS
13752  if test -z "$ac_cv_path_SED"; then
13753    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13754  fi
13755else
13756  ac_cv_path_SED=$SED
13757fi
13758
13759fi
13760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13761$as_echo "$ac_cv_path_SED" >&6; }
13762 SED="$ac_cv_path_SED"
13763  rm -f conftest.sed
13764
13765    else
13766      # If it succeeded, then it was overridden by the user. We will use it
13767      # for the tool.
13768
13769      # First remove it from the list of overridden variables, so we can test
13770      # for unknown variables in the end.
13771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13772
13773      # Check if we try to supply an empty value
13774      if test "x$SED" = x; then
13775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13776$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13778$as_echo_n "checking for SED... " >&6; }
13779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13780$as_echo "disabled" >&6; }
13781      else
13782        # Check if the provided tool contains a complete path.
13783        tool_specified="$SED"
13784        tool_basename="${tool_specified##*/}"
13785        if test "x$tool_basename" = "x$tool_specified"; then
13786          # A command without a complete path is provided, search $PATH.
13787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13788$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13789          # Extract the first word of "$tool_basename", so it can be a program name with args.
13790set dummy $tool_basename; ac_word=$2
13791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13792$as_echo_n "checking for $ac_word... " >&6; }
13793if ${ac_cv_path_SED+:} false; then :
13794  $as_echo_n "(cached) " >&6
13795else
13796  case $SED in
13797  [\\/]* | ?:[\\/]*)
13798  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13799  ;;
13800  *)
13801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13802for as_dir in $PATH
13803do
13804  IFS=$as_save_IFS
13805  test -z "$as_dir" && as_dir=.
13806    for ac_exec_ext in '' $ac_executable_extensions; do
13807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13808    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13810    break 2
13811  fi
13812done
13813  done
13814IFS=$as_save_IFS
13815
13816  ;;
13817esac
13818fi
13819SED=$ac_cv_path_SED
13820if test -n "$SED"; then
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13822$as_echo "$SED" >&6; }
13823else
13824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13825$as_echo "no" >&6; }
13826fi
13827
13828
13829          if test "x$SED" = x; then
13830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13831          fi
13832        else
13833          # Otherwise we believe it is a complete path. Use it as it is.
13834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13835$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13837$as_echo_n "checking for SED... " >&6; }
13838          if test ! -x "$tool_specified"; then
13839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13840$as_echo "not found" >&6; }
13841            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13842          fi
13843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13844$as_echo "$tool_specified" >&6; }
13845        fi
13846      fi
13847    fi
13848
13849  fi
13850
13851
13852  if test "x$SED" = x; then
13853    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13854  fi
13855
13856
13857
13858  # Always force rm.
13859  RM="$RM -f"
13860
13861  # pwd behaves differently on various platforms and some don't support the -L flag.
13862  # Always use the bash builtin pwd to get uniform behavior.
13863  THEPWDCMD=pwd
13864
13865  # These are not required on all platforms
13866
13867
13868  # Publish this variable in the help.
13869
13870
13871  if [ -z "${CYGPATH+x}" ]; then
13872    # The variable is not set by user, try to locate tool using the code snippet
13873    for ac_prog in cygpath
13874do
13875  # Extract the first word of "$ac_prog", so it can be a program name with args.
13876set dummy $ac_prog; ac_word=$2
13877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13878$as_echo_n "checking for $ac_word... " >&6; }
13879if ${ac_cv_path_CYGPATH+:} false; then :
13880  $as_echo_n "(cached) " >&6
13881else
13882  case $CYGPATH in
13883  [\\/]* | ?:[\\/]*)
13884  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13885  ;;
13886  *)
13887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13888for as_dir in $PATH
13889do
13890  IFS=$as_save_IFS
13891  test -z "$as_dir" && as_dir=.
13892    for ac_exec_ext in '' $ac_executable_extensions; do
13893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13894    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13896    break 2
13897  fi
13898done
13899  done
13900IFS=$as_save_IFS
13901
13902  ;;
13903esac
13904fi
13905CYGPATH=$ac_cv_path_CYGPATH
13906if test -n "$CYGPATH"; then
13907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13908$as_echo "$CYGPATH" >&6; }
13909else
13910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13911$as_echo "no" >&6; }
13912fi
13913
13914
13915  test -n "$CYGPATH" && break
13916done
13917
13918  else
13919    # The variable is set, but is it from the command line or the environment?
13920
13921    # Try to remove the string !CYGPATH! from our list.
13922    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13923    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13924      # If it failed, the variable was not from the command line. Ignore it,
13925      # but warn the user (except for BASH, which is always set by the calling BASH).
13926      if test "xCYGPATH" != xBASH; then
13927        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13928$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13929      fi
13930      # Try to locate tool using the code snippet
13931      for ac_prog in cygpath
13932do
13933  # Extract the first word of "$ac_prog", so it can be a program name with args.
13934set dummy $ac_prog; ac_word=$2
13935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13936$as_echo_n "checking for $ac_word... " >&6; }
13937if ${ac_cv_path_CYGPATH+:} false; then :
13938  $as_echo_n "(cached) " >&6
13939else
13940  case $CYGPATH in
13941  [\\/]* | ?:[\\/]*)
13942  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13943  ;;
13944  *)
13945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13946for as_dir in $PATH
13947do
13948  IFS=$as_save_IFS
13949  test -z "$as_dir" && as_dir=.
13950    for ac_exec_ext in '' $ac_executable_extensions; do
13951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13952    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13954    break 2
13955  fi
13956done
13957  done
13958IFS=$as_save_IFS
13959
13960  ;;
13961esac
13962fi
13963CYGPATH=$ac_cv_path_CYGPATH
13964if test -n "$CYGPATH"; then
13965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13966$as_echo "$CYGPATH" >&6; }
13967else
13968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13969$as_echo "no" >&6; }
13970fi
13971
13972
13973  test -n "$CYGPATH" && break
13974done
13975
13976    else
13977      # If it succeeded, then it was overridden by the user. We will use it
13978      # for the tool.
13979
13980      # First remove it from the list of overridden variables, so we can test
13981      # for unknown variables in the end.
13982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13983
13984      # Check if we try to supply an empty value
13985      if test "x$CYGPATH" = x; then
13986        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13987$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13989$as_echo_n "checking for CYGPATH... " >&6; }
13990        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13991$as_echo "disabled" >&6; }
13992      else
13993        # Check if the provided tool contains a complete path.
13994        tool_specified="$CYGPATH"
13995        tool_basename="${tool_specified##*/}"
13996        if test "x$tool_basename" = "x$tool_specified"; then
13997          # A command without a complete path is provided, search $PATH.
13998          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
13999$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14000          # Extract the first word of "$tool_basename", so it can be a program name with args.
14001set dummy $tool_basename; ac_word=$2
14002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14003$as_echo_n "checking for $ac_word... " >&6; }
14004if ${ac_cv_path_CYGPATH+:} false; then :
14005  $as_echo_n "(cached) " >&6
14006else
14007  case $CYGPATH in
14008  [\\/]* | ?:[\\/]*)
14009  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14010  ;;
14011  *)
14012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14013for as_dir in $PATH
14014do
14015  IFS=$as_save_IFS
14016  test -z "$as_dir" && as_dir=.
14017    for ac_exec_ext in '' $ac_executable_extensions; do
14018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14019    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14021    break 2
14022  fi
14023done
14024  done
14025IFS=$as_save_IFS
14026
14027  ;;
14028esac
14029fi
14030CYGPATH=$ac_cv_path_CYGPATH
14031if test -n "$CYGPATH"; then
14032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14033$as_echo "$CYGPATH" >&6; }
14034else
14035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14036$as_echo "no" >&6; }
14037fi
14038
14039
14040          if test "x$CYGPATH" = x; then
14041            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14042          fi
14043        else
14044          # Otherwise we believe it is a complete path. Use it as it is.
14045          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14046$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14047          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14048$as_echo_n "checking for CYGPATH... " >&6; }
14049          if test ! -x "$tool_specified"; then
14050            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14051$as_echo "not found" >&6; }
14052            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14053          fi
14054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14055$as_echo "$tool_specified" >&6; }
14056        fi
14057      fi
14058    fi
14059
14060  fi
14061
14062
14063
14064
14065  # Publish this variable in the help.
14066
14067
14068  if [ -z "${READLINK+x}" ]; then
14069    # The variable is not set by user, try to locate tool using the code snippet
14070    for ac_prog in greadlink readlink
14071do
14072  # Extract the first word of "$ac_prog", so it can be a program name with args.
14073set dummy $ac_prog; ac_word=$2
14074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14075$as_echo_n "checking for $ac_word... " >&6; }
14076if ${ac_cv_path_READLINK+:} false; then :
14077  $as_echo_n "(cached) " >&6
14078else
14079  case $READLINK in
14080  [\\/]* | ?:[\\/]*)
14081  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14082  ;;
14083  *)
14084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14085for as_dir in $PATH
14086do
14087  IFS=$as_save_IFS
14088  test -z "$as_dir" && as_dir=.
14089    for ac_exec_ext in '' $ac_executable_extensions; do
14090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14091    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14093    break 2
14094  fi
14095done
14096  done
14097IFS=$as_save_IFS
14098
14099  ;;
14100esac
14101fi
14102READLINK=$ac_cv_path_READLINK
14103if test -n "$READLINK"; then
14104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14105$as_echo "$READLINK" >&6; }
14106else
14107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14108$as_echo "no" >&6; }
14109fi
14110
14111
14112  test -n "$READLINK" && break
14113done
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !READLINK! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xREADLINK" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      for ac_prog in greadlink readlink
14129do
14130  # Extract the first word of "$ac_prog", so it can be a program name with args.
14131set dummy $ac_prog; ac_word=$2
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14133$as_echo_n "checking for $ac_word... " >&6; }
14134if ${ac_cv_path_READLINK+:} false; then :
14135  $as_echo_n "(cached) " >&6
14136else
14137  case $READLINK in
14138  [\\/]* | ?:[\\/]*)
14139  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14140  ;;
14141  *)
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_exec_ext in '' $ac_executable_extensions; do
14148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14149    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14151    break 2
14152  fi
14153done
14154  done
14155IFS=$as_save_IFS
14156
14157  ;;
14158esac
14159fi
14160READLINK=$ac_cv_path_READLINK
14161if test -n "$READLINK"; then
14162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14163$as_echo "$READLINK" >&6; }
14164else
14165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14166$as_echo "no" >&6; }
14167fi
14168
14169
14170  test -n "$READLINK" && break
14171done
14172
14173    else
14174      # If it succeeded, then it was overridden by the user. We will use it
14175      # for the tool.
14176
14177      # First remove it from the list of overridden variables, so we can test
14178      # for unknown variables in the end.
14179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14180
14181      # Check if we try to supply an empty value
14182      if test "x$READLINK" = x; then
14183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14184$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14186$as_echo_n "checking for READLINK... " >&6; }
14187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14188$as_echo "disabled" >&6; }
14189      else
14190        # Check if the provided tool contains a complete path.
14191        tool_specified="$READLINK"
14192        tool_basename="${tool_specified##*/}"
14193        if test "x$tool_basename" = "x$tool_specified"; then
14194          # A command without a complete path is provided, search $PATH.
14195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14196$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14197          # Extract the first word of "$tool_basename", so it can be a program name with args.
14198set dummy $tool_basename; ac_word=$2
14199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14200$as_echo_n "checking for $ac_word... " >&6; }
14201if ${ac_cv_path_READLINK+:} false; then :
14202  $as_echo_n "(cached) " >&6
14203else
14204  case $READLINK in
14205  [\\/]* | ?:[\\/]*)
14206  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14207  ;;
14208  *)
14209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14210for as_dir in $PATH
14211do
14212  IFS=$as_save_IFS
14213  test -z "$as_dir" && as_dir=.
14214    for ac_exec_ext in '' $ac_executable_extensions; do
14215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14216    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14218    break 2
14219  fi
14220done
14221  done
14222IFS=$as_save_IFS
14223
14224  ;;
14225esac
14226fi
14227READLINK=$ac_cv_path_READLINK
14228if test -n "$READLINK"; then
14229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14230$as_echo "$READLINK" >&6; }
14231else
14232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14233$as_echo "no" >&6; }
14234fi
14235
14236
14237          if test "x$READLINK" = x; then
14238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14239          fi
14240        else
14241          # Otherwise we believe it is a complete path. Use it as it is.
14242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14243$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14245$as_echo_n "checking for READLINK... " >&6; }
14246          if test ! -x "$tool_specified"; then
14247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14248$as_echo "not found" >&6; }
14249            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14250          fi
14251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14252$as_echo "$tool_specified" >&6; }
14253        fi
14254      fi
14255    fi
14256
14257  fi
14258
14259
14260
14261
14262  # Publish this variable in the help.
14263
14264
14265  if [ -z "${DF+x}" ]; then
14266    # The variable is not set by user, try to locate tool using the code snippet
14267    for ac_prog in df
14268do
14269  # Extract the first word of "$ac_prog", so it can be a program name with args.
14270set dummy $ac_prog; ac_word=$2
14271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14272$as_echo_n "checking for $ac_word... " >&6; }
14273if ${ac_cv_path_DF+:} false; then :
14274  $as_echo_n "(cached) " >&6
14275else
14276  case $DF in
14277  [\\/]* | ?:[\\/]*)
14278  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14279  ;;
14280  *)
14281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14282for as_dir in $PATH
14283do
14284  IFS=$as_save_IFS
14285  test -z "$as_dir" && as_dir=.
14286    for ac_exec_ext in '' $ac_executable_extensions; do
14287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14288    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14290    break 2
14291  fi
14292done
14293  done
14294IFS=$as_save_IFS
14295
14296  ;;
14297esac
14298fi
14299DF=$ac_cv_path_DF
14300if test -n "$DF"; then
14301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14302$as_echo "$DF" >&6; }
14303else
14304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14305$as_echo "no" >&6; }
14306fi
14307
14308
14309  test -n "$DF" && break
14310done
14311
14312  else
14313    # The variable is set, but is it from the command line or the environment?
14314
14315    # Try to remove the string !DF! from our list.
14316    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14317    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14318      # If it failed, the variable was not from the command line. Ignore it,
14319      # but warn the user (except for BASH, which is always set by the calling BASH).
14320      if test "xDF" != xBASH; then
14321        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14322$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14323      fi
14324      # Try to locate tool using the code snippet
14325      for ac_prog in df
14326do
14327  # Extract the first word of "$ac_prog", so it can be a program name with args.
14328set dummy $ac_prog; ac_word=$2
14329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14330$as_echo_n "checking for $ac_word... " >&6; }
14331if ${ac_cv_path_DF+:} false; then :
14332  $as_echo_n "(cached) " >&6
14333else
14334  case $DF in
14335  [\\/]* | ?:[\\/]*)
14336  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14337  ;;
14338  *)
14339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14340for as_dir in $PATH
14341do
14342  IFS=$as_save_IFS
14343  test -z "$as_dir" && as_dir=.
14344    for ac_exec_ext in '' $ac_executable_extensions; do
14345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14346    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14348    break 2
14349  fi
14350done
14351  done
14352IFS=$as_save_IFS
14353
14354  ;;
14355esac
14356fi
14357DF=$ac_cv_path_DF
14358if test -n "$DF"; then
14359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14360$as_echo "$DF" >&6; }
14361else
14362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14363$as_echo "no" >&6; }
14364fi
14365
14366
14367  test -n "$DF" && break
14368done
14369
14370    else
14371      # If it succeeded, then it was overridden by the user. We will use it
14372      # for the tool.
14373
14374      # First remove it from the list of overridden variables, so we can test
14375      # for unknown variables in the end.
14376      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14377
14378      # Check if we try to supply an empty value
14379      if test "x$DF" = x; then
14380        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14381$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14383$as_echo_n "checking for DF... " >&6; }
14384        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14385$as_echo "disabled" >&6; }
14386      else
14387        # Check if the provided tool contains a complete path.
14388        tool_specified="$DF"
14389        tool_basename="${tool_specified##*/}"
14390        if test "x$tool_basename" = "x$tool_specified"; then
14391          # A command without a complete path is provided, search $PATH.
14392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14393$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14394          # Extract the first word of "$tool_basename", so it can be a program name with args.
14395set dummy $tool_basename; ac_word=$2
14396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14397$as_echo_n "checking for $ac_word... " >&6; }
14398if ${ac_cv_path_DF+:} false; then :
14399  $as_echo_n "(cached) " >&6
14400else
14401  case $DF in
14402  [\\/]* | ?:[\\/]*)
14403  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14404  ;;
14405  *)
14406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14407for as_dir in $PATH
14408do
14409  IFS=$as_save_IFS
14410  test -z "$as_dir" && as_dir=.
14411    for ac_exec_ext in '' $ac_executable_extensions; do
14412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14413    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14415    break 2
14416  fi
14417done
14418  done
14419IFS=$as_save_IFS
14420
14421  ;;
14422esac
14423fi
14424DF=$ac_cv_path_DF
14425if test -n "$DF"; then
14426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14427$as_echo "$DF" >&6; }
14428else
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14430$as_echo "no" >&6; }
14431fi
14432
14433
14434          if test "x$DF" = x; then
14435            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14436          fi
14437        else
14438          # Otherwise we believe it is a complete path. Use it as it is.
14439          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14440$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14441          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14442$as_echo_n "checking for DF... " >&6; }
14443          if test ! -x "$tool_specified"; then
14444            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14445$as_echo "not found" >&6; }
14446            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14447          fi
14448          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14449$as_echo "$tool_specified" >&6; }
14450        fi
14451      fi
14452    fi
14453
14454  fi
14455
14456
14457
14458
14459  # Publish this variable in the help.
14460
14461
14462  if [ -z "${CPIO+x}" ]; then
14463    # The variable is not set by user, try to locate tool using the code snippet
14464    for ac_prog in cpio bsdcpio
14465do
14466  # Extract the first word of "$ac_prog", so it can be a program name with args.
14467set dummy $ac_prog; ac_word=$2
14468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14469$as_echo_n "checking for $ac_word... " >&6; }
14470if ${ac_cv_path_CPIO+:} false; then :
14471  $as_echo_n "(cached) " >&6
14472else
14473  case $CPIO in
14474  [\\/]* | ?:[\\/]*)
14475  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14476  ;;
14477  *)
14478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14479for as_dir in $PATH
14480do
14481  IFS=$as_save_IFS
14482  test -z "$as_dir" && as_dir=.
14483    for ac_exec_ext in '' $ac_executable_extensions; do
14484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14485    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14487    break 2
14488  fi
14489done
14490  done
14491IFS=$as_save_IFS
14492
14493  ;;
14494esac
14495fi
14496CPIO=$ac_cv_path_CPIO
14497if test -n "$CPIO"; then
14498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14499$as_echo "$CPIO" >&6; }
14500else
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14502$as_echo "no" >&6; }
14503fi
14504
14505
14506  test -n "$CPIO" && break
14507done
14508
14509  else
14510    # The variable is set, but is it from the command line or the environment?
14511
14512    # Try to remove the string !CPIO! from our list.
14513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14515      # If it failed, the variable was not from the command line. Ignore it,
14516      # but warn the user (except for BASH, which is always set by the calling BASH).
14517      if test "xCPIO" != xBASH; then
14518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14519$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14520      fi
14521      # Try to locate tool using the code snippet
14522      for ac_prog in cpio bsdcpio
14523do
14524  # Extract the first word of "$ac_prog", so it can be a program name with args.
14525set dummy $ac_prog; ac_word=$2
14526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14527$as_echo_n "checking for $ac_word... " >&6; }
14528if ${ac_cv_path_CPIO+:} false; then :
14529  $as_echo_n "(cached) " >&6
14530else
14531  case $CPIO in
14532  [\\/]* | ?:[\\/]*)
14533  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14534  ;;
14535  *)
14536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14537for as_dir in $PATH
14538do
14539  IFS=$as_save_IFS
14540  test -z "$as_dir" && as_dir=.
14541    for ac_exec_ext in '' $ac_executable_extensions; do
14542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14543    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14545    break 2
14546  fi
14547done
14548  done
14549IFS=$as_save_IFS
14550
14551  ;;
14552esac
14553fi
14554CPIO=$ac_cv_path_CPIO
14555if test -n "$CPIO"; then
14556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14557$as_echo "$CPIO" >&6; }
14558else
14559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14560$as_echo "no" >&6; }
14561fi
14562
14563
14564  test -n "$CPIO" && break
14565done
14566
14567    else
14568      # If it succeeded, then it was overridden by the user. We will use it
14569      # for the tool.
14570
14571      # First remove it from the list of overridden variables, so we can test
14572      # for unknown variables in the end.
14573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14574
14575      # Check if we try to supply an empty value
14576      if test "x$CPIO" = x; then
14577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14578$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14580$as_echo_n "checking for CPIO... " >&6; }
14581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14582$as_echo "disabled" >&6; }
14583      else
14584        # Check if the provided tool contains a complete path.
14585        tool_specified="$CPIO"
14586        tool_basename="${tool_specified##*/}"
14587        if test "x$tool_basename" = "x$tool_specified"; then
14588          # A command without a complete path is provided, search $PATH.
14589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14590$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14591          # Extract the first word of "$tool_basename", so it can be a program name with args.
14592set dummy $tool_basename; ac_word=$2
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14594$as_echo_n "checking for $ac_word... " >&6; }
14595if ${ac_cv_path_CPIO+:} false; then :
14596  $as_echo_n "(cached) " >&6
14597else
14598  case $CPIO in
14599  [\\/]* | ?:[\\/]*)
14600  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14601  ;;
14602  *)
14603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14604for as_dir in $PATH
14605do
14606  IFS=$as_save_IFS
14607  test -z "$as_dir" && as_dir=.
14608    for ac_exec_ext in '' $ac_executable_extensions; do
14609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14610    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14612    break 2
14613  fi
14614done
14615  done
14616IFS=$as_save_IFS
14617
14618  ;;
14619esac
14620fi
14621CPIO=$ac_cv_path_CPIO
14622if test -n "$CPIO"; then
14623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14624$as_echo "$CPIO" >&6; }
14625else
14626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14627$as_echo "no" >&6; }
14628fi
14629
14630
14631          if test "x$CPIO" = x; then
14632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14633          fi
14634        else
14635          # Otherwise we believe it is a complete path. Use it as it is.
14636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14637$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14639$as_echo_n "checking for CPIO... " >&6; }
14640          if test ! -x "$tool_specified"; then
14641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14642$as_echo "not found" >&6; }
14643            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14644          fi
14645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14646$as_echo "$tool_specified" >&6; }
14647        fi
14648      fi
14649    fi
14650
14651  fi
14652
14653
14654
14655
14656  # Publish this variable in the help.
14657
14658
14659  if [ -z "${NICE+x}" ]; then
14660    # The variable is not set by user, try to locate tool using the code snippet
14661    for ac_prog in nice
14662do
14663  # Extract the first word of "$ac_prog", so it can be a program name with args.
14664set dummy $ac_prog; ac_word=$2
14665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14666$as_echo_n "checking for $ac_word... " >&6; }
14667if ${ac_cv_path_NICE+:} false; then :
14668  $as_echo_n "(cached) " >&6
14669else
14670  case $NICE in
14671  [\\/]* | ?:[\\/]*)
14672  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14673  ;;
14674  *)
14675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14676for as_dir in $PATH
14677do
14678  IFS=$as_save_IFS
14679  test -z "$as_dir" && as_dir=.
14680    for ac_exec_ext in '' $ac_executable_extensions; do
14681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14682    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14684    break 2
14685  fi
14686done
14687  done
14688IFS=$as_save_IFS
14689
14690  ;;
14691esac
14692fi
14693NICE=$ac_cv_path_NICE
14694if test -n "$NICE"; then
14695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14696$as_echo "$NICE" >&6; }
14697else
14698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14699$as_echo "no" >&6; }
14700fi
14701
14702
14703  test -n "$NICE" && break
14704done
14705
14706  else
14707    # The variable is set, but is it from the command line or the environment?
14708
14709    # Try to remove the string !NICE! from our list.
14710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14712      # If it failed, the variable was not from the command line. Ignore it,
14713      # but warn the user (except for BASH, which is always set by the calling BASH).
14714      if test "xNICE" != xBASH; then
14715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14716$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14717      fi
14718      # Try to locate tool using the code snippet
14719      for ac_prog in nice
14720do
14721  # Extract the first word of "$ac_prog", so it can be a program name with args.
14722set dummy $ac_prog; ac_word=$2
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14724$as_echo_n "checking for $ac_word... " >&6; }
14725if ${ac_cv_path_NICE+:} false; then :
14726  $as_echo_n "(cached) " >&6
14727else
14728  case $NICE in
14729  [\\/]* | ?:[\\/]*)
14730  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14731  ;;
14732  *)
14733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14734for as_dir in $PATH
14735do
14736  IFS=$as_save_IFS
14737  test -z "$as_dir" && as_dir=.
14738    for ac_exec_ext in '' $ac_executable_extensions; do
14739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14740    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14742    break 2
14743  fi
14744done
14745  done
14746IFS=$as_save_IFS
14747
14748  ;;
14749esac
14750fi
14751NICE=$ac_cv_path_NICE
14752if test -n "$NICE"; then
14753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14754$as_echo "$NICE" >&6; }
14755else
14756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14757$as_echo "no" >&6; }
14758fi
14759
14760
14761  test -n "$NICE" && break
14762done
14763
14764    else
14765      # If it succeeded, then it was overridden by the user. We will use it
14766      # for the tool.
14767
14768      # First remove it from the list of overridden variables, so we can test
14769      # for unknown variables in the end.
14770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14771
14772      # Check if we try to supply an empty value
14773      if test "x$NICE" = x; then
14774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14775$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14777$as_echo_n "checking for NICE... " >&6; }
14778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14779$as_echo "disabled" >&6; }
14780      else
14781        # Check if the provided tool contains a complete path.
14782        tool_specified="$NICE"
14783        tool_basename="${tool_specified##*/}"
14784        if test "x$tool_basename" = "x$tool_specified"; then
14785          # A command without a complete path is provided, search $PATH.
14786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14787$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14788          # Extract the first word of "$tool_basename", so it can be a program name with args.
14789set dummy $tool_basename; ac_word=$2
14790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14791$as_echo_n "checking for $ac_word... " >&6; }
14792if ${ac_cv_path_NICE+:} false; then :
14793  $as_echo_n "(cached) " >&6
14794else
14795  case $NICE in
14796  [\\/]* | ?:[\\/]*)
14797  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14798  ;;
14799  *)
14800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14801for as_dir in $PATH
14802do
14803  IFS=$as_save_IFS
14804  test -z "$as_dir" && as_dir=.
14805    for ac_exec_ext in '' $ac_executable_extensions; do
14806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14807    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14809    break 2
14810  fi
14811done
14812  done
14813IFS=$as_save_IFS
14814
14815  ;;
14816esac
14817fi
14818NICE=$ac_cv_path_NICE
14819if test -n "$NICE"; then
14820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14821$as_echo "$NICE" >&6; }
14822else
14823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14824$as_echo "no" >&6; }
14825fi
14826
14827
14828          if test "x$NICE" = x; then
14829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14830          fi
14831        else
14832          # Otherwise we believe it is a complete path. Use it as it is.
14833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14834$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14836$as_echo_n "checking for NICE... " >&6; }
14837          if test ! -x "$tool_specified"; then
14838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14839$as_echo "not found" >&6; }
14840            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14841          fi
14842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14843$as_echo "$tool_specified" >&6; }
14844        fi
14845      fi
14846    fi
14847
14848  fi
14849
14850
14851
14852
14853# Now we can determine OpenJDK build and target platforms. This is required to
14854# have early on.
14855# Make sure we can run config.sub.
14856$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14857  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14858
14859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14860$as_echo_n "checking build system type... " >&6; }
14861if ${ac_cv_build+:} false; then :
14862  $as_echo_n "(cached) " >&6
14863else
14864  ac_build_alias=$build_alias
14865test "x$ac_build_alias" = x &&
14866  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14867test "x$ac_build_alias" = x &&
14868  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14869ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14870  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14871
14872fi
14873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14874$as_echo "$ac_cv_build" >&6; }
14875case $ac_cv_build in
14876*-*-*) ;;
14877*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14878esac
14879build=$ac_cv_build
14880ac_save_IFS=$IFS; IFS='-'
14881set x $ac_cv_build
14882shift
14883build_cpu=$1
14884build_vendor=$2
14885shift; shift
14886# Remember, the first character of IFS is used to create $*,
14887# except with old shells:
14888build_os=$*
14889IFS=$ac_save_IFS
14890case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14891
14892
14893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14894$as_echo_n "checking host system type... " >&6; }
14895if ${ac_cv_host+:} false; then :
14896  $as_echo_n "(cached) " >&6
14897else
14898  if test "x$host_alias" = x; then
14899  ac_cv_host=$ac_cv_build
14900else
14901  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14902    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14903fi
14904
14905fi
14906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14907$as_echo "$ac_cv_host" >&6; }
14908case $ac_cv_host in
14909*-*-*) ;;
14910*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14911esac
14912host=$ac_cv_host
14913ac_save_IFS=$IFS; IFS='-'
14914set x $ac_cv_host
14915shift
14916host_cpu=$1
14917host_vendor=$2
14918shift; shift
14919# Remember, the first character of IFS is used to create $*,
14920# except with old shells:
14921host_os=$*
14922IFS=$ac_save_IFS
14923case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14924
14925
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14927$as_echo_n "checking target system type... " >&6; }
14928if ${ac_cv_target+:} false; then :
14929  $as_echo_n "(cached) " >&6
14930else
14931  if test "x$target_alias" = x; then
14932  ac_cv_target=$ac_cv_host
14933else
14934  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14935    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14936fi
14937
14938fi
14939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14940$as_echo "$ac_cv_target" >&6; }
14941case $ac_cv_target in
14942*-*-*) ;;
14943*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14944esac
14945target=$ac_cv_target
14946ac_save_IFS=$IFS; IFS='-'
14947set x $ac_cv_target
14948shift
14949target_cpu=$1
14950target_vendor=$2
14951shift; shift
14952# Remember, the first character of IFS is used to create $*,
14953# except with old shells:
14954target_os=$*
14955IFS=$ac_save_IFS
14956case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14957
14958
14959# The aliases save the names the user supplied, while $host etc.
14960# will get canonicalized.
14961test -n "$target_alias" &&
14962  test "$program_prefix$program_suffix$program_transform_name" = \
14963    NONENONEs,x,x, &&
14964  program_prefix=${target_alias}-
14965
14966  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14967  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14968  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14969  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14970  # to use the configure naming style.
14971
14972
14973
14974
14975
14976  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14977  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14978  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14979  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14980  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14981  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14982
14983
14984
14985  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14986
14987  case "$build_os" in
14988    *linux*)
14989      VAR_OS=linux
14990      VAR_OS_TYPE=unix
14991      ;;
14992    *solaris*)
14993      VAR_OS=solaris
14994      VAR_OS_TYPE=unix
14995      ;;
14996    *darwin*)
14997      VAR_OS=macosx
14998      VAR_OS_TYPE=unix
14999      ;;
15000    *bsd*)
15001      VAR_OS=bsd
15002      VAR_OS_TYPE=unix
15003      ;;
15004    *cygwin*)
15005      VAR_OS=windows
15006      VAR_OS_ENV=windows.cygwin
15007      ;;
15008    *mingw*)
15009      VAR_OS=windows
15010      VAR_OS_ENV=windows.msys
15011      ;;
15012    *aix*)
15013      VAR_OS=aix
15014      VAR_OS_TYPE=unix
15015      ;;
15016    *)
15017      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15018      ;;
15019  esac
15020
15021
15022  # First argument is the cpu name from the trip/quad
15023  case "$build_cpu" in
15024    x86_64)
15025      VAR_CPU=x86_64
15026      VAR_CPU_ARCH=x86
15027      VAR_CPU_BITS=64
15028      VAR_CPU_ENDIAN=little
15029      ;;
15030    i?86)
15031      VAR_CPU=x86
15032      VAR_CPU_ARCH=x86
15033      VAR_CPU_BITS=32
15034      VAR_CPU_ENDIAN=little
15035      ;;
15036    arm*)
15037      VAR_CPU=arm
15038      VAR_CPU_ARCH=arm
15039      VAR_CPU_BITS=32
15040      VAR_CPU_ENDIAN=little
15041      ;;
15042    aarch64)
15043      VAR_CPU=aarch64
15044      VAR_CPU_ARCH=aarch64
15045      VAR_CPU_BITS=64
15046      VAR_CPU_ENDIAN=little
15047      ;;
15048    powerpc)
15049      VAR_CPU=ppc
15050      VAR_CPU_ARCH=ppc
15051      VAR_CPU_BITS=32
15052      VAR_CPU_ENDIAN=big
15053      ;;
15054    powerpc64)
15055      VAR_CPU=ppc64
15056      VAR_CPU_ARCH=ppc
15057      VAR_CPU_BITS=64
15058      VAR_CPU_ENDIAN=big
15059      ;;
15060    powerpc64le)
15061      VAR_CPU=ppc64le
15062      VAR_CPU_ARCH=ppc
15063      VAR_CPU_BITS=64
15064      VAR_CPU_ENDIAN=little
15065      ;;
15066    s390)
15067      VAR_CPU=s390
15068      VAR_CPU_ARCH=s390
15069      VAR_CPU_BITS=32
15070      VAR_CPU_ENDIAN=big
15071      ;;
15072    s390x)
15073      VAR_CPU=s390x
15074      VAR_CPU_ARCH=s390
15075      VAR_CPU_BITS=64
15076      VAR_CPU_ENDIAN=big
15077      ;;
15078    sparc)
15079      VAR_CPU=sparc
15080      VAR_CPU_ARCH=sparc
15081      VAR_CPU_BITS=32
15082      VAR_CPU_ENDIAN=big
15083      ;;
15084    sparcv9|sparc64)
15085      VAR_CPU=sparcv9
15086      VAR_CPU_ARCH=sparc
15087      VAR_CPU_BITS=64
15088      VAR_CPU_ENDIAN=big
15089      ;;
15090    *)
15091      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15092      ;;
15093  esac
15094
15095  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15096  OPENJDK_BUILD_OS="$VAR_OS"
15097  if test "x$VAR_OS_TYPE" != x; then
15098    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15099  else
15100    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15101  fi
15102  if test "x$VAR_OS_ENV" != x; then
15103    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15104  else
15105    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15106  fi
15107  OPENJDK_BUILD_CPU="$VAR_CPU"
15108  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15109  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15110  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15111
15112
15113
15114
15115
15116
15117
15118
15119  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15120$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15122$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15123
15124  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15125
15126  case "$host_os" in
15127    *linux*)
15128      VAR_OS=linux
15129      VAR_OS_TYPE=unix
15130      ;;
15131    *solaris*)
15132      VAR_OS=solaris
15133      VAR_OS_TYPE=unix
15134      ;;
15135    *darwin*)
15136      VAR_OS=macosx
15137      VAR_OS_TYPE=unix
15138      ;;
15139    *bsd*)
15140      VAR_OS=bsd
15141      VAR_OS_TYPE=unix
15142      ;;
15143    *cygwin*)
15144      VAR_OS=windows
15145      VAR_OS_ENV=windows.cygwin
15146      ;;
15147    *mingw*)
15148      VAR_OS=windows
15149      VAR_OS_ENV=windows.msys
15150      ;;
15151    *aix*)
15152      VAR_OS=aix
15153      VAR_OS_TYPE=unix
15154      ;;
15155    *)
15156      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15157      ;;
15158  esac
15159
15160
15161  # First argument is the cpu name from the trip/quad
15162  case "$host_cpu" in
15163    x86_64)
15164      VAR_CPU=x86_64
15165      VAR_CPU_ARCH=x86
15166      VAR_CPU_BITS=64
15167      VAR_CPU_ENDIAN=little
15168      ;;
15169    i?86)
15170      VAR_CPU=x86
15171      VAR_CPU_ARCH=x86
15172      VAR_CPU_BITS=32
15173      VAR_CPU_ENDIAN=little
15174      ;;
15175    arm*)
15176      VAR_CPU=arm
15177      VAR_CPU_ARCH=arm
15178      VAR_CPU_BITS=32
15179      VAR_CPU_ENDIAN=little
15180      ;;
15181    aarch64)
15182      VAR_CPU=aarch64
15183      VAR_CPU_ARCH=aarch64
15184      VAR_CPU_BITS=64
15185      VAR_CPU_ENDIAN=little
15186      ;;
15187    powerpc)
15188      VAR_CPU=ppc
15189      VAR_CPU_ARCH=ppc
15190      VAR_CPU_BITS=32
15191      VAR_CPU_ENDIAN=big
15192      ;;
15193    powerpc64)
15194      VAR_CPU=ppc64
15195      VAR_CPU_ARCH=ppc
15196      VAR_CPU_BITS=64
15197      VAR_CPU_ENDIAN=big
15198      ;;
15199    powerpc64le)
15200      VAR_CPU=ppc64le
15201      VAR_CPU_ARCH=ppc
15202      VAR_CPU_BITS=64
15203      VAR_CPU_ENDIAN=little
15204      ;;
15205    s390)
15206      VAR_CPU=s390
15207      VAR_CPU_ARCH=s390
15208      VAR_CPU_BITS=32
15209      VAR_CPU_ENDIAN=big
15210      ;;
15211    s390x)
15212      VAR_CPU=s390x
15213      VAR_CPU_ARCH=s390
15214      VAR_CPU_BITS=64
15215      VAR_CPU_ENDIAN=big
15216      ;;
15217    sparc)
15218      VAR_CPU=sparc
15219      VAR_CPU_ARCH=sparc
15220      VAR_CPU_BITS=32
15221      VAR_CPU_ENDIAN=big
15222      ;;
15223    sparcv9|sparc64)
15224      VAR_CPU=sparcv9
15225      VAR_CPU_ARCH=sparc
15226      VAR_CPU_BITS=64
15227      VAR_CPU_ENDIAN=big
15228      ;;
15229    *)
15230      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15231      ;;
15232  esac
15233
15234  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15235  OPENJDK_TARGET_OS="$VAR_OS"
15236  if test "x$VAR_OS_TYPE" != x; then
15237    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15238  else
15239    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15240  fi
15241  if test "x$VAR_OS_ENV" != x; then
15242    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15243  else
15244    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15245  fi
15246  OPENJDK_TARGET_CPU="$VAR_CPU"
15247  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15248  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15249  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15250
15251
15252
15253
15254
15255
15256
15257
15258  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15259$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15261$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15262
15263
15264
15265# Check whether --with-target-bits was given.
15266if test "${with_target_bits+set}" = set; then :
15267  withval=$with_target_bits;
15268fi
15269
15270
15271  # We have three types of compiles:
15272  # native  == normal compilation, target system == build system
15273  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15274  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15275  #
15276  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15277    # We're doing a proper cross-compilation
15278    COMPILE_TYPE="cross"
15279  else
15280    COMPILE_TYPE="native"
15281  fi
15282
15283  if test "x$with_target_bits" != x; then
15284    if test "x$COMPILE_TYPE" = "xcross"; then
15285      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15286    fi
15287
15288    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15289      # A reduced build is requested
15290      COMPILE_TYPE="reduced"
15291      OPENJDK_TARGET_CPU_BITS=32
15292      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15293        OPENJDK_TARGET_CPU=x86
15294      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15295        OPENJDK_TARGET_CPU=sparc
15296      else
15297        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15298      fi
15299    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15300      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
15301    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15302      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15303$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15304    else
15305      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15306    fi
15307  fi
15308
15309
15310  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15311$as_echo_n "checking compilation type... " >&6; }
15312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15313$as_echo "$COMPILE_TYPE" >&6; }
15314
15315
15316  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15317    REQUIRED_OS_NAME=SunOS
15318    REQUIRED_OS_VERSION=5.10
15319  fi
15320  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15321    REQUIRED_OS_NAME=Linux
15322    REQUIRED_OS_VERSION=2.6
15323  fi
15324  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15325    REQUIRED_OS_NAME=Windows
15326    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15327      REQUIRED_OS_VERSION=5.2
15328    else
15329      REQUIRED_OS_VERSION=5.1
15330    fi
15331  fi
15332  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15333    REQUIRED_OS_NAME=Darwin
15334    REQUIRED_OS_VERSION=11.2
15335  fi
15336  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15337    REQUIRED_OS_NAME=AIX
15338    REQUIRED_OS_VERSION=7.1
15339  fi
15340
15341
15342
15343
15344
15345
15346  # Also store the legacy naming of the cpu.
15347  # Ie i586 and amd64 instead of x86 and x86_64
15348  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15349  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15350    OPENJDK_TARGET_CPU_LEGACY="i586"
15351  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15352    # On all platforms except MacOSX replace x86_64 with amd64.
15353    OPENJDK_TARGET_CPU_LEGACY="amd64"
15354  fi
15355
15356
15357  # And the second legacy naming of the cpu.
15358  # Ie i386 and amd64 instead of x86 and x86_64.
15359  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15360  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15361    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15362  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15363    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15364  fi
15365
15366
15367  # This is the name of the cpu (but using i386 and amd64 instead of
15368  # x86 and x86_64, respectively), preceeded by a /, to be used when
15369  # locating libraries. On macosx, it's empty, though.
15370  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15371  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15372    OPENJDK_TARGET_CPU_LIBDIR=""
15373  fi
15374
15375
15376  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15377  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15378  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15379  OPENJDK_TARGET_CPU_ISADIR=""
15380  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15381    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15382      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15383    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15384      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15385    fi
15386  fi
15387
15388
15389  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15390  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15391  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15392    # On linux only, we replace x86 with i386.
15393    OPENJDK_TARGET_CPU_OSARCH="i386"
15394  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15395    # On all platforms except macosx, we replace x86_64 with amd64.
15396    OPENJDK_TARGET_CPU_OSARCH="amd64"
15397  fi
15398
15399
15400  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15401  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15402    OPENJDK_TARGET_CPU_JLI="i386"
15403  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15404    # On all platforms except macosx, we replace x86_64 with amd64.
15405    OPENJDK_TARGET_CPU_JLI="amd64"
15406  fi
15407  # Now setup the -D flags for building libjli.
15408  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15409  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15410    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15411      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15412    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15413      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15414    fi
15415  fi
15416
15417
15418  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15419      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15420  else
15421      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15422  fi
15423
15424
15425  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15426    A_LP64="LP64:="
15427    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15428    # unpack200.exe
15429    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15430      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15431    fi
15432  fi
15433  LP64=$A_LP64
15434
15435
15436  if test "x$COMPILE_TYPE" = "xcross"; then
15437    # FIXME: ... or should this include reduced builds..?
15438    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15439  else
15440    DEFINE_CROSS_COMPILE_ARCH=""
15441  fi
15442
15443
15444  # Convert openjdk platform names to hotspot names
15445
15446  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15447  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15448    HOTSPOT_TARGET_OS=bsd
15449  fi
15450
15451
15452  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15453  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15454    HOTSPOT_TARGET_OS_TYPE=posix
15455  fi
15456
15457
15458  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15459  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15460    HOTSPOT_TARGET_CPU=x86_32
15461  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15462    HOTSPOT_TARGET_CPU=sparc
15463  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15464    HOTSPOT_TARGET_CPU=ppc_64
15465  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15466    HOTSPOT_TARGET_CPU=ppc_64
15467  fi
15468
15469
15470  # This is identical with OPENJDK_*, but define anyway for consistency.
15471  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15472
15473
15474  # Setup HOTSPOT_TARGET_CPU_DEFINE
15475  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15476    HOTSPOT_TARGET_CPU_DEFINE=IA32
15477  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15478    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15479  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15480    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15481  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15482    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15483  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15484    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15485  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15486    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15487
15488  # The cpu defines below are for zero, we don't support them directly.
15489  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15490    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15491  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15492    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15493  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15494    HOTSPOT_TARGET_CPU_DEFINE=S390
15495  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15496    HOTSPOT_TARGET_CPU_DEFINE=S390
15497  fi
15498
15499
15500
15501
15502  # Also store the legacy naming of the cpu.
15503  # Ie i586 and amd64 instead of x86 and x86_64
15504  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15505  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15506    OPENJDK_BUILD_CPU_LEGACY="i586"
15507  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15508    # On all platforms except MacOSX replace x86_64 with amd64.
15509    OPENJDK_BUILD_CPU_LEGACY="amd64"
15510  fi
15511
15512
15513  # And the second legacy naming of the cpu.
15514  # Ie i386 and amd64 instead of x86 and x86_64.
15515  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15516  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15517    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15518  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15519    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15520  fi
15521
15522
15523  # This is the name of the cpu (but using i386 and amd64 instead of
15524  # x86 and x86_64, respectively), preceeded by a /, to be used when
15525  # locating libraries. On macosx, it's empty, though.
15526  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15527  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15528    OPENJDK_BUILD_CPU_LIBDIR=""
15529  fi
15530
15531
15532  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15533  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15534  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15535  OPENJDK_BUILD_CPU_ISADIR=""
15536  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15537    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15538      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15539    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15540      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15541    fi
15542  fi
15543
15544
15545  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15546  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15547  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15548    # On linux only, we replace x86 with i386.
15549    OPENJDK_BUILD_CPU_OSARCH="i386"
15550  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15551    # On all platforms except macosx, we replace x86_64 with amd64.
15552    OPENJDK_BUILD_CPU_OSARCH="amd64"
15553  fi
15554
15555
15556  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15557  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15558    OPENJDK_BUILD_CPU_JLI="i386"
15559  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15560    # On all platforms except macosx, we replace x86_64 with amd64.
15561    OPENJDK_BUILD_CPU_JLI="amd64"
15562  fi
15563  # Now setup the -D flags for building libjli.
15564  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15565  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15566    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15567      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15568    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15569      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15570    fi
15571  fi
15572
15573
15574  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15575      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15576  else
15577      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15578  fi
15579
15580
15581  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15582    A_LP64="LP64:="
15583    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15584    # unpack200.exe
15585    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15586      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15587    fi
15588  fi
15589  LP64=$A_LP64
15590
15591
15592  if test "x$COMPILE_TYPE" = "xcross"; then
15593    # FIXME: ... or should this include reduced builds..?
15594    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15595  else
15596    DEFINE_CROSS_COMPILE_ARCH=""
15597  fi
15598
15599
15600  # Convert openjdk platform names to hotspot names
15601
15602  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15603  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15604    HOTSPOT_BUILD_OS=bsd
15605  fi
15606
15607
15608  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15609  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15610    HOTSPOT_BUILD_OS_TYPE=posix
15611  fi
15612
15613
15614  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15615  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15616    HOTSPOT_BUILD_CPU=x86_32
15617  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15618    HOTSPOT_BUILD_CPU=sparc
15619  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15620    HOTSPOT_BUILD_CPU=ppc_64
15621  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15622    HOTSPOT_BUILD_CPU=ppc_64
15623  fi
15624
15625
15626  # This is identical with OPENJDK_*, but define anyway for consistency.
15627  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15628
15629
15630  # Setup HOTSPOT_BUILD_CPU_DEFINE
15631  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15632    HOTSPOT_BUILD_CPU_DEFINE=IA32
15633  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15634    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15635  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15636    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15637  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15638    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15639  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15640    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15641  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15642    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15643
15644  # The cpu defines below are for zero, we don't support them directly.
15645  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15646    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15647  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15648    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15649  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15650    HOTSPOT_BUILD_CPU_DEFINE=S390
15651  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15652    HOTSPOT_BUILD_CPU_DEFINE=S390
15653  fi
15654
15655
15656
15657
15658  # ZERO_ARCHDEF is used to enable architecture-specific code.
15659  # This is used in legacy hotspot build.
15660  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15661
15662
15663
15664
15665
15666# Continue setting up basic stuff. Most remaining code require fundamental tools.
15667
15668  # Save the current directory this script was started from
15669  CURDIR="$PWD"
15670
15671  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15672  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15673  # was not available at that time.
15674  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15675  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15676    ORIGINAL_PATH="$REWRITTEN_PATH"
15677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15678$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15679  fi
15680
15681  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15682    PATH_SEP=";"
15683
15684  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15685  if test $SRC_ROOT_LENGTH -gt 100; then
15686    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15687  fi
15688
15689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15690    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15691$as_echo_n "checking cygwin release... " >&6; }
15692    CYGWIN_VERSION=`$UNAME -r`
15693    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15694$as_echo "$CYGWIN_VERSION" >&6; }
15695    WINDOWS_ENV_VENDOR='cygwin'
15696    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15697
15698    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15699    if test "x$CYGWIN_VERSION_OLD" != x; then
15700      { $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
15701$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;}
15702      as_fn_error $? "Cannot continue" "$LINENO" 5
15703    fi
15704    if test "x$CYGPATH" = x; then
15705      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15706    fi
15707    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15708$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15709    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15710    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15711    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15712    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15713    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15714$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15715    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15716    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15717    if test "x$test_cygdrive_prefix" = x; then
15718      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15719    fi
15720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15722$as_echo_n "checking msys release... " >&6; }
15723    MSYS_VERSION=`$UNAME -r`
15724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15725$as_echo "$MSYS_VERSION" >&6; }
15726
15727    WINDOWS_ENV_VENDOR='msys'
15728    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15729
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15731$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15732    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15733    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15734
15735  windows_path="$MSYS_ROOT_PATH"
15736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15737    unix_path=`$CYGPATH -u "$windows_path"`
15738    MSYS_ROOT_PATH="$unix_path"
15739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15741    MSYS_ROOT_PATH="$unix_path"
15742  fi
15743
15744    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15745$as_echo "$MSYS_ROOT_PATH" >&6; }
15746    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15747  else
15748    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15749  fi
15750
15751  # Test if windows or unix (cygwin/msys) find is first in path.
15752  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15753$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15754  FIND_BINARY_OUTPUT=`find --version 2>&1`
15755  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15757$as_echo "unix style" >&6; }
15758  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15760$as_echo "Windows" >&6; }
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15762$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15763    { $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
15764$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15765    as_fn_error $? "Cannot continue" "$LINENO" 5
15766  else
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15768$as_echo "unknown" >&6; }
15769    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15770$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15771  fi
15772
15773  else
15774    PATH_SEP=":"
15775  fi
15776
15777
15778  # We get the top-level directory from the supporting wrappers.
15779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15780$as_echo_n "checking for top-level directory... " >&6; }
15781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15782$as_echo "$TOPDIR" >&6; }
15783
15784
15785  # Save the original version of TOPDIR for string comparisons
15786  ORIGINAL_TOPDIR="$TOPDIR"
15787
15788
15789  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15790
15791  # Only process if variable expands to non-empty
15792
15793  if test "x$CURDIR" != x; then
15794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15795
15796  # Input might be given as Windows format, start by converting to
15797  # unix format.
15798  path="$CURDIR"
15799  new_path=`$CYGPATH -u "$path"`
15800
15801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15804  # "foo.exe" is OK but "foo" is an error.
15805  #
15806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15807  # It is also a way to make sure we got the proper file name for the real test later on.
15808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15809  if test "x$test_shortpath" = x; then
15810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15811$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15812    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15813  fi
15814
15815  # Call helper function which possibly converts this using DOS-style short mode.
15816  # If so, the updated path is stored in $new_path.
15817
15818  input_path="$new_path"
15819  # Check if we need to convert this using DOS-style short mode. If the path
15820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15821  # take no chances and rewrite it.
15822  # Note: m4 eats our [], so we need to use [ and ] instead.
15823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15824  if test "x$has_forbidden_chars" != x; then
15825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15829      # Going to short mode and back again did indeed matter. Since short mode is
15830      # case insensitive, let's make it lowercase to improve readability.
15831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15832      # Now convert it back to Unix-style (cygpath)
15833      input_path=`$CYGPATH -u "$shortmode_path"`
15834      new_path="$input_path"
15835    fi
15836  fi
15837
15838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15839  if test "x$test_cygdrive_prefix" = x; then
15840    # As a simple fix, exclude /usr/bin since it's not a real path.
15841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15843      # a path prefixed by /cygdrive for fixpath to work.
15844      new_path="$CYGWIN_ROOT_PATH$input_path"
15845    fi
15846  fi
15847
15848
15849  if test "x$path" != "x$new_path"; then
15850    CURDIR="$new_path"
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15852$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15853  fi
15854
15855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15856
15857  path="$CURDIR"
15858  has_colon=`$ECHO $path | $GREP ^.:`
15859  new_path="$path"
15860  if test "x$has_colon" = x; then
15861    # Not in mixed or Windows style, start by that.
15862    new_path=`cmd //c echo $path`
15863  fi
15864
15865
15866  input_path="$new_path"
15867  # Check if we need to convert this using DOS-style short mode. If the path
15868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15869  # take no chances and rewrite it.
15870  # Note: m4 eats our [], so we need to use [ and ] instead.
15871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15872  if test "x$has_forbidden_chars" != x; then
15873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15875  fi
15876
15877
15878  windows_path="$new_path"
15879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15880    unix_path=`$CYGPATH -u "$windows_path"`
15881    new_path="$unix_path"
15882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15884    new_path="$unix_path"
15885  fi
15886
15887  if test "x$path" != "x$new_path"; then
15888    CURDIR="$new_path"
15889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15890$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15891  fi
15892
15893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15895
15896    else
15897      # We're on a unix platform. Hooray! :)
15898      path="$CURDIR"
15899      has_space=`$ECHO "$path" | $GREP " "`
15900      if test "x$has_space" != x; then
15901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15902$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15904      fi
15905
15906      # Use eval to expand a potential ~
15907      eval path="$path"
15908      if test ! -f "$path" && test ! -d "$path"; then
15909        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15910      fi
15911
15912      if test -d "$path"; then
15913        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15914      else
15915        dir="`$DIRNAME "$path"`"
15916        base="`$BASENAME "$path"`"
15917        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15918      fi
15919    fi
15920  fi
15921
15922
15923  # Only process if variable expands to non-empty
15924
15925  if test "x$TOPDIR" != x; then
15926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15927
15928  # Input might be given as Windows format, start by converting to
15929  # unix format.
15930  path="$TOPDIR"
15931  new_path=`$CYGPATH -u "$path"`
15932
15933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15936  # "foo.exe" is OK but "foo" is an error.
15937  #
15938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15939  # It is also a way to make sure we got the proper file name for the real test later on.
15940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15941  if test "x$test_shortpath" = x; then
15942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15943$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15944    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15945  fi
15946
15947  # Call helper function which possibly converts this using DOS-style short mode.
15948  # If so, the updated path is stored in $new_path.
15949
15950  input_path="$new_path"
15951  # Check if we need to convert this using DOS-style short mode. If the path
15952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15953  # take no chances and rewrite it.
15954  # Note: m4 eats our [], so we need to use [ and ] instead.
15955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15956  if test "x$has_forbidden_chars" != x; then
15957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15961      # Going to short mode and back again did indeed matter. Since short mode is
15962      # case insensitive, let's make it lowercase to improve readability.
15963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15964      # Now convert it back to Unix-style (cygpath)
15965      input_path=`$CYGPATH -u "$shortmode_path"`
15966      new_path="$input_path"
15967    fi
15968  fi
15969
15970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15971  if test "x$test_cygdrive_prefix" = x; then
15972    # As a simple fix, exclude /usr/bin since it's not a real path.
15973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15975      # a path prefixed by /cygdrive for fixpath to work.
15976      new_path="$CYGWIN_ROOT_PATH$input_path"
15977    fi
15978  fi
15979
15980
15981  if test "x$path" != "x$new_path"; then
15982    TOPDIR="$new_path"
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15984$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15985  fi
15986
15987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15988
15989  path="$TOPDIR"
15990  has_colon=`$ECHO $path | $GREP ^.:`
15991  new_path="$path"
15992  if test "x$has_colon" = x; then
15993    # Not in mixed or Windows style, start by that.
15994    new_path=`cmd //c echo $path`
15995  fi
15996
15997
15998  input_path="$new_path"
15999  # Check if we need to convert this using DOS-style short mode. If the path
16000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16001  # take no chances and rewrite it.
16002  # Note: m4 eats our [], so we need to use [ and ] instead.
16003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16004  if test "x$has_forbidden_chars" != x; then
16005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16007  fi
16008
16009
16010  windows_path="$new_path"
16011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16012    unix_path=`$CYGPATH -u "$windows_path"`
16013    new_path="$unix_path"
16014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16016    new_path="$unix_path"
16017  fi
16018
16019  if test "x$path" != "x$new_path"; then
16020    TOPDIR="$new_path"
16021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16022$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16023  fi
16024
16025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16027
16028    else
16029      # We're on a unix platform. Hooray! :)
16030      path="$TOPDIR"
16031      has_space=`$ECHO "$path" | $GREP " "`
16032      if test "x$has_space" != x; then
16033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16034$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16036      fi
16037
16038      # Use eval to expand a potential ~
16039      eval path="$path"
16040      if test ! -f "$path" && test ! -d "$path"; then
16041        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16042      fi
16043
16044      if test -d "$path"; then
16045        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16046      else
16047        dir="`$DIRNAME "$path"`"
16048        base="`$BASENAME "$path"`"
16049        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16050      fi
16051    fi
16052  fi
16053
16054  # SRC_ROOT is a traditional alias for TOPDIR.
16055  SRC_ROOT=$TOPDIR
16056
16057  # Calculate a canonical version of TOPDIR for string comparisons
16058  CANONICAL_TOPDIR=$TOPDIR
16059
16060  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16061    # Follow a chain of symbolic links. Use readlink
16062    # where it exists, else fall back to horribly
16063    # complicated shell code.
16064    if test "x$READLINK_TESTED" != yes; then
16065      # On MacOSX there is a readlink tool with a different
16066      # purpose than the GNU readlink tool. Check the found readlink.
16067      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16068      if test "x$ISGNU" = x; then
16069        # A readlink that we do not know how to use.
16070        # Are there other non-GNU readlinks out there?
16071        READLINK_TESTED=yes
16072        READLINK=
16073      fi
16074    fi
16075
16076    if test "x$READLINK" != x; then
16077      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16078    else
16079      # Save the current directory for restoring afterwards
16080      STARTDIR=$PWD
16081      COUNTER=0
16082      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16083      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16084      cd $sym_link_dir
16085      # Use -P flag to resolve symlinks in directories.
16086      cd `$THEPWDCMD -P`
16087      sym_link_dir=`$THEPWDCMD -P`
16088      # Resolve file symlinks
16089      while test $COUNTER -lt 20; do
16090        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16091        if test "x$ISLINK" == x; then
16092          # This is not a symbolic link! We are done!
16093          break
16094        fi
16095        # Again resolve directory symlinks since the target of the just found
16096        # link could be in a different directory
16097        cd `$DIRNAME $ISLINK`
16098        sym_link_dir=`$THEPWDCMD -P`
16099        sym_link_file=`$BASENAME $ISLINK`
16100        let COUNTER=COUNTER+1
16101      done
16102      cd $STARTDIR
16103      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16104    fi
16105  fi
16106
16107
16108
16109  # Locate the directory of this script.
16110  AUTOCONF_DIR=$TOPDIR/common/autoconf
16111
16112  # Setup username (for use in adhoc version strings etc)
16113  # Outer [ ] to quote m4.
16114   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16115
16116
16117
16118# Check if it's a pure open build or if custom sources are to be used.
16119
16120  # Check whether --enable-openjdk-only was given.
16121if test "${enable_openjdk_only+set}" = set; then :
16122  enableval=$enable_openjdk_only;
16123else
16124  enable_openjdk_only="no"
16125fi
16126
16127
16128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16129$as_echo_n "checking for presence of closed sources... " >&6; }
16130  if test -d "$SRC_ROOT/jdk/src/closed"; then
16131    CLOSED_SOURCE_PRESENT=yes
16132  else
16133    CLOSED_SOURCE_PRESENT=no
16134  fi
16135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16136$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16137
16138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16139$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16140  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16142$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16143
16144  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16145    OPENJDK=true
16146    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16147      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16148$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16149    fi
16150  else
16151    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16152      OPENJDK=true
16153    else
16154      OPENJDK=false
16155    fi
16156  fi
16157
16158  if test "x$OPENJDK" = "xtrue"; then
16159    SET_OPENJDK="OPENJDK=true"
16160  fi
16161
16162
16163
16164  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16165  # the IncludeCustomExtension macro.
16166
16167
16168# Check whether --with-custom-make-dir was given.
16169if test "${with_custom_make_dir+set}" = set; then :
16170  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
16171$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16172fi
16173
16174
16175
16176
16177# These are needed to be able to create a configuration name (and thus the output directory)
16178
16179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16180$as_echo_n "checking which variant of the JDK to build... " >&6; }
16181
16182# Check whether --with-jdk-variant was given.
16183if test "${with_jdk_variant+set}" = set; then :
16184  withval=$with_jdk_variant;
16185fi
16186
16187
16188  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16189    JDK_VARIANT="normal"
16190  else
16191    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16192  fi
16193
16194
16195
16196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16197$as_echo "$JDK_VARIANT" >&6; }
16198
16199
16200  DEBUG_LEVEL="release"
16201  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16202$as_echo_n "checking which debug level to use... " >&6; }
16203  # Check whether --enable-debug was given.
16204if test "${enable_debug+set}" = set; then :
16205  enableval=$enable_debug;
16206        ENABLE_DEBUG="${enableval}"
16207        DEBUG_LEVEL="fastdebug"
16208
16209else
16210  ENABLE_DEBUG="no"
16211fi
16212
16213
16214
16215# Check whether --with-debug-level was given.
16216if test "${with_debug_level+set}" = set; then :
16217  withval=$with_debug_level;
16218        DEBUG_LEVEL="${withval}"
16219        if test "x$ENABLE_DEBUG" = xyes; then
16220          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16221        fi
16222
16223fi
16224
16225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16226$as_echo "$DEBUG_LEVEL" >&6; }
16227
16228  if test "x$DEBUG_LEVEL" != xrelease && \
16229      test "x$DEBUG_LEVEL" != xoptimized && \
16230      test "x$DEBUG_LEVEL" != xfastdebug && \
16231      test "x$DEBUG_LEVEL" != xslowdebug; then
16232    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16233  fi
16234
16235  # Translate DEBUG_LEVEL to debug level used by Hotspot
16236  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16237  if test "x$DEBUG_LEVEL" = xrelease; then
16238    HOTSPOT_DEBUG_LEVEL="product"
16239  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16240    HOTSPOT_DEBUG_LEVEL="debug"
16241  fi
16242
16243  if test "x$DEBUG_LEVEL" = xoptimized; then
16244    # The debug level 'optimized' is a little special because it is currently only
16245    # applicable to the HotSpot build where it means to build a completely
16246    # optimized version of the VM without any debugging code (like for the
16247    # 'release' debug level which is called 'product' in the HotSpot build) but
16248    # with the exception that it can contain additional code which is otherwise
16249    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16250    # test new and/or experimental features which are not intended for customer
16251    # shipment. Because these new features need to be tested and benchmarked in
16252    # real world scenarios, we want to build the containing JDK at the 'release'
16253    # debug level.
16254    DEBUG_LEVEL="release"
16255  fi
16256
16257
16258
16259
16260
16261
16262# Check whether --with-jvm-variants was given.
16263if test "${with_jvm_variants+set}" = set; then :
16264  withval=$with_jvm_variants;
16265fi
16266
16267
16268  if test "x$with_jvm_variants" = x; then
16269    with_jvm_variants="server"
16270  fi
16271  JVM_VARIANTS_OPT="$with_jvm_variants"
16272
16273  # Has the user listed more than one variant?
16274  # Additional [] needed to keep m4 from mangling shell constructs.
16275  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16276    BUILDING_MULTIPLE_JVM_VARIANTS=true
16277  else
16278    BUILDING_MULTIPLE_JVM_VARIANTS=false
16279  fi
16280  # Replace the commas with AND for use in the build directory name.
16281  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16282
16283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16284$as_echo_n "checking which variants of the JVM to build... " >&6; }
16285  # JVM_VARIANTS is a space-separated list.
16286  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16287  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16289$as_echo "$JVM_VARIANTS" >&6; }
16290
16291  # Check that the selected variants are valid
16292
16293  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16294  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16295  if test "x$INVALID_VARIANTS" != x; then
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16297$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16298    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16299  fi
16300
16301  # All "special" variants share the same output directory ("server")
16302  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16303  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16304  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16305    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16306  fi
16307
16308
16309
16310
16311  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16312    # zero behaves as a platform and rewrites these values. This is really weird. :(
16313    # We are guaranteed that we do not build any other variants when building zero.
16314    HOTSPOT_TARGET_CPU=zero
16315    HOTSPOT_TARGET_CPU_ARCH=zero
16316  fi
16317
16318
16319# With basic setup done, call the custom early hook.
16320
16321
16322# Check if we have devkits, extra paths or sysroot set.
16323
16324
16325# Check whether --with-devkit was given.
16326if test "${with_devkit+set}" = set; then :
16327  withval=$with_devkit;
16328
16329  # Only process if variable expands to non-empty
16330
16331  if test "x$with_devkit" != x; then
16332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16333
16334  # Input might be given as Windows format, start by converting to
16335  # unix format.
16336  path="$with_devkit"
16337  new_path=`$CYGPATH -u "$path"`
16338
16339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16342  # "foo.exe" is OK but "foo" is an error.
16343  #
16344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16345  # It is also a way to make sure we got the proper file name for the real test later on.
16346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16347  if test "x$test_shortpath" = x; then
16348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16349$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16350    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16351  fi
16352
16353  # Call helper function which possibly converts this using DOS-style short mode.
16354  # If so, the updated path is stored in $new_path.
16355
16356  input_path="$new_path"
16357  # Check if we need to convert this using DOS-style short mode. If the path
16358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16359  # take no chances and rewrite it.
16360  # Note: m4 eats our [], so we need to use [ and ] instead.
16361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16362  if test "x$has_forbidden_chars" != x; then
16363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16367      # Going to short mode and back again did indeed matter. Since short mode is
16368      # case insensitive, let's make it lowercase to improve readability.
16369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16370      # Now convert it back to Unix-style (cygpath)
16371      input_path=`$CYGPATH -u "$shortmode_path"`
16372      new_path="$input_path"
16373    fi
16374  fi
16375
16376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16377  if test "x$test_cygdrive_prefix" = x; then
16378    # As a simple fix, exclude /usr/bin since it's not a real path.
16379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16381      # a path prefixed by /cygdrive for fixpath to work.
16382      new_path="$CYGWIN_ROOT_PATH$input_path"
16383    fi
16384  fi
16385
16386
16387  if test "x$path" != "x$new_path"; then
16388    with_devkit="$new_path"
16389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16390$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16391  fi
16392
16393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16394
16395  path="$with_devkit"
16396  has_colon=`$ECHO $path | $GREP ^.:`
16397  new_path="$path"
16398  if test "x$has_colon" = x; then
16399    # Not in mixed or Windows style, start by that.
16400    new_path=`cmd //c echo $path`
16401  fi
16402
16403
16404  input_path="$new_path"
16405  # Check if we need to convert this using DOS-style short mode. If the path
16406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16407  # take no chances and rewrite it.
16408  # Note: m4 eats our [], so we need to use [ and ] instead.
16409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16410  if test "x$has_forbidden_chars" != x; then
16411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16413  fi
16414
16415
16416  windows_path="$new_path"
16417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16418    unix_path=`$CYGPATH -u "$windows_path"`
16419    new_path="$unix_path"
16420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16422    new_path="$unix_path"
16423  fi
16424
16425  if test "x$path" != "x$new_path"; then
16426    with_devkit="$new_path"
16427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16428$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16429  fi
16430
16431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16433
16434    else
16435      # We're on a unix platform. Hooray! :)
16436      path="$with_devkit"
16437      has_space=`$ECHO "$path" | $GREP " "`
16438      if test "x$has_space" != x; then
16439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16440$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16442      fi
16443
16444      # Use eval to expand a potential ~
16445      eval path="$path"
16446      if test ! -f "$path" && test ! -d "$path"; then
16447        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16448      fi
16449
16450      if test -d "$path"; then
16451        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16452      else
16453        dir="`$DIRNAME "$path"`"
16454        base="`$BASENAME "$path"`"
16455        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16456      fi
16457    fi
16458  fi
16459
16460        DEVKIT_ROOT="$with_devkit"
16461        # Check for a meta data info file in the root of the devkit
16462        if test -f "$DEVKIT_ROOT/devkit.info"; then
16463          . $DEVKIT_ROOT/devkit.info
16464          # This potentially sets the following:
16465          # A descriptive name of the devkit
16466
16467  if test "x$DEVKIT_NAME" = x; then
16468    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16469  fi
16470
16471          # Corresponds to --with-extra-path
16472
16473  if test "x$DEVKIT_EXTRA_PATH" = x; then
16474    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16475  fi
16476
16477          # Corresponds to --with-toolchain-path
16478
16479  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16480    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16481  fi
16482
16483          # Corresponds to --with-sysroot
16484
16485  if test "x$DEVKIT_SYSROOT" = x; then
16486    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16487  fi
16488
16489
16490          # Identifies the Visual Studio version in the devkit
16491
16492  if test "x$DEVKIT_VS_VERSION" = x; then
16493    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16494  fi
16495
16496          # The Visual Studio include environment variable
16497
16498  if test "x$DEVKIT_VS_INCLUDE" = x; then
16499    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16500  fi
16501
16502          # The Visual Studio lib environment variable
16503
16504  if test "x$DEVKIT_VS_LIB" = x; then
16505    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16506  fi
16507
16508          # Corresponds to --with-msvcr-dll
16509
16510  if test "x$DEVKIT_MSVCR_DLL" = x; then
16511    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16512  fi
16513
16514          # Corresponds to --with-msvcp-dll
16515
16516  if test "x$DEVKIT_MSVCP_DLL" = x; then
16517    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16518  fi
16519
16520        fi
16521
16522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16523$as_echo_n "checking for devkit... " >&6; }
16524        if test "x$DEVKIT_NAME" != x; then
16525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16526$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16527        else
16528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16529$as_echo "$DEVKIT_ROOT" >&6; }
16530        fi
16531
16532
16533  if test "x$DEVKIT_EXTRA_PATH" != x; then
16534    if test "x$EXTRA_PATH" = x; then
16535      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16536    else
16537      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16538    fi
16539  fi
16540
16541
16542        # Fallback default of just /bin if DEVKIT_PATH is not defined
16543        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16544          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16545        fi
16546
16547  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16548    if test "x$TOOLCHAIN_PATH" = x; then
16549      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16550    else
16551      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16552    fi
16553  fi
16554
16555
16556        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16557        # places for backwards compatiblity.
16558        if test "x$DEVKIT_SYSROOT" != x; then
16559          SYSROOT="$DEVKIT_SYSROOT"
16560        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16561          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16562        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16563          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16564        fi
16565
16566
16567fi
16568
16569
16570  # You can force the sysroot if the sysroot encoded into the compiler tools
16571  # is not correct.
16572
16573# Check whether --with-sys-root was given.
16574if test "${with_sys_root+set}" = set; then :
16575  withval=$with_sys_root; SYSROOT=$with_sys_root
16576
16577fi
16578
16579
16580
16581# Check whether --with-sysroot was given.
16582if test "${with_sysroot+set}" = set; then :
16583  withval=$with_sysroot; SYSROOT=$with_sysroot
16584
16585fi
16586
16587
16588
16589# Check whether --with-tools-dir was given.
16590if test "${with_tools_dir+set}" = set; then :
16591  withval=$with_tools_dir;
16592  if test "x$with_tools_dir" != x; then
16593    if test "x$TOOLCHAIN_PATH" = x; then
16594      TOOLCHAIN_PATH="$with_tools_dir"
16595    else
16596      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16597    fi
16598  fi
16599
16600
16601fi
16602
16603
16604
16605# Check whether --with-toolchain-path was given.
16606if test "${with_toolchain_path+set}" = set; then :
16607  withval=$with_toolchain_path;
16608  if test "x$with_toolchain_path" != x; then
16609    if test "x$TOOLCHAIN_PATH" = x; then
16610      TOOLCHAIN_PATH="$with_toolchain_path"
16611    else
16612      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16613    fi
16614  fi
16615
16616
16617fi
16618
16619
16620
16621# Check whether --with-extra-path was given.
16622if test "${with_extra_path+set}" = set; then :
16623  withval=$with_extra_path;
16624  if test "x$with_extra_path" != x; then
16625    if test "x$EXTRA_PATH" = x; then
16626      EXTRA_PATH="$with_extra_path"
16627    else
16628      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16629    fi
16630  fi
16631
16632
16633fi
16634
16635
16636  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16637    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16638    # If not, detect if Xcode is installed by running xcodebuild -version
16639    # if no Xcode installed, xcodebuild exits with 1
16640    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16641    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16642      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16643      # fall back on the stub binary in /usr/bin/xcodebuild
16644      # Extract the first word of "xcodebuild", so it can be a program name with args.
16645set dummy xcodebuild; ac_word=$2
16646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16647$as_echo_n "checking for $ac_word... " >&6; }
16648if ${ac_cv_path_XCODEBUILD+:} false; then :
16649  $as_echo_n "(cached) " >&6
16650else
16651  case $XCODEBUILD in
16652  [\\/]* | ?:[\\/]*)
16653  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16654  ;;
16655  *)
16656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16657for as_dir in $TOOLCHAIN_PATH
16658do
16659  IFS=$as_save_IFS
16660  test -z "$as_dir" && as_dir=.
16661    for ac_exec_ext in '' $ac_executable_extensions; do
16662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16663    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16665    break 2
16666  fi
16667done
16668  done
16669IFS=$as_save_IFS
16670
16671  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16672  ;;
16673esac
16674fi
16675XCODEBUILD=$ac_cv_path_XCODEBUILD
16676if test -n "$XCODEBUILD"; then
16677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16678$as_echo "$XCODEBUILD" >&6; }
16679else
16680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16681$as_echo "no" >&6; }
16682fi
16683
16684
16685    else
16686      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16687      # when only the command line tools are installed there are no SDKs, so headers
16688      # are copied into the system frameworks
16689      XCODEBUILD=
16690
16691    fi
16692
16693    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16694$as_echo_n "checking for sdk name... " >&6; }
16695
16696# Check whether --with-sdk-name was given.
16697if test "${with_sdk_name+set}" = set; then :
16698  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16699
16700fi
16701
16702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16703$as_echo "$SDKNAME" >&6; }
16704
16705    # if toolchain path is specified then don't rely on system headers, they may not compile
16706    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16707    test -z "$TOOLCHAIN_PATH" && \
16708      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16709
16710    if test -z "$SYSROOT"; then
16711      if test -n "$XCODEBUILD"; then
16712        # if we don't have system headers, use default SDK name (last resort)
16713        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16714          SDKNAME=${SDKNAME:-macosx}
16715        fi
16716
16717        if test -n "$SDKNAME"; then
16718          # Call xcodebuild to determine SYSROOT
16719          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16720        fi
16721      else
16722        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16723          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
16724        fi
16725      fi
16726    else
16727      # warn user if --with-sdk-name was also set
16728      if test -n "$with_sdk_name"; then
16729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16730$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16731      fi
16732    fi
16733
16734    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16735      # If no system framework headers, then SYSROOT must be set, or we won't build
16736      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
16737    fi
16738
16739    # Perform a basic sanity test
16740    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16741      if test -z "$SYSROOT"; then
16742        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
16743      else
16744        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16745      fi
16746    fi
16747
16748    # set SDKROOT too, Xcode tools will pick it up
16749    SDKROOT=$SYSROOT
16750
16751  fi
16752
16753  # Prepend the extra path to the global path
16754
16755  if test "x$EXTRA_PATH" != x; then
16756    if test "x$PATH" = x; then
16757      PATH="$EXTRA_PATH"
16758    else
16759      PATH="$EXTRA_PATH:$PATH"
16760    fi
16761  fi
16762
16763
16764  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16765    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16766    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16767  fi
16768
16769  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16770$as_echo_n "checking for sysroot... " >&6; }
16771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16772$as_echo "$SYSROOT" >&6; }
16773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16774$as_echo_n "checking for toolchain path... " >&6; }
16775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16776$as_echo "$TOOLCHAIN_PATH" >&6; }
16777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16778$as_echo_n "checking for extra path... " >&6; }
16779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16780$as_echo "$EXTRA_PATH" >&6; }
16781
16782
16783# To properly create a configuration name, we need to have the OpenJDK target
16784# and options (variants and debug level) parsed.
16785
16786
16787
16788# Check whether --with-conf-name was given.
16789if test "${with_conf_name+set}" = set; then :
16790  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16791fi
16792
16793
16794  # Test from where we are running configure, in or outside of src root.
16795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16796$as_echo_n "checking where to store configuration... " >&6; }
16797  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16798      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16799      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16800    # We are running configure from the src root.
16801    # Create a default ./build/target-variant-debuglevel output root.
16802    if test "x${CONF_NAME}" = x; then
16803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16804$as_echo "in default location" >&6; }
16805      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16806    else
16807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16808$as_echo "in build directory with custom name" >&6; }
16809    fi
16810    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16811    $MKDIR -p "$OUTPUT_ROOT"
16812    if test ! -d "$OUTPUT_ROOT"; then
16813      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16814    fi
16815  else
16816    # We are running configure from outside of the src dir.
16817    # Then use the current directory as output dir!
16818    # If configuration is situated in normal build directory, just use the build
16819    # directory name as configuration name, otherwise use the complete path.
16820    if test "x${CONF_NAME}" = x; then
16821      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16822    fi
16823    OUTPUT_ROOT="$CURDIR"
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16825$as_echo "in current directory" >&6; }
16826
16827    # WARNING: This might be a bad thing to do. You need to be sure you want to
16828    # have a configuration in this directory. Do some sanity checks!
16829
16830    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16831      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16832      # other files
16833      files_present=`$LS $OUTPUT_ROOT`
16834      # Configure has already touched config.log and confdefs.h in the current dir when this check
16835      # is performed.
16836      filtered_files=`$ECHO "$files_present" \
16837          | $SED -e 's/config.log//g' \
16838              -e 's/configure.log//g' \
16839              -e 's/confdefs.h//g' \
16840              -e 's/ //g' \
16841          | $TR -d '\n'`
16842      if test "x$filtered_files" != x; then
16843        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16844$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16845        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16846$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16847        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16848$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16849        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16850$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16851        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16852$as_echo "$as_me: seriously mess up just about everything." >&6;}
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16854$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16855        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16856$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16857        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16858      fi
16859    fi
16860  fi
16861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16862$as_echo_n "checking what configuration name to use... " >&6; }
16863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16864$as_echo "$CONF_NAME" >&6; }
16865
16866
16867  # Only process if variable expands to non-empty
16868
16869  if test "x$OUTPUT_ROOT" != x; then
16870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16871
16872  # Input might be given as Windows format, start by converting to
16873  # unix format.
16874  path="$OUTPUT_ROOT"
16875  new_path=`$CYGPATH -u "$path"`
16876
16877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16880  # "foo.exe" is OK but "foo" is an error.
16881  #
16882  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16883  # It is also a way to make sure we got the proper file name for the real test later on.
16884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16885  if test "x$test_shortpath" = x; then
16886    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16887$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16888    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16889  fi
16890
16891  # Call helper function which possibly converts this using DOS-style short mode.
16892  # If so, the updated path is stored in $new_path.
16893
16894  input_path="$new_path"
16895  # Check if we need to convert this using DOS-style short mode. If the path
16896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16897  # take no chances and rewrite it.
16898  # Note: m4 eats our [], so we need to use [ and ] instead.
16899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16900  if test "x$has_forbidden_chars" != x; then
16901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16902    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16903    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16904    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16905      # Going to short mode and back again did indeed matter. Since short mode is
16906      # case insensitive, let's make it lowercase to improve readability.
16907      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16908      # Now convert it back to Unix-style (cygpath)
16909      input_path=`$CYGPATH -u "$shortmode_path"`
16910      new_path="$input_path"
16911    fi
16912  fi
16913
16914  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16915  if test "x$test_cygdrive_prefix" = x; then
16916    # As a simple fix, exclude /usr/bin since it's not a real path.
16917    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16918      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16919      # a path prefixed by /cygdrive for fixpath to work.
16920      new_path="$CYGWIN_ROOT_PATH$input_path"
16921    fi
16922  fi
16923
16924
16925  if test "x$path" != "x$new_path"; then
16926    OUTPUT_ROOT="$new_path"
16927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16928$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16929  fi
16930
16931    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16932
16933  path="$OUTPUT_ROOT"
16934  has_colon=`$ECHO $path | $GREP ^.:`
16935  new_path="$path"
16936  if test "x$has_colon" = x; then
16937    # Not in mixed or Windows style, start by that.
16938    new_path=`cmd //c echo $path`
16939  fi
16940
16941
16942  input_path="$new_path"
16943  # Check if we need to convert this using DOS-style short mode. If the path
16944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16945  # take no chances and rewrite it.
16946  # Note: m4 eats our [], so we need to use [ and ] instead.
16947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16948  if test "x$has_forbidden_chars" != x; then
16949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16951  fi
16952
16953
16954  windows_path="$new_path"
16955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16956    unix_path=`$CYGPATH -u "$windows_path"`
16957    new_path="$unix_path"
16958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16960    new_path="$unix_path"
16961  fi
16962
16963  if test "x$path" != "x$new_path"; then
16964    OUTPUT_ROOT="$new_path"
16965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16966$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16967  fi
16968
16969  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16970  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16971
16972    else
16973      # We're on a unix platform. Hooray! :)
16974      path="$OUTPUT_ROOT"
16975      has_space=`$ECHO "$path" | $GREP " "`
16976      if test "x$has_space" != x; then
16977        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16978$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16979        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16980      fi
16981
16982      # Use eval to expand a potential ~
16983      eval path="$path"
16984      if test ! -f "$path" && test ! -d "$path"; then
16985        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16986      fi
16987
16988      if test -d "$path"; then
16989        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16990      else
16991        dir="`$DIRNAME "$path"`"
16992        base="`$BASENAME "$path"`"
16993        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16994      fi
16995    fi
16996  fi
16997
16998
16999  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17000  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17001
17002  SPEC=$OUTPUT_ROOT/spec.gmk
17003
17004  CONF_NAME=$CONF_NAME
17005
17006  OUTPUT_ROOT=$OUTPUT_ROOT
17007
17008
17009
17010  # The spec.gmk file contains all variables for the make system.
17011  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17012
17013  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17014  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17015
17016  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17017  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17018
17019  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17020  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17021
17022  # The compare.sh is used to compare the build output to other builds.
17023  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17024
17025  # The generated Makefile knows where the spec.gmk is and where the source is.
17026  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17027  # which will look for generated configurations
17028  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17029
17030
17031
17032# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17033
17034  for ac_prog in apt-get yum port pkgutil pkgadd
17035do
17036  # Extract the first word of "$ac_prog", so it can be a program name with args.
17037set dummy $ac_prog; ac_word=$2
17038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17039$as_echo_n "checking for $ac_word... " >&6; }
17040if ${ac_cv_prog_PKGHANDLER+:} false; then :
17041  $as_echo_n "(cached) " >&6
17042else
17043  if test -n "$PKGHANDLER"; then
17044  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17045else
17046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17047for as_dir in $PATH
17048do
17049  IFS=$as_save_IFS
17050  test -z "$as_dir" && as_dir=.
17051    for ac_exec_ext in '' $ac_executable_extensions; do
17052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17053    ac_cv_prog_PKGHANDLER="$ac_prog"
17054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17055    break 2
17056  fi
17057done
17058  done
17059IFS=$as_save_IFS
17060
17061fi
17062fi
17063PKGHANDLER=$ac_cv_prog_PKGHANDLER
17064if test -n "$PKGHANDLER"; then
17065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17066$as_echo "$PKGHANDLER" >&6; }
17067else
17068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17069$as_echo "no" >&6; }
17070fi
17071
17072
17073  test -n "$PKGHANDLER" && break
17074done
17075
17076
17077
17078# Setup tools that requires more complex handling, or that is not needed by the configure script.
17079
17080
17081
17082  # Publish this variable in the help.
17083
17084
17085  if [ -z "${MAKE+x}" ]; then
17086    # The variable is not set by user, try to locate tool using the code snippet
17087
17088    # Try our hardest to locate a correct version of GNU make
17089    for ac_prog in gmake
17090do
17091  # Extract the first word of "$ac_prog", so it can be a program name with args.
17092set dummy $ac_prog; ac_word=$2
17093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17094$as_echo_n "checking for $ac_word... " >&6; }
17095if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17096  $as_echo_n "(cached) " >&6
17097else
17098  case $CHECK_GMAKE in
17099  [\\/]* | ?:[\\/]*)
17100  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17101  ;;
17102  *)
17103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17104for as_dir in $PATH
17105do
17106  IFS=$as_save_IFS
17107  test -z "$as_dir" && as_dir=.
17108    for ac_exec_ext in '' $ac_executable_extensions; do
17109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17110    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17112    break 2
17113  fi
17114done
17115  done
17116IFS=$as_save_IFS
17117
17118  ;;
17119esac
17120fi
17121CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17122if test -n "$CHECK_GMAKE"; then
17123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17124$as_echo "$CHECK_GMAKE" >&6; }
17125else
17126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17127$as_echo "no" >&6; }
17128fi
17129
17130
17131  test -n "$CHECK_GMAKE" && break
17132done
17133
17134
17135  MAKE_CANDIDATE=""$CHECK_GMAKE""
17136  DESCRIPTION="gmake in PATH"
17137
17138  # On Cygwin, we require a newer version of make than on other platforms
17139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140    MAKE_VERSION_EXPR="-e 4\."
17141    MAKE_REQUIRED_VERSION="4.0"
17142   else
17143    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17144    MAKE_REQUIRED_VERSION="3.81"
17145  fi
17146
17147  if test "x$MAKE_CANDIDATE" != x; then
17148    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17149$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17150    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17151    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17152    if test "x$IS_GNU_MAKE" = x; then
17153      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17154$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17155    else
17156      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17157      if test "x$IS_MODERN_MAKE" = x; then
17158        { $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
17159$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;}
17160      else
17161        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17162          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17163            MAKE_EXPECTED_ENV='cygwin'
17164          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165            MAKE_EXPECTED_ENV='msys'
17166          else
17167            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17168          fi
17169          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17170          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17171        else
17172          # Not relevant for non-Windows
17173          IS_MAKE_CORRECT_ENV=true
17174        fi
17175        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17176          { $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
17177$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;}
17178        else
17179          FOUND_MAKE=$MAKE_CANDIDATE
17180
17181  # Only process if variable expands to non-empty
17182
17183  if test "x$FOUND_MAKE" != x; then
17184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17185
17186  # First separate the path from the arguments. This will split at the first
17187  # space.
17188  complete="$FOUND_MAKE"
17189  path="${complete%% *}"
17190  tmp="$complete EOL"
17191  arguments="${tmp#* }"
17192
17193  # Input might be given as Windows format, start by converting to
17194  # unix format.
17195  new_path=`$CYGPATH -u "$path"`
17196
17197  # Now try to locate executable using which
17198  new_path=`$WHICH "$new_path" 2> /dev/null`
17199  # bat and cmd files are not always considered executable in cygwin causing which
17200  # to not find them
17201  if test "x$new_path" = x \
17202      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17203      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17204    new_path=`$CYGPATH -u "$path"`
17205  fi
17206  if test "x$new_path" = x; then
17207    # Oops. Which didn't find the executable.
17208    # The splitting of arguments from the executable at a space might have been incorrect,
17209    # since paths with space are more likely in Windows. Give it another try with the whole
17210    # argument.
17211    path="$complete"
17212    arguments="EOL"
17213    new_path=`$CYGPATH -u "$path"`
17214    new_path=`$WHICH "$new_path" 2> /dev/null`
17215    # bat and cmd files are not always considered executable in cygwin causing which
17216    # to not find them
17217    if test "x$new_path" = x \
17218        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17219        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17220      new_path=`$CYGPATH -u "$path"`
17221    fi
17222    if test "x$new_path" = x; then
17223      # It's still not found. Now this is an unrecoverable error.
17224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17225$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17226      has_space=`$ECHO "$complete" | $GREP " "`
17227      if test "x$has_space" != x; then
17228        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17229$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17230      fi
17231      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17232    fi
17233  fi
17234
17235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17238  # "foo.exe" is OK but "foo" is an error.
17239  #
17240  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17241  # It is also a way to make sure we got the proper file name for the real test later on.
17242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17243  if test "x$test_shortpath" = x; then
17244    # Short path failed, file does not exist as specified.
17245    # Try adding .exe or .cmd
17246    if test -f "${new_path}.exe"; then
17247      input_to_shortpath="${new_path}.exe"
17248    elif test -f "${new_path}.cmd"; then
17249      input_to_shortpath="${new_path}.cmd"
17250    else
17251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17252$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17253      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17254$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17255      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17256    fi
17257  else
17258    input_to_shortpath="$new_path"
17259  fi
17260
17261  # Call helper function which possibly converts this using DOS-style short mode.
17262  # If so, the updated path is stored in $new_path.
17263  new_path="$input_to_shortpath"
17264
17265  input_path="$input_to_shortpath"
17266  # Check if we need to convert this using DOS-style short mode. If the path
17267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17268  # take no chances and rewrite it.
17269  # Note: m4 eats our [], so we need to use [ and ] instead.
17270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17271  if test "x$has_forbidden_chars" != x; then
17272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17276      # Going to short mode and back again did indeed matter. Since short mode is
17277      # case insensitive, let's make it lowercase to improve readability.
17278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17279      # Now convert it back to Unix-style (cygpath)
17280      input_path=`$CYGPATH -u "$shortmode_path"`
17281      new_path="$input_path"
17282    fi
17283  fi
17284
17285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17286  if test "x$test_cygdrive_prefix" = x; then
17287    # As a simple fix, exclude /usr/bin since it's not a real path.
17288    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17290      # a path prefixed by /cygdrive for fixpath to work.
17291      new_path="$CYGWIN_ROOT_PATH$input_path"
17292    fi
17293  fi
17294
17295  # remove trailing .exe if any
17296  new_path="${new_path/%.exe/}"
17297
17298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17299
17300  # First separate the path from the arguments. This will split at the first
17301  # space.
17302  complete="$FOUND_MAKE"
17303  path="${complete%% *}"
17304  tmp="$complete EOL"
17305  arguments="${tmp#* }"
17306
17307  # Input might be given as Windows format, start by converting to
17308  # unix format.
17309  new_path="$path"
17310
17311  windows_path="$new_path"
17312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17313    unix_path=`$CYGPATH -u "$windows_path"`
17314    new_path="$unix_path"
17315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17317    new_path="$unix_path"
17318  fi
17319
17320
17321  # Now try to locate executable using which
17322  new_path=`$WHICH "$new_path" 2> /dev/null`
17323
17324  if test "x$new_path" = x; then
17325    # Oops. Which didn't find the executable.
17326    # The splitting of arguments from the executable at a space might have been incorrect,
17327    # since paths with space are more likely in Windows. Give it another try with the whole
17328    # argument.
17329    path="$complete"
17330    arguments="EOL"
17331    new_path="$path"
17332
17333  windows_path="$new_path"
17334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17335    unix_path=`$CYGPATH -u "$windows_path"`
17336    new_path="$unix_path"
17337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17339    new_path="$unix_path"
17340  fi
17341
17342
17343    new_path=`$WHICH "$new_path" 2> /dev/null`
17344    # bat and cmd files are not always considered executable in MSYS causing which
17345    # to not find them
17346    if test "x$new_path" = x \
17347        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17348        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17349      new_path="$path"
17350
17351  windows_path="$new_path"
17352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17353    unix_path=`$CYGPATH -u "$windows_path"`
17354    new_path="$unix_path"
17355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17357    new_path="$unix_path"
17358  fi
17359
17360    fi
17361
17362    if test "x$new_path" = x; then
17363      # It's still not found. Now this is an unrecoverable error.
17364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17366      has_space=`$ECHO "$complete" | $GREP " "`
17367      if test "x$has_space" != x; then
17368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17370      fi
17371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17372    fi
17373  fi
17374
17375  # Now new_path has a complete unix path to the binary
17376  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17377    # Keep paths in /bin as-is, but remove trailing .exe if any
17378    new_path="${new_path/%.exe/}"
17379    # Do not save /bin paths to all_fixpath_prefixes!
17380  else
17381    # Not in mixed or Windows style, start by that.
17382    new_path=`cmd //c echo $new_path`
17383
17384  input_path="$new_path"
17385  # Check if we need to convert this using DOS-style short mode. If the path
17386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17387  # take no chances and rewrite it.
17388  # Note: m4 eats our [], so we need to use [ and ] instead.
17389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17390  if test "x$has_forbidden_chars" != x; then
17391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17393  fi
17394
17395    # Output is in $new_path
17396
17397  windows_path="$new_path"
17398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17399    unix_path=`$CYGPATH -u "$windows_path"`
17400    new_path="$unix_path"
17401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17403    new_path="$unix_path"
17404  fi
17405
17406    # remove trailing .exe if any
17407    new_path="${new_path/%.exe/}"
17408
17409    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17410    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17411  fi
17412
17413    else
17414      # We're on a unix platform. Hooray! :)
17415      # First separate the path from the arguments. This will split at the first
17416      # space.
17417      complete="$FOUND_MAKE"
17418      path="${complete%% *}"
17419      tmp="$complete EOL"
17420      arguments="${tmp#* }"
17421
17422      # Cannot rely on the command "which" here since it doesn't always work.
17423      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17424      if test -z "$is_absolute_path"; then
17425        # Path to executable is not absolute. Find it.
17426        IFS_save="$IFS"
17427        IFS=:
17428        for p in $PATH; do
17429          if test -f "$p/$path" && test -x "$p/$path"; then
17430            new_path="$p/$path"
17431            break
17432          fi
17433        done
17434        IFS="$IFS_save"
17435      else
17436        # This is an absolute path, we can use it without further modifications.
17437        new_path="$path"
17438      fi
17439
17440      if test "x$new_path" = x; then
17441        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17443        has_space=`$ECHO "$complete" | $GREP " "`
17444        if test "x$has_space" != x; then
17445          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17446$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17447        fi
17448        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17449      fi
17450    fi
17451
17452    # Now join together the path and the arguments once again
17453    if test "x$arguments" != xEOL; then
17454      new_complete="$new_path ${arguments% *}"
17455    else
17456      new_complete="$new_path"
17457    fi
17458
17459    if test "x$complete" != "x$new_complete"; then
17460      FOUND_MAKE="$new_complete"
17461      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17462$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17463    fi
17464  fi
17465
17466        fi
17467      fi
17468    fi
17469  fi
17470
17471
17472    if test "x$FOUND_MAKE" = x; then
17473      for ac_prog in make
17474do
17475  # Extract the first word of "$ac_prog", so it can be a program name with args.
17476set dummy $ac_prog; ac_word=$2
17477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17478$as_echo_n "checking for $ac_word... " >&6; }
17479if ${ac_cv_path_CHECK_MAKE+:} false; then :
17480  $as_echo_n "(cached) " >&6
17481else
17482  case $CHECK_MAKE in
17483  [\\/]* | ?:[\\/]*)
17484  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17485  ;;
17486  *)
17487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17488for as_dir in $PATH
17489do
17490  IFS=$as_save_IFS
17491  test -z "$as_dir" && as_dir=.
17492    for ac_exec_ext in '' $ac_executable_extensions; do
17493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17494    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17496    break 2
17497  fi
17498done
17499  done
17500IFS=$as_save_IFS
17501
17502  ;;
17503esac
17504fi
17505CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17506if test -n "$CHECK_MAKE"; then
17507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17508$as_echo "$CHECK_MAKE" >&6; }
17509else
17510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17511$as_echo "no" >&6; }
17512fi
17513
17514
17515  test -n "$CHECK_MAKE" && break
17516done
17517
17518
17519  MAKE_CANDIDATE=""$CHECK_MAKE""
17520  DESCRIPTION="make in PATH"
17521
17522  # On Cygwin, we require a newer version of make than on other platforms
17523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17524    MAKE_VERSION_EXPR="-e 4\."
17525    MAKE_REQUIRED_VERSION="4.0"
17526   else
17527    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17528    MAKE_REQUIRED_VERSION="3.81"
17529  fi
17530
17531  if test "x$MAKE_CANDIDATE" != x; then
17532    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17533$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17534    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17535    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17536    if test "x$IS_GNU_MAKE" = x; then
17537      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17538$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17539    else
17540      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17541      if test "x$IS_MODERN_MAKE" = x; then
17542        { $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
17543$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;}
17544      else
17545        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17546          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17547            MAKE_EXPECTED_ENV='cygwin'
17548          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17549            MAKE_EXPECTED_ENV='msys'
17550          else
17551            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17552          fi
17553          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17554          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17555        else
17556          # Not relevant for non-Windows
17557          IS_MAKE_CORRECT_ENV=true
17558        fi
17559        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17560          { $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
17561$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;}
17562        else
17563          FOUND_MAKE=$MAKE_CANDIDATE
17564
17565  # Only process if variable expands to non-empty
17566
17567  if test "x$FOUND_MAKE" != x; then
17568    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17569
17570  # First separate the path from the arguments. This will split at the first
17571  # space.
17572  complete="$FOUND_MAKE"
17573  path="${complete%% *}"
17574  tmp="$complete EOL"
17575  arguments="${tmp#* }"
17576
17577  # Input might be given as Windows format, start by converting to
17578  # unix format.
17579  new_path=`$CYGPATH -u "$path"`
17580
17581  # Now try to locate executable using which
17582  new_path=`$WHICH "$new_path" 2> /dev/null`
17583  # bat and cmd files are not always considered executable in cygwin causing which
17584  # to not find them
17585  if test "x$new_path" = x \
17586      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17587      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17588    new_path=`$CYGPATH -u "$path"`
17589  fi
17590  if test "x$new_path" = x; then
17591    # Oops. Which didn't find the executable.
17592    # The splitting of arguments from the executable at a space might have been incorrect,
17593    # since paths with space are more likely in Windows. Give it another try with the whole
17594    # argument.
17595    path="$complete"
17596    arguments="EOL"
17597    new_path=`$CYGPATH -u "$path"`
17598    new_path=`$WHICH "$new_path" 2> /dev/null`
17599    # bat and cmd files are not always considered executable in cygwin causing which
17600    # to not find them
17601    if test "x$new_path" = x \
17602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17604      new_path=`$CYGPATH -u "$path"`
17605    fi
17606    if test "x$new_path" = x; then
17607      # It's still not found. Now this is an unrecoverable error.
17608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17609$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17610      has_space=`$ECHO "$complete" | $GREP " "`
17611      if test "x$has_space" != x; then
17612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17614      fi
17615      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17616    fi
17617  fi
17618
17619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17622  # "foo.exe" is OK but "foo" is an error.
17623  #
17624  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17625  # It is also a way to make sure we got the proper file name for the real test later on.
17626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17627  if test "x$test_shortpath" = x; then
17628    # Short path failed, file does not exist as specified.
17629    # Try adding .exe or .cmd
17630    if test -f "${new_path}.exe"; then
17631      input_to_shortpath="${new_path}.exe"
17632    elif test -f "${new_path}.cmd"; then
17633      input_to_shortpath="${new_path}.cmd"
17634    else
17635      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17636$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17637      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17638$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17639      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17640    fi
17641  else
17642    input_to_shortpath="$new_path"
17643  fi
17644
17645  # Call helper function which possibly converts this using DOS-style short mode.
17646  # If so, the updated path is stored in $new_path.
17647  new_path="$input_to_shortpath"
17648
17649  input_path="$input_to_shortpath"
17650  # Check if we need to convert this using DOS-style short mode. If the path
17651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17652  # take no chances and rewrite it.
17653  # Note: m4 eats our [], so we need to use [ and ] instead.
17654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17655  if test "x$has_forbidden_chars" != x; then
17656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17657    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17658    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17659    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17660      # Going to short mode and back again did indeed matter. Since short mode is
17661      # case insensitive, let's make it lowercase to improve readability.
17662      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17663      # Now convert it back to Unix-style (cygpath)
17664      input_path=`$CYGPATH -u "$shortmode_path"`
17665      new_path="$input_path"
17666    fi
17667  fi
17668
17669  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17670  if test "x$test_cygdrive_prefix" = x; then
17671    # As a simple fix, exclude /usr/bin since it's not a real path.
17672    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17673      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17674      # a path prefixed by /cygdrive for fixpath to work.
17675      new_path="$CYGWIN_ROOT_PATH$input_path"
17676    fi
17677  fi
17678
17679  # remove trailing .exe if any
17680  new_path="${new_path/%.exe/}"
17681
17682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17683
17684  # First separate the path from the arguments. This will split at the first
17685  # space.
17686  complete="$FOUND_MAKE"
17687  path="${complete%% *}"
17688  tmp="$complete EOL"
17689  arguments="${tmp#* }"
17690
17691  # Input might be given as Windows format, start by converting to
17692  # unix format.
17693  new_path="$path"
17694
17695  windows_path="$new_path"
17696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17697    unix_path=`$CYGPATH -u "$windows_path"`
17698    new_path="$unix_path"
17699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17701    new_path="$unix_path"
17702  fi
17703
17704
17705  # Now try to locate executable using which
17706  new_path=`$WHICH "$new_path" 2> /dev/null`
17707
17708  if test "x$new_path" = x; then
17709    # Oops. Which didn't find the executable.
17710    # The splitting of arguments from the executable at a space might have been incorrect,
17711    # since paths with space are more likely in Windows. Give it another try with the whole
17712    # argument.
17713    path="$complete"
17714    arguments="EOL"
17715    new_path="$path"
17716
17717  windows_path="$new_path"
17718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17719    unix_path=`$CYGPATH -u "$windows_path"`
17720    new_path="$unix_path"
17721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17723    new_path="$unix_path"
17724  fi
17725
17726
17727    new_path=`$WHICH "$new_path" 2> /dev/null`
17728    # bat and cmd files are not always considered executable in MSYS causing which
17729    # to not find them
17730    if test "x$new_path" = x \
17731        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17732        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17733      new_path="$path"
17734
17735  windows_path="$new_path"
17736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17737    unix_path=`$CYGPATH -u "$windows_path"`
17738    new_path="$unix_path"
17739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17741    new_path="$unix_path"
17742  fi
17743
17744    fi
17745
17746    if test "x$new_path" = x; then
17747      # It's still not found. Now this is an unrecoverable error.
17748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17749$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17750      has_space=`$ECHO "$complete" | $GREP " "`
17751      if test "x$has_space" != x; then
17752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17754      fi
17755      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17756    fi
17757  fi
17758
17759  # Now new_path has a complete unix path to the binary
17760  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17761    # Keep paths in /bin as-is, but remove trailing .exe if any
17762    new_path="${new_path/%.exe/}"
17763    # Do not save /bin paths to all_fixpath_prefixes!
17764  else
17765    # Not in mixed or Windows style, start by that.
17766    new_path=`cmd //c echo $new_path`
17767
17768  input_path="$new_path"
17769  # Check if we need to convert this using DOS-style short mode. If the path
17770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17771  # take no chances and rewrite it.
17772  # Note: m4 eats our [], so we need to use [ and ] instead.
17773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17774  if test "x$has_forbidden_chars" != x; then
17775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17777  fi
17778
17779    # Output is in $new_path
17780
17781  windows_path="$new_path"
17782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17783    unix_path=`$CYGPATH -u "$windows_path"`
17784    new_path="$unix_path"
17785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17787    new_path="$unix_path"
17788  fi
17789
17790    # remove trailing .exe if any
17791    new_path="${new_path/%.exe/}"
17792
17793    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17794    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17795  fi
17796
17797    else
17798      # We're on a unix platform. Hooray! :)
17799      # First separate the path from the arguments. This will split at the first
17800      # space.
17801      complete="$FOUND_MAKE"
17802      path="${complete%% *}"
17803      tmp="$complete EOL"
17804      arguments="${tmp#* }"
17805
17806      # Cannot rely on the command "which" here since it doesn't always work.
17807      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17808      if test -z "$is_absolute_path"; then
17809        # Path to executable is not absolute. Find it.
17810        IFS_save="$IFS"
17811        IFS=:
17812        for p in $PATH; do
17813          if test -f "$p/$path" && test -x "$p/$path"; then
17814            new_path="$p/$path"
17815            break
17816          fi
17817        done
17818        IFS="$IFS_save"
17819      else
17820        # This is an absolute path, we can use it without further modifications.
17821        new_path="$path"
17822      fi
17823
17824      if test "x$new_path" = x; then
17825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17826$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17827        has_space=`$ECHO "$complete" | $GREP " "`
17828        if test "x$has_space" != x; then
17829          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17830$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17831        fi
17832        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17833      fi
17834    fi
17835
17836    # Now join together the path and the arguments once again
17837    if test "x$arguments" != xEOL; then
17838      new_complete="$new_path ${arguments% *}"
17839    else
17840      new_complete="$new_path"
17841    fi
17842
17843    if test "x$complete" != "x$new_complete"; then
17844      FOUND_MAKE="$new_complete"
17845      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17846$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17847    fi
17848  fi
17849
17850        fi
17851      fi
17852    fi
17853  fi
17854
17855    fi
17856
17857    if test "x$FOUND_MAKE" = x; then
17858      if test "x$TOOLCHAIN_PATH" != x; then
17859        # We have a toolchain path, check that as well before giving up.
17860        OLD_PATH=$PATH
17861        PATH=$TOOLCHAIN_PATH:$PATH
17862        for ac_prog in gmake
17863do
17864  # Extract the first word of "$ac_prog", so it can be a program name with args.
17865set dummy $ac_prog; ac_word=$2
17866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17867$as_echo_n "checking for $ac_word... " >&6; }
17868if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17869  $as_echo_n "(cached) " >&6
17870else
17871  case $CHECK_TOOLSDIR_GMAKE in
17872  [\\/]* | ?:[\\/]*)
17873  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17874  ;;
17875  *)
17876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17877for as_dir in $PATH
17878do
17879  IFS=$as_save_IFS
17880  test -z "$as_dir" && as_dir=.
17881    for ac_exec_ext in '' $ac_executable_extensions; do
17882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17883    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17885    break 2
17886  fi
17887done
17888  done
17889IFS=$as_save_IFS
17890
17891  ;;
17892esac
17893fi
17894CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17895if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17897$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17898else
17899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17900$as_echo "no" >&6; }
17901fi
17902
17903
17904  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17905done
17906
17907
17908  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17909  DESCRIPTION="gmake in tools-dir"
17910
17911  # On Cygwin, we require a newer version of make than on other platforms
17912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17913    MAKE_VERSION_EXPR="-e 4\."
17914    MAKE_REQUIRED_VERSION="4.0"
17915   else
17916    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17917    MAKE_REQUIRED_VERSION="3.81"
17918  fi
17919
17920  if test "x$MAKE_CANDIDATE" != x; then
17921    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17922$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17923    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17924    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17925    if test "x$IS_GNU_MAKE" = x; then
17926      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17927$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17928    else
17929      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17930      if test "x$IS_MODERN_MAKE" = x; then
17931        { $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
17932$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;}
17933      else
17934        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17935          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17936            MAKE_EXPECTED_ENV='cygwin'
17937          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17938            MAKE_EXPECTED_ENV='msys'
17939          else
17940            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17941          fi
17942          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17943          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17944        else
17945          # Not relevant for non-Windows
17946          IS_MAKE_CORRECT_ENV=true
17947        fi
17948        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17949          { $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
17950$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;}
17951        else
17952          FOUND_MAKE=$MAKE_CANDIDATE
17953
17954  # Only process if variable expands to non-empty
17955
17956  if test "x$FOUND_MAKE" != x; then
17957    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17958
17959  # First separate the path from the arguments. This will split at the first
17960  # space.
17961  complete="$FOUND_MAKE"
17962  path="${complete%% *}"
17963  tmp="$complete EOL"
17964  arguments="${tmp#* }"
17965
17966  # Input might be given as Windows format, start by converting to
17967  # unix format.
17968  new_path=`$CYGPATH -u "$path"`
17969
17970  # Now try to locate executable using which
17971  new_path=`$WHICH "$new_path" 2> /dev/null`
17972  # bat and cmd files are not always considered executable in cygwin causing which
17973  # to not find them
17974  if test "x$new_path" = x \
17975      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17976      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17977    new_path=`$CYGPATH -u "$path"`
17978  fi
17979  if test "x$new_path" = x; then
17980    # Oops. Which didn't find the executable.
17981    # The splitting of arguments from the executable at a space might have been incorrect,
17982    # since paths with space are more likely in Windows. Give it another try with the whole
17983    # argument.
17984    path="$complete"
17985    arguments="EOL"
17986    new_path=`$CYGPATH -u "$path"`
17987    new_path=`$WHICH "$new_path" 2> /dev/null`
17988    # bat and cmd files are not always considered executable in cygwin causing which
17989    # to not find them
17990    if test "x$new_path" = x \
17991        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17992        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17993      new_path=`$CYGPATH -u "$path"`
17994    fi
17995    if test "x$new_path" = x; then
17996      # It's still not found. Now this is an unrecoverable error.
17997      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17998$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17999      has_space=`$ECHO "$complete" | $GREP " "`
18000      if test "x$has_space" != x; then
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18002$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18003      fi
18004      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18005    fi
18006  fi
18007
18008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18011  # "foo.exe" is OK but "foo" is an error.
18012  #
18013  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18014  # It is also a way to make sure we got the proper file name for the real test later on.
18015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18016  if test "x$test_shortpath" = x; then
18017    # Short path failed, file does not exist as specified.
18018    # Try adding .exe or .cmd
18019    if test -f "${new_path}.exe"; then
18020      input_to_shortpath="${new_path}.exe"
18021    elif test -f "${new_path}.cmd"; then
18022      input_to_shortpath="${new_path}.cmd"
18023    else
18024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18025$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18026      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18027$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18028      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18029    fi
18030  else
18031    input_to_shortpath="$new_path"
18032  fi
18033
18034  # Call helper function which possibly converts this using DOS-style short mode.
18035  # If so, the updated path is stored in $new_path.
18036  new_path="$input_to_shortpath"
18037
18038  input_path="$input_to_shortpath"
18039  # Check if we need to convert this using DOS-style short mode. If the path
18040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18041  # take no chances and rewrite it.
18042  # Note: m4 eats our [], so we need to use [ and ] instead.
18043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18044  if test "x$has_forbidden_chars" != x; then
18045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18049      # Going to short mode and back again did indeed matter. Since short mode is
18050      # case insensitive, let's make it lowercase to improve readability.
18051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18052      # Now convert it back to Unix-style (cygpath)
18053      input_path=`$CYGPATH -u "$shortmode_path"`
18054      new_path="$input_path"
18055    fi
18056  fi
18057
18058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18059  if test "x$test_cygdrive_prefix" = x; then
18060    # As a simple fix, exclude /usr/bin since it's not a real path.
18061    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18063      # a path prefixed by /cygdrive for fixpath to work.
18064      new_path="$CYGWIN_ROOT_PATH$input_path"
18065    fi
18066  fi
18067
18068  # remove trailing .exe if any
18069  new_path="${new_path/%.exe/}"
18070
18071    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18072
18073  # First separate the path from the arguments. This will split at the first
18074  # space.
18075  complete="$FOUND_MAKE"
18076  path="${complete%% *}"
18077  tmp="$complete EOL"
18078  arguments="${tmp#* }"
18079
18080  # Input might be given as Windows format, start by converting to
18081  # unix format.
18082  new_path="$path"
18083
18084  windows_path="$new_path"
18085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18086    unix_path=`$CYGPATH -u "$windows_path"`
18087    new_path="$unix_path"
18088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18090    new_path="$unix_path"
18091  fi
18092
18093
18094  # Now try to locate executable using which
18095  new_path=`$WHICH "$new_path" 2> /dev/null`
18096
18097  if test "x$new_path" = x; then
18098    # Oops. Which didn't find the executable.
18099    # The splitting of arguments from the executable at a space might have been incorrect,
18100    # since paths with space are more likely in Windows. Give it another try with the whole
18101    # argument.
18102    path="$complete"
18103    arguments="EOL"
18104    new_path="$path"
18105
18106  windows_path="$new_path"
18107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18108    unix_path=`$CYGPATH -u "$windows_path"`
18109    new_path="$unix_path"
18110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18112    new_path="$unix_path"
18113  fi
18114
18115
18116    new_path=`$WHICH "$new_path" 2> /dev/null`
18117    # bat and cmd files are not always considered executable in MSYS causing which
18118    # to not find them
18119    if test "x$new_path" = x \
18120        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18121        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18122      new_path="$path"
18123
18124  windows_path="$new_path"
18125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18126    unix_path=`$CYGPATH -u "$windows_path"`
18127    new_path="$unix_path"
18128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18130    new_path="$unix_path"
18131  fi
18132
18133    fi
18134
18135    if test "x$new_path" = x; then
18136      # It's still not found. Now this is an unrecoverable error.
18137      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18138$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18139      has_space=`$ECHO "$complete" | $GREP " "`
18140      if test "x$has_space" != x; then
18141        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18142$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18143      fi
18144      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18145    fi
18146  fi
18147
18148  # Now new_path has a complete unix path to the binary
18149  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18150    # Keep paths in /bin as-is, but remove trailing .exe if any
18151    new_path="${new_path/%.exe/}"
18152    # Do not save /bin paths to all_fixpath_prefixes!
18153  else
18154    # Not in mixed or Windows style, start by that.
18155    new_path=`cmd //c echo $new_path`
18156
18157  input_path="$new_path"
18158  # Check if we need to convert this using DOS-style short mode. If the path
18159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18160  # take no chances and rewrite it.
18161  # Note: m4 eats our [], so we need to use [ and ] instead.
18162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18163  if test "x$has_forbidden_chars" != x; then
18164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18165    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18166  fi
18167
18168    # Output is in $new_path
18169
18170  windows_path="$new_path"
18171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18172    unix_path=`$CYGPATH -u "$windows_path"`
18173    new_path="$unix_path"
18174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18176    new_path="$unix_path"
18177  fi
18178
18179    # remove trailing .exe if any
18180    new_path="${new_path/%.exe/}"
18181
18182    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18183    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18184  fi
18185
18186    else
18187      # We're on a unix platform. Hooray! :)
18188      # First separate the path from the arguments. This will split at the first
18189      # space.
18190      complete="$FOUND_MAKE"
18191      path="${complete%% *}"
18192      tmp="$complete EOL"
18193      arguments="${tmp#* }"
18194
18195      # Cannot rely on the command "which" here since it doesn't always work.
18196      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18197      if test -z "$is_absolute_path"; then
18198        # Path to executable is not absolute. Find it.
18199        IFS_save="$IFS"
18200        IFS=:
18201        for p in $PATH; do
18202          if test -f "$p/$path" && test -x "$p/$path"; then
18203            new_path="$p/$path"
18204            break
18205          fi
18206        done
18207        IFS="$IFS_save"
18208      else
18209        # This is an absolute path, we can use it without further modifications.
18210        new_path="$path"
18211      fi
18212
18213      if test "x$new_path" = x; then
18214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18215$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18216        has_space=`$ECHO "$complete" | $GREP " "`
18217        if test "x$has_space" != x; then
18218          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18220        fi
18221        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18222      fi
18223    fi
18224
18225    # Now join together the path and the arguments once again
18226    if test "x$arguments" != xEOL; then
18227      new_complete="$new_path ${arguments% *}"
18228    else
18229      new_complete="$new_path"
18230    fi
18231
18232    if test "x$complete" != "x$new_complete"; then
18233      FOUND_MAKE="$new_complete"
18234      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18235$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18236    fi
18237  fi
18238
18239        fi
18240      fi
18241    fi
18242  fi
18243
18244        if test "x$FOUND_MAKE" = x; then
18245          for ac_prog in make
18246do
18247  # Extract the first word of "$ac_prog", so it can be a program name with args.
18248set dummy $ac_prog; ac_word=$2
18249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18250$as_echo_n "checking for $ac_word... " >&6; }
18251if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18252  $as_echo_n "(cached) " >&6
18253else
18254  case $CHECK_TOOLSDIR_MAKE in
18255  [\\/]* | ?:[\\/]*)
18256  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18257  ;;
18258  *)
18259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18260for as_dir in $PATH
18261do
18262  IFS=$as_save_IFS
18263  test -z "$as_dir" && as_dir=.
18264    for ac_exec_ext in '' $ac_executable_extensions; do
18265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18266    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18268    break 2
18269  fi
18270done
18271  done
18272IFS=$as_save_IFS
18273
18274  ;;
18275esac
18276fi
18277CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18278if test -n "$CHECK_TOOLSDIR_MAKE"; then
18279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18280$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18281else
18282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18283$as_echo "no" >&6; }
18284fi
18285
18286
18287  test -n "$CHECK_TOOLSDIR_MAKE" && break
18288done
18289
18290
18291  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18292  DESCRIPTION="make in tools-dir"
18293
18294  # On Cygwin, we require a newer version of make than on other platforms
18295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18296    MAKE_VERSION_EXPR="-e 4\."
18297    MAKE_REQUIRED_VERSION="4.0"
18298   else
18299    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18300    MAKE_REQUIRED_VERSION="3.81"
18301  fi
18302
18303  if test "x$MAKE_CANDIDATE" != x; then
18304    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18305$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18306    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18307    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18308    if test "x$IS_GNU_MAKE" = x; then
18309      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18310$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18311    else
18312      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18313      if test "x$IS_MODERN_MAKE" = x; then
18314        { $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
18315$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;}
18316      else
18317        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18318          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18319            MAKE_EXPECTED_ENV='cygwin'
18320          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18321            MAKE_EXPECTED_ENV='msys'
18322          else
18323            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18324          fi
18325          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18326          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18327        else
18328          # Not relevant for non-Windows
18329          IS_MAKE_CORRECT_ENV=true
18330        fi
18331        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18332          { $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
18333$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;}
18334        else
18335          FOUND_MAKE=$MAKE_CANDIDATE
18336
18337  # Only process if variable expands to non-empty
18338
18339  if test "x$FOUND_MAKE" != x; then
18340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18341
18342  # First separate the path from the arguments. This will split at the first
18343  # space.
18344  complete="$FOUND_MAKE"
18345  path="${complete%% *}"
18346  tmp="$complete EOL"
18347  arguments="${tmp#* }"
18348
18349  # Input might be given as Windows format, start by converting to
18350  # unix format.
18351  new_path=`$CYGPATH -u "$path"`
18352
18353  # Now try to locate executable using which
18354  new_path=`$WHICH "$new_path" 2> /dev/null`
18355  # bat and cmd files are not always considered executable in cygwin causing which
18356  # to not find them
18357  if test "x$new_path" = x \
18358      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18359      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18360    new_path=`$CYGPATH -u "$path"`
18361  fi
18362  if test "x$new_path" = x; then
18363    # Oops. Which didn't find the executable.
18364    # The splitting of arguments from the executable at a space might have been incorrect,
18365    # since paths with space are more likely in Windows. Give it another try with the whole
18366    # argument.
18367    path="$complete"
18368    arguments="EOL"
18369    new_path=`$CYGPATH -u "$path"`
18370    new_path=`$WHICH "$new_path" 2> /dev/null`
18371    # bat and cmd files are not always considered executable in cygwin causing which
18372    # to not find them
18373    if test "x$new_path" = x \
18374        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18375        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18376      new_path=`$CYGPATH -u "$path"`
18377    fi
18378    if test "x$new_path" = x; then
18379      # It's still not found. Now this is an unrecoverable error.
18380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18381$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18382      has_space=`$ECHO "$complete" | $GREP " "`
18383      if test "x$has_space" != x; then
18384        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18385$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18386      fi
18387      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18388    fi
18389  fi
18390
18391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18394  # "foo.exe" is OK but "foo" is an error.
18395  #
18396  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18397  # It is also a way to make sure we got the proper file name for the real test later on.
18398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18399  if test "x$test_shortpath" = x; then
18400    # Short path failed, file does not exist as specified.
18401    # Try adding .exe or .cmd
18402    if test -f "${new_path}.exe"; then
18403      input_to_shortpath="${new_path}.exe"
18404    elif test -f "${new_path}.cmd"; then
18405      input_to_shortpath="${new_path}.cmd"
18406    else
18407      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18408$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18409      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18410$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18411      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18412    fi
18413  else
18414    input_to_shortpath="$new_path"
18415  fi
18416
18417  # Call helper function which possibly converts this using DOS-style short mode.
18418  # If so, the updated path is stored in $new_path.
18419  new_path="$input_to_shortpath"
18420
18421  input_path="$input_to_shortpath"
18422  # Check if we need to convert this using DOS-style short mode. If the path
18423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18424  # take no chances and rewrite it.
18425  # Note: m4 eats our [], so we need to use [ and ] instead.
18426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18427  if test "x$has_forbidden_chars" != x; then
18428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18432      # Going to short mode and back again did indeed matter. Since short mode is
18433      # case insensitive, let's make it lowercase to improve readability.
18434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18435      # Now convert it back to Unix-style (cygpath)
18436      input_path=`$CYGPATH -u "$shortmode_path"`
18437      new_path="$input_path"
18438    fi
18439  fi
18440
18441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18442  if test "x$test_cygdrive_prefix" = x; then
18443    # As a simple fix, exclude /usr/bin since it's not a real path.
18444    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18446      # a path prefixed by /cygdrive for fixpath to work.
18447      new_path="$CYGWIN_ROOT_PATH$input_path"
18448    fi
18449  fi
18450
18451  # remove trailing .exe if any
18452  new_path="${new_path/%.exe/}"
18453
18454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18455
18456  # First separate the path from the arguments. This will split at the first
18457  # space.
18458  complete="$FOUND_MAKE"
18459  path="${complete%% *}"
18460  tmp="$complete EOL"
18461  arguments="${tmp#* }"
18462
18463  # Input might be given as Windows format, start by converting to
18464  # unix format.
18465  new_path="$path"
18466
18467  windows_path="$new_path"
18468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18469    unix_path=`$CYGPATH -u "$windows_path"`
18470    new_path="$unix_path"
18471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18473    new_path="$unix_path"
18474  fi
18475
18476
18477  # Now try to locate executable using which
18478  new_path=`$WHICH "$new_path" 2> /dev/null`
18479
18480  if test "x$new_path" = x; then
18481    # Oops. Which didn't find the executable.
18482    # The splitting of arguments from the executable at a space might have been incorrect,
18483    # since paths with space are more likely in Windows. Give it another try with the whole
18484    # argument.
18485    path="$complete"
18486    arguments="EOL"
18487    new_path="$path"
18488
18489  windows_path="$new_path"
18490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18491    unix_path=`$CYGPATH -u "$windows_path"`
18492    new_path="$unix_path"
18493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18495    new_path="$unix_path"
18496  fi
18497
18498
18499    new_path=`$WHICH "$new_path" 2> /dev/null`
18500    # bat and cmd files are not always considered executable in MSYS causing which
18501    # to not find them
18502    if test "x$new_path" = x \
18503        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18504        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18505      new_path="$path"
18506
18507  windows_path="$new_path"
18508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18509    unix_path=`$CYGPATH -u "$windows_path"`
18510    new_path="$unix_path"
18511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18513    new_path="$unix_path"
18514  fi
18515
18516    fi
18517
18518    if test "x$new_path" = x; then
18519      # It's still not found. Now this is an unrecoverable error.
18520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18521$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18522      has_space=`$ECHO "$complete" | $GREP " "`
18523      if test "x$has_space" != x; then
18524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18526      fi
18527      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18528    fi
18529  fi
18530
18531  # Now new_path has a complete unix path to the binary
18532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18533    # Keep paths in /bin as-is, but remove trailing .exe if any
18534    new_path="${new_path/%.exe/}"
18535    # Do not save /bin paths to all_fixpath_prefixes!
18536  else
18537    # Not in mixed or Windows style, start by that.
18538    new_path=`cmd //c echo $new_path`
18539
18540  input_path="$new_path"
18541  # Check if we need to convert this using DOS-style short mode. If the path
18542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18543  # take no chances and rewrite it.
18544  # Note: m4 eats our [], so we need to use [ and ] instead.
18545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18546  if test "x$has_forbidden_chars" != x; then
18547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18549  fi
18550
18551    # Output is in $new_path
18552
18553  windows_path="$new_path"
18554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18555    unix_path=`$CYGPATH -u "$windows_path"`
18556    new_path="$unix_path"
18557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18559    new_path="$unix_path"
18560  fi
18561
18562    # remove trailing .exe if any
18563    new_path="${new_path/%.exe/}"
18564
18565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18567  fi
18568
18569    else
18570      # We're on a unix platform. Hooray! :)
18571      # First separate the path from the arguments. This will split at the first
18572      # space.
18573      complete="$FOUND_MAKE"
18574      path="${complete%% *}"
18575      tmp="$complete EOL"
18576      arguments="${tmp#* }"
18577
18578      # Cannot rely on the command "which" here since it doesn't always work.
18579      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18580      if test -z "$is_absolute_path"; then
18581        # Path to executable is not absolute. Find it.
18582        IFS_save="$IFS"
18583        IFS=:
18584        for p in $PATH; do
18585          if test -f "$p/$path" && test -x "$p/$path"; then
18586            new_path="$p/$path"
18587            break
18588          fi
18589        done
18590        IFS="$IFS_save"
18591      else
18592        # This is an absolute path, we can use it without further modifications.
18593        new_path="$path"
18594      fi
18595
18596      if test "x$new_path" = x; then
18597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18598$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18599        has_space=`$ECHO "$complete" | $GREP " "`
18600        if test "x$has_space" != x; then
18601          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18602$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18603        fi
18604        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18605      fi
18606    fi
18607
18608    # Now join together the path and the arguments once again
18609    if test "x$arguments" != xEOL; then
18610      new_complete="$new_path ${arguments% *}"
18611    else
18612      new_complete="$new_path"
18613    fi
18614
18615    if test "x$complete" != "x$new_complete"; then
18616      FOUND_MAKE="$new_complete"
18617      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18618$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18619    fi
18620  fi
18621
18622        fi
18623      fi
18624    fi
18625  fi
18626
18627        fi
18628        PATH=$OLD_PATH
18629      fi
18630    fi
18631
18632    if test "x$FOUND_MAKE" = x; then
18633      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
18634    fi
18635
18636  else
18637    # The variable is set, but is it from the command line or the environment?
18638
18639    # Try to remove the string !MAKE! from our list.
18640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18642      # If it failed, the variable was not from the command line. Ignore it,
18643      # but warn the user (except for BASH, which is always set by the calling BASH).
18644      if test "xMAKE" != xBASH; then
18645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18646$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18647      fi
18648      # Try to locate tool using the code snippet
18649
18650    # Try our hardest to locate a correct version of GNU make
18651    for ac_prog in gmake
18652do
18653  # Extract the first word of "$ac_prog", so it can be a program name with args.
18654set dummy $ac_prog; ac_word=$2
18655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18656$as_echo_n "checking for $ac_word... " >&6; }
18657if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18658  $as_echo_n "(cached) " >&6
18659else
18660  case $CHECK_GMAKE in
18661  [\\/]* | ?:[\\/]*)
18662  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18663  ;;
18664  *)
18665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18666for as_dir in $PATH
18667do
18668  IFS=$as_save_IFS
18669  test -z "$as_dir" && as_dir=.
18670    for ac_exec_ext in '' $ac_executable_extensions; do
18671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18672    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18674    break 2
18675  fi
18676done
18677  done
18678IFS=$as_save_IFS
18679
18680  ;;
18681esac
18682fi
18683CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18684if test -n "$CHECK_GMAKE"; then
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18686$as_echo "$CHECK_GMAKE" >&6; }
18687else
18688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18689$as_echo "no" >&6; }
18690fi
18691
18692
18693  test -n "$CHECK_GMAKE" && break
18694done
18695
18696
18697  MAKE_CANDIDATE=""$CHECK_GMAKE""
18698  DESCRIPTION="gmake in PATH"
18699
18700  # On Cygwin, we require a newer version of make than on other platforms
18701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18702    MAKE_VERSION_EXPR="-e 4\."
18703    MAKE_REQUIRED_VERSION="4.0"
18704   else
18705    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18706    MAKE_REQUIRED_VERSION="3.81"
18707  fi
18708
18709  if test "x$MAKE_CANDIDATE" != x; then
18710    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18711$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18712    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18713    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18714    if test "x$IS_GNU_MAKE" = x; then
18715      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18716$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18717    else
18718      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18719      if test "x$IS_MODERN_MAKE" = x; then
18720        { $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
18721$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;}
18722      else
18723        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18724          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18725            MAKE_EXPECTED_ENV='cygwin'
18726          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18727            MAKE_EXPECTED_ENV='msys'
18728          else
18729            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18730          fi
18731          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18732          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18733        else
18734          # Not relevant for non-Windows
18735          IS_MAKE_CORRECT_ENV=true
18736        fi
18737        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18738          { $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
18739$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;}
18740        else
18741          FOUND_MAKE=$MAKE_CANDIDATE
18742
18743  # Only process if variable expands to non-empty
18744
18745  if test "x$FOUND_MAKE" != x; then
18746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18747
18748  # First separate the path from the arguments. This will split at the first
18749  # space.
18750  complete="$FOUND_MAKE"
18751  path="${complete%% *}"
18752  tmp="$complete EOL"
18753  arguments="${tmp#* }"
18754
18755  # Input might be given as Windows format, start by converting to
18756  # unix format.
18757  new_path=`$CYGPATH -u "$path"`
18758
18759  # Now try to locate executable using which
18760  new_path=`$WHICH "$new_path" 2> /dev/null`
18761  # bat and cmd files are not always considered executable in cygwin causing which
18762  # to not find them
18763  if test "x$new_path" = x \
18764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18766    new_path=`$CYGPATH -u "$path"`
18767  fi
18768  if test "x$new_path" = x; then
18769    # Oops. Which didn't find the executable.
18770    # The splitting of arguments from the executable at a space might have been incorrect,
18771    # since paths with space are more likely in Windows. Give it another try with the whole
18772    # argument.
18773    path="$complete"
18774    arguments="EOL"
18775    new_path=`$CYGPATH -u "$path"`
18776    new_path=`$WHICH "$new_path" 2> /dev/null`
18777    # bat and cmd files are not always considered executable in cygwin causing which
18778    # to not find them
18779    if test "x$new_path" = x \
18780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18782      new_path=`$CYGPATH -u "$path"`
18783    fi
18784    if test "x$new_path" = x; then
18785      # It's still not found. Now this is an unrecoverable error.
18786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18787$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18788      has_space=`$ECHO "$complete" | $GREP " "`
18789      if test "x$has_space" != x; then
18790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18792      fi
18793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18794    fi
18795  fi
18796
18797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18800  # "foo.exe" is OK but "foo" is an error.
18801  #
18802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18803  # It is also a way to make sure we got the proper file name for the real test later on.
18804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18805  if test "x$test_shortpath" = x; then
18806    # Short path failed, file does not exist as specified.
18807    # Try adding .exe or .cmd
18808    if test -f "${new_path}.exe"; then
18809      input_to_shortpath="${new_path}.exe"
18810    elif test -f "${new_path}.cmd"; then
18811      input_to_shortpath="${new_path}.cmd"
18812    else
18813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18818    fi
18819  else
18820    input_to_shortpath="$new_path"
18821  fi
18822
18823  # Call helper function which possibly converts this using DOS-style short mode.
18824  # If so, the updated path is stored in $new_path.
18825  new_path="$input_to_shortpath"
18826
18827  input_path="$input_to_shortpath"
18828  # Check if we need to convert this using DOS-style short mode. If the path
18829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18830  # take no chances and rewrite it.
18831  # Note: m4 eats our [], so we need to use [ and ] instead.
18832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18833  if test "x$has_forbidden_chars" != x; then
18834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18838      # Going to short mode and back again did indeed matter. Since short mode is
18839      # case insensitive, let's make it lowercase to improve readability.
18840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18841      # Now convert it back to Unix-style (cygpath)
18842      input_path=`$CYGPATH -u "$shortmode_path"`
18843      new_path="$input_path"
18844    fi
18845  fi
18846
18847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18848  if test "x$test_cygdrive_prefix" = x; then
18849    # As a simple fix, exclude /usr/bin since it's not a real path.
18850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18852      # a path prefixed by /cygdrive for fixpath to work.
18853      new_path="$CYGWIN_ROOT_PATH$input_path"
18854    fi
18855  fi
18856
18857  # remove trailing .exe if any
18858  new_path="${new_path/%.exe/}"
18859
18860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18861
18862  # First separate the path from the arguments. This will split at the first
18863  # space.
18864  complete="$FOUND_MAKE"
18865  path="${complete%% *}"
18866  tmp="$complete EOL"
18867  arguments="${tmp#* }"
18868
18869  # Input might be given as Windows format, start by converting to
18870  # unix format.
18871  new_path="$path"
18872
18873  windows_path="$new_path"
18874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18875    unix_path=`$CYGPATH -u "$windows_path"`
18876    new_path="$unix_path"
18877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18879    new_path="$unix_path"
18880  fi
18881
18882
18883  # Now try to locate executable using which
18884  new_path=`$WHICH "$new_path" 2> /dev/null`
18885
18886  if test "x$new_path" = x; then
18887    # Oops. Which didn't find the executable.
18888    # The splitting of arguments from the executable at a space might have been incorrect,
18889    # since paths with space are more likely in Windows. Give it another try with the whole
18890    # argument.
18891    path="$complete"
18892    arguments="EOL"
18893    new_path="$path"
18894
18895  windows_path="$new_path"
18896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18897    unix_path=`$CYGPATH -u "$windows_path"`
18898    new_path="$unix_path"
18899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18901    new_path="$unix_path"
18902  fi
18903
18904
18905    new_path=`$WHICH "$new_path" 2> /dev/null`
18906    # bat and cmd files are not always considered executable in MSYS causing which
18907    # to not find them
18908    if test "x$new_path" = x \
18909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18911      new_path="$path"
18912
18913  windows_path="$new_path"
18914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18915    unix_path=`$CYGPATH -u "$windows_path"`
18916    new_path="$unix_path"
18917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18919    new_path="$unix_path"
18920  fi
18921
18922    fi
18923
18924    if test "x$new_path" = x; then
18925      # It's still not found. Now this is an unrecoverable error.
18926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18928      has_space=`$ECHO "$complete" | $GREP " "`
18929      if test "x$has_space" != x; then
18930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18932      fi
18933      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18934    fi
18935  fi
18936
18937  # Now new_path has a complete unix path to the binary
18938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18939    # Keep paths in /bin as-is, but remove trailing .exe if any
18940    new_path="${new_path/%.exe/}"
18941    # Do not save /bin paths to all_fixpath_prefixes!
18942  else
18943    # Not in mixed or Windows style, start by that.
18944    new_path=`cmd //c echo $new_path`
18945
18946  input_path="$new_path"
18947  # Check if we need to convert this using DOS-style short mode. If the path
18948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18949  # take no chances and rewrite it.
18950  # Note: m4 eats our [], so we need to use [ and ] instead.
18951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18952  if test "x$has_forbidden_chars" != x; then
18953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18955  fi
18956
18957    # Output is in $new_path
18958
18959  windows_path="$new_path"
18960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18961    unix_path=`$CYGPATH -u "$windows_path"`
18962    new_path="$unix_path"
18963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18965    new_path="$unix_path"
18966  fi
18967
18968    # remove trailing .exe if any
18969    new_path="${new_path/%.exe/}"
18970
18971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18973  fi
18974
18975    else
18976      # We're on a unix platform. Hooray! :)
18977      # First separate the path from the arguments. This will split at the first
18978      # space.
18979      complete="$FOUND_MAKE"
18980      path="${complete%% *}"
18981      tmp="$complete EOL"
18982      arguments="${tmp#* }"
18983
18984      # Cannot rely on the command "which" here since it doesn't always work.
18985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18986      if test -z "$is_absolute_path"; then
18987        # Path to executable is not absolute. Find it.
18988        IFS_save="$IFS"
18989        IFS=:
18990        for p in $PATH; do
18991          if test -f "$p/$path" && test -x "$p/$path"; then
18992            new_path="$p/$path"
18993            break
18994          fi
18995        done
18996        IFS="$IFS_save"
18997      else
18998        # This is an absolute path, we can use it without further modifications.
18999        new_path="$path"
19000      fi
19001
19002      if test "x$new_path" = x; then
19003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19005        has_space=`$ECHO "$complete" | $GREP " "`
19006        if test "x$has_space" != x; then
19007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19009        fi
19010        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19011      fi
19012    fi
19013
19014    # Now join together the path and the arguments once again
19015    if test "x$arguments" != xEOL; then
19016      new_complete="$new_path ${arguments% *}"
19017    else
19018      new_complete="$new_path"
19019    fi
19020
19021    if test "x$complete" != "x$new_complete"; then
19022      FOUND_MAKE="$new_complete"
19023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19024$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19025    fi
19026  fi
19027
19028        fi
19029      fi
19030    fi
19031  fi
19032
19033
19034    if test "x$FOUND_MAKE" = x; then
19035      for ac_prog in make
19036do
19037  # Extract the first word of "$ac_prog", so it can be a program name with args.
19038set dummy $ac_prog; ac_word=$2
19039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19040$as_echo_n "checking for $ac_word... " >&6; }
19041if ${ac_cv_path_CHECK_MAKE+:} false; then :
19042  $as_echo_n "(cached) " >&6
19043else
19044  case $CHECK_MAKE in
19045  [\\/]* | ?:[\\/]*)
19046  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19047  ;;
19048  *)
19049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19050for as_dir in $PATH
19051do
19052  IFS=$as_save_IFS
19053  test -z "$as_dir" && as_dir=.
19054    for ac_exec_ext in '' $ac_executable_extensions; do
19055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19056    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19058    break 2
19059  fi
19060done
19061  done
19062IFS=$as_save_IFS
19063
19064  ;;
19065esac
19066fi
19067CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19068if test -n "$CHECK_MAKE"; then
19069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19070$as_echo "$CHECK_MAKE" >&6; }
19071else
19072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19073$as_echo "no" >&6; }
19074fi
19075
19076
19077  test -n "$CHECK_MAKE" && break
19078done
19079
19080
19081  MAKE_CANDIDATE=""$CHECK_MAKE""
19082  DESCRIPTION="make in PATH"
19083
19084  # On Cygwin, we require a newer version of make than on other platforms
19085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19086    MAKE_VERSION_EXPR="-e 4\."
19087    MAKE_REQUIRED_VERSION="4.0"
19088   else
19089    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19090    MAKE_REQUIRED_VERSION="3.81"
19091  fi
19092
19093  if test "x$MAKE_CANDIDATE" != x; then
19094    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19095$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19096    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19097    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19098    if test "x$IS_GNU_MAKE" = x; then
19099      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19100$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19101    else
19102      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19103      if test "x$IS_MODERN_MAKE" = x; then
19104        { $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
19105$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;}
19106      else
19107        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19108          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19109            MAKE_EXPECTED_ENV='cygwin'
19110          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19111            MAKE_EXPECTED_ENV='msys'
19112          else
19113            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19114          fi
19115          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19116          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19117        else
19118          # Not relevant for non-Windows
19119          IS_MAKE_CORRECT_ENV=true
19120        fi
19121        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19122          { $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
19123$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;}
19124        else
19125          FOUND_MAKE=$MAKE_CANDIDATE
19126
19127  # Only process if variable expands to non-empty
19128
19129  if test "x$FOUND_MAKE" != x; then
19130    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19131
19132  # First separate the path from the arguments. This will split at the first
19133  # space.
19134  complete="$FOUND_MAKE"
19135  path="${complete%% *}"
19136  tmp="$complete EOL"
19137  arguments="${tmp#* }"
19138
19139  # Input might be given as Windows format, start by converting to
19140  # unix format.
19141  new_path=`$CYGPATH -u "$path"`
19142
19143  # Now try to locate executable using which
19144  new_path=`$WHICH "$new_path" 2> /dev/null`
19145  # bat and cmd files are not always considered executable in cygwin causing which
19146  # to not find them
19147  if test "x$new_path" = x \
19148      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19149      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19150    new_path=`$CYGPATH -u "$path"`
19151  fi
19152  if test "x$new_path" = x; then
19153    # Oops. Which didn't find the executable.
19154    # The splitting of arguments from the executable at a space might have been incorrect,
19155    # since paths with space are more likely in Windows. Give it another try with the whole
19156    # argument.
19157    path="$complete"
19158    arguments="EOL"
19159    new_path=`$CYGPATH -u "$path"`
19160    new_path=`$WHICH "$new_path" 2> /dev/null`
19161    # bat and cmd files are not always considered executable in cygwin causing which
19162    # to not find them
19163    if test "x$new_path" = x \
19164        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19165        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19166      new_path=`$CYGPATH -u "$path"`
19167    fi
19168    if test "x$new_path" = x; then
19169      # It's still not found. Now this is an unrecoverable error.
19170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19171$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19172      has_space=`$ECHO "$complete" | $GREP " "`
19173      if test "x$has_space" != x; then
19174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19176      fi
19177      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19178    fi
19179  fi
19180
19181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19184  # "foo.exe" is OK but "foo" is an error.
19185  #
19186  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19187  # It is also a way to make sure we got the proper file name for the real test later on.
19188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19189  if test "x$test_shortpath" = x; then
19190    # Short path failed, file does not exist as specified.
19191    # Try adding .exe or .cmd
19192    if test -f "${new_path}.exe"; then
19193      input_to_shortpath="${new_path}.exe"
19194    elif test -f "${new_path}.cmd"; then
19195      input_to_shortpath="${new_path}.cmd"
19196    else
19197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19198$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19199      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19200$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19201      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19202    fi
19203  else
19204    input_to_shortpath="$new_path"
19205  fi
19206
19207  # Call helper function which possibly converts this using DOS-style short mode.
19208  # If so, the updated path is stored in $new_path.
19209  new_path="$input_to_shortpath"
19210
19211  input_path="$input_to_shortpath"
19212  # Check if we need to convert this using DOS-style short mode. If the path
19213  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19214  # take no chances and rewrite it.
19215  # Note: m4 eats our [], so we need to use [ and ] instead.
19216  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19217  if test "x$has_forbidden_chars" != x; then
19218    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19219    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19220    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19221    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19222      # Going to short mode and back again did indeed matter. Since short mode is
19223      # case insensitive, let's make it lowercase to improve readability.
19224      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19225      # Now convert it back to Unix-style (cygpath)
19226      input_path=`$CYGPATH -u "$shortmode_path"`
19227      new_path="$input_path"
19228    fi
19229  fi
19230
19231  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19232  if test "x$test_cygdrive_prefix" = x; then
19233    # As a simple fix, exclude /usr/bin since it's not a real path.
19234    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19235      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19236      # a path prefixed by /cygdrive for fixpath to work.
19237      new_path="$CYGWIN_ROOT_PATH$input_path"
19238    fi
19239  fi
19240
19241  # remove trailing .exe if any
19242  new_path="${new_path/%.exe/}"
19243
19244    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19245
19246  # First separate the path from the arguments. This will split at the first
19247  # space.
19248  complete="$FOUND_MAKE"
19249  path="${complete%% *}"
19250  tmp="$complete EOL"
19251  arguments="${tmp#* }"
19252
19253  # Input might be given as Windows format, start by converting to
19254  # unix format.
19255  new_path="$path"
19256
19257  windows_path="$new_path"
19258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19259    unix_path=`$CYGPATH -u "$windows_path"`
19260    new_path="$unix_path"
19261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19263    new_path="$unix_path"
19264  fi
19265
19266
19267  # Now try to locate executable using which
19268  new_path=`$WHICH "$new_path" 2> /dev/null`
19269
19270  if test "x$new_path" = x; then
19271    # Oops. Which didn't find the executable.
19272    # The splitting of arguments from the executable at a space might have been incorrect,
19273    # since paths with space are more likely in Windows. Give it another try with the whole
19274    # argument.
19275    path="$complete"
19276    arguments="EOL"
19277    new_path="$path"
19278
19279  windows_path="$new_path"
19280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19281    unix_path=`$CYGPATH -u "$windows_path"`
19282    new_path="$unix_path"
19283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19285    new_path="$unix_path"
19286  fi
19287
19288
19289    new_path=`$WHICH "$new_path" 2> /dev/null`
19290    # bat and cmd files are not always considered executable in MSYS causing which
19291    # to not find them
19292    if test "x$new_path" = x \
19293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19295      new_path="$path"
19296
19297  windows_path="$new_path"
19298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19299    unix_path=`$CYGPATH -u "$windows_path"`
19300    new_path="$unix_path"
19301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19303    new_path="$unix_path"
19304  fi
19305
19306    fi
19307
19308    if test "x$new_path" = x; then
19309      # It's still not found. Now this is an unrecoverable error.
19310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19311$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19312      has_space=`$ECHO "$complete" | $GREP " "`
19313      if test "x$has_space" != x; then
19314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19316      fi
19317      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19318    fi
19319  fi
19320
19321  # Now new_path has a complete unix path to the binary
19322  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19323    # Keep paths in /bin as-is, but remove trailing .exe if any
19324    new_path="${new_path/%.exe/}"
19325    # Do not save /bin paths to all_fixpath_prefixes!
19326  else
19327    # Not in mixed or Windows style, start by that.
19328    new_path=`cmd //c echo $new_path`
19329
19330  input_path="$new_path"
19331  # Check if we need to convert this using DOS-style short mode. If the path
19332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19333  # take no chances and rewrite it.
19334  # Note: m4 eats our [], so we need to use [ and ] instead.
19335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19336  if test "x$has_forbidden_chars" != x; then
19337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19338    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19339  fi
19340
19341    # Output is in $new_path
19342
19343  windows_path="$new_path"
19344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19345    unix_path=`$CYGPATH -u "$windows_path"`
19346    new_path="$unix_path"
19347  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19348    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19349    new_path="$unix_path"
19350  fi
19351
19352    # remove trailing .exe if any
19353    new_path="${new_path/%.exe/}"
19354
19355    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19356    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19357  fi
19358
19359    else
19360      # We're on a unix platform. Hooray! :)
19361      # First separate the path from the arguments. This will split at the first
19362      # space.
19363      complete="$FOUND_MAKE"
19364      path="${complete%% *}"
19365      tmp="$complete EOL"
19366      arguments="${tmp#* }"
19367
19368      # Cannot rely on the command "which" here since it doesn't always work.
19369      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19370      if test -z "$is_absolute_path"; then
19371        # Path to executable is not absolute. Find it.
19372        IFS_save="$IFS"
19373        IFS=:
19374        for p in $PATH; do
19375          if test -f "$p/$path" && test -x "$p/$path"; then
19376            new_path="$p/$path"
19377            break
19378          fi
19379        done
19380        IFS="$IFS_save"
19381      else
19382        # This is an absolute path, we can use it without further modifications.
19383        new_path="$path"
19384      fi
19385
19386      if test "x$new_path" = x; then
19387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19388$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19389        has_space=`$ECHO "$complete" | $GREP " "`
19390        if test "x$has_space" != x; then
19391          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19392$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19393        fi
19394        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19395      fi
19396    fi
19397
19398    # Now join together the path and the arguments once again
19399    if test "x$arguments" != xEOL; then
19400      new_complete="$new_path ${arguments% *}"
19401    else
19402      new_complete="$new_path"
19403    fi
19404
19405    if test "x$complete" != "x$new_complete"; then
19406      FOUND_MAKE="$new_complete"
19407      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19408$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19409    fi
19410  fi
19411
19412        fi
19413      fi
19414    fi
19415  fi
19416
19417    fi
19418
19419    if test "x$FOUND_MAKE" = x; then
19420      if test "x$TOOLCHAIN_PATH" != x; then
19421        # We have a toolchain path, check that as well before giving up.
19422        OLD_PATH=$PATH
19423        PATH=$TOOLCHAIN_PATH:$PATH
19424        for ac_prog in gmake
19425do
19426  # Extract the first word of "$ac_prog", so it can be a program name with args.
19427set dummy $ac_prog; ac_word=$2
19428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19429$as_echo_n "checking for $ac_word... " >&6; }
19430if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19431  $as_echo_n "(cached) " >&6
19432else
19433  case $CHECK_TOOLSDIR_GMAKE in
19434  [\\/]* | ?:[\\/]*)
19435  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19436  ;;
19437  *)
19438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19439for as_dir in $PATH
19440do
19441  IFS=$as_save_IFS
19442  test -z "$as_dir" && as_dir=.
19443    for ac_exec_ext in '' $ac_executable_extensions; do
19444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19445    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19447    break 2
19448  fi
19449done
19450  done
19451IFS=$as_save_IFS
19452
19453  ;;
19454esac
19455fi
19456CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19457if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19459$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19460else
19461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19462$as_echo "no" >&6; }
19463fi
19464
19465
19466  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19467done
19468
19469
19470  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19471  DESCRIPTION="gmake in tools-dir"
19472
19473  # On Cygwin, we require a newer version of make than on other platforms
19474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19475    MAKE_VERSION_EXPR="-e 4\."
19476    MAKE_REQUIRED_VERSION="4.0"
19477   else
19478    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19479    MAKE_REQUIRED_VERSION="3.81"
19480  fi
19481
19482  if test "x$MAKE_CANDIDATE" != x; then
19483    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19484$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19485    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19486    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19487    if test "x$IS_GNU_MAKE" = x; then
19488      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19489$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19490    else
19491      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19492      if test "x$IS_MODERN_MAKE" = x; then
19493        { $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
19494$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;}
19495      else
19496        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19497          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19498            MAKE_EXPECTED_ENV='cygwin'
19499          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19500            MAKE_EXPECTED_ENV='msys'
19501          else
19502            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19503          fi
19504          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19505          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19506        else
19507          # Not relevant for non-Windows
19508          IS_MAKE_CORRECT_ENV=true
19509        fi
19510        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19511          { $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
19512$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;}
19513        else
19514          FOUND_MAKE=$MAKE_CANDIDATE
19515
19516  # Only process if variable expands to non-empty
19517
19518  if test "x$FOUND_MAKE" != x; then
19519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19520
19521  # First separate the path from the arguments. This will split at the first
19522  # space.
19523  complete="$FOUND_MAKE"
19524  path="${complete%% *}"
19525  tmp="$complete EOL"
19526  arguments="${tmp#* }"
19527
19528  # Input might be given as Windows format, start by converting to
19529  # unix format.
19530  new_path=`$CYGPATH -u "$path"`
19531
19532  # Now try to locate executable using which
19533  new_path=`$WHICH "$new_path" 2> /dev/null`
19534  # bat and cmd files are not always considered executable in cygwin causing which
19535  # to not find them
19536  if test "x$new_path" = x \
19537      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19538      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19539    new_path=`$CYGPATH -u "$path"`
19540  fi
19541  if test "x$new_path" = x; then
19542    # Oops. Which didn't find the executable.
19543    # The splitting of arguments from the executable at a space might have been incorrect,
19544    # since paths with space are more likely in Windows. Give it another try with the whole
19545    # argument.
19546    path="$complete"
19547    arguments="EOL"
19548    new_path=`$CYGPATH -u "$path"`
19549    new_path=`$WHICH "$new_path" 2> /dev/null`
19550    # bat and cmd files are not always considered executable in cygwin causing which
19551    # to not find them
19552    if test "x$new_path" = x \
19553        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19554        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19555      new_path=`$CYGPATH -u "$path"`
19556    fi
19557    if test "x$new_path" = x; then
19558      # It's still not found. Now this is an unrecoverable error.
19559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19560$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19561      has_space=`$ECHO "$complete" | $GREP " "`
19562      if test "x$has_space" != x; then
19563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19565      fi
19566      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19567    fi
19568  fi
19569
19570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19573  # "foo.exe" is OK but "foo" is an error.
19574  #
19575  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19576  # It is also a way to make sure we got the proper file name for the real test later on.
19577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19578  if test "x$test_shortpath" = x; then
19579    # Short path failed, file does not exist as specified.
19580    # Try adding .exe or .cmd
19581    if test -f "${new_path}.exe"; then
19582      input_to_shortpath="${new_path}.exe"
19583    elif test -f "${new_path}.cmd"; then
19584      input_to_shortpath="${new_path}.cmd"
19585    else
19586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19587$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19588      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19589$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19590      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19591    fi
19592  else
19593    input_to_shortpath="$new_path"
19594  fi
19595
19596  # Call helper function which possibly converts this using DOS-style short mode.
19597  # If so, the updated path is stored in $new_path.
19598  new_path="$input_to_shortpath"
19599
19600  input_path="$input_to_shortpath"
19601  # Check if we need to convert this using DOS-style short mode. If the path
19602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19603  # take no chances and rewrite it.
19604  # Note: m4 eats our [], so we need to use [ and ] instead.
19605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19606  if test "x$has_forbidden_chars" != x; then
19607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19611      # Going to short mode and back again did indeed matter. Since short mode is
19612      # case insensitive, let's make it lowercase to improve readability.
19613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19614      # Now convert it back to Unix-style (cygpath)
19615      input_path=`$CYGPATH -u "$shortmode_path"`
19616      new_path="$input_path"
19617    fi
19618  fi
19619
19620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19621  if test "x$test_cygdrive_prefix" = x; then
19622    # As a simple fix, exclude /usr/bin since it's not a real path.
19623    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19625      # a path prefixed by /cygdrive for fixpath to work.
19626      new_path="$CYGWIN_ROOT_PATH$input_path"
19627    fi
19628  fi
19629
19630  # remove trailing .exe if any
19631  new_path="${new_path/%.exe/}"
19632
19633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19634
19635  # First separate the path from the arguments. This will split at the first
19636  # space.
19637  complete="$FOUND_MAKE"
19638  path="${complete%% *}"
19639  tmp="$complete EOL"
19640  arguments="${tmp#* }"
19641
19642  # Input might be given as Windows format, start by converting to
19643  # unix format.
19644  new_path="$path"
19645
19646  windows_path="$new_path"
19647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19648    unix_path=`$CYGPATH -u "$windows_path"`
19649    new_path="$unix_path"
19650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19652    new_path="$unix_path"
19653  fi
19654
19655
19656  # Now try to locate executable using which
19657  new_path=`$WHICH "$new_path" 2> /dev/null`
19658
19659  if test "x$new_path" = x; then
19660    # Oops. Which didn't find the executable.
19661    # The splitting of arguments from the executable at a space might have been incorrect,
19662    # since paths with space are more likely in Windows. Give it another try with the whole
19663    # argument.
19664    path="$complete"
19665    arguments="EOL"
19666    new_path="$path"
19667
19668  windows_path="$new_path"
19669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19670    unix_path=`$CYGPATH -u "$windows_path"`
19671    new_path="$unix_path"
19672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19674    new_path="$unix_path"
19675  fi
19676
19677
19678    new_path=`$WHICH "$new_path" 2> /dev/null`
19679    # bat and cmd files are not always considered executable in MSYS causing which
19680    # to not find them
19681    if test "x$new_path" = x \
19682        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19683        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19684      new_path="$path"
19685
19686  windows_path="$new_path"
19687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19688    unix_path=`$CYGPATH -u "$windows_path"`
19689    new_path="$unix_path"
19690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19691    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19692    new_path="$unix_path"
19693  fi
19694
19695    fi
19696
19697    if test "x$new_path" = x; then
19698      # It's still not found. Now this is an unrecoverable error.
19699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19701      has_space=`$ECHO "$complete" | $GREP " "`
19702      if test "x$has_space" != x; then
19703        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19704$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19705      fi
19706      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19707    fi
19708  fi
19709
19710  # Now new_path has a complete unix path to the binary
19711  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19712    # Keep paths in /bin as-is, but remove trailing .exe if any
19713    new_path="${new_path/%.exe/}"
19714    # Do not save /bin paths to all_fixpath_prefixes!
19715  else
19716    # Not in mixed or Windows style, start by that.
19717    new_path=`cmd //c echo $new_path`
19718
19719  input_path="$new_path"
19720  # Check if we need to convert this using DOS-style short mode. If the path
19721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19722  # take no chances and rewrite it.
19723  # Note: m4 eats our [], so we need to use [ and ] instead.
19724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19725  if test "x$has_forbidden_chars" != x; then
19726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19728  fi
19729
19730    # Output is in $new_path
19731
19732  windows_path="$new_path"
19733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19734    unix_path=`$CYGPATH -u "$windows_path"`
19735    new_path="$unix_path"
19736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19738    new_path="$unix_path"
19739  fi
19740
19741    # remove trailing .exe if any
19742    new_path="${new_path/%.exe/}"
19743
19744    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19745    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19746  fi
19747
19748    else
19749      # We're on a unix platform. Hooray! :)
19750      # First separate the path from the arguments. This will split at the first
19751      # space.
19752      complete="$FOUND_MAKE"
19753      path="${complete%% *}"
19754      tmp="$complete EOL"
19755      arguments="${tmp#* }"
19756
19757      # Cannot rely on the command "which" here since it doesn't always work.
19758      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19759      if test -z "$is_absolute_path"; then
19760        # Path to executable is not absolute. Find it.
19761        IFS_save="$IFS"
19762        IFS=:
19763        for p in $PATH; do
19764          if test -f "$p/$path" && test -x "$p/$path"; then
19765            new_path="$p/$path"
19766            break
19767          fi
19768        done
19769        IFS="$IFS_save"
19770      else
19771        # This is an absolute path, we can use it without further modifications.
19772        new_path="$path"
19773      fi
19774
19775      if test "x$new_path" = x; then
19776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19777$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19778        has_space=`$ECHO "$complete" | $GREP " "`
19779        if test "x$has_space" != x; then
19780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19782        fi
19783        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19784      fi
19785    fi
19786
19787    # Now join together the path and the arguments once again
19788    if test "x$arguments" != xEOL; then
19789      new_complete="$new_path ${arguments% *}"
19790    else
19791      new_complete="$new_path"
19792    fi
19793
19794    if test "x$complete" != "x$new_complete"; then
19795      FOUND_MAKE="$new_complete"
19796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19797$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19798    fi
19799  fi
19800
19801        fi
19802      fi
19803    fi
19804  fi
19805
19806        if test "x$FOUND_MAKE" = x; then
19807          for ac_prog in make
19808do
19809  # Extract the first word of "$ac_prog", so it can be a program name with args.
19810set dummy $ac_prog; ac_word=$2
19811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19812$as_echo_n "checking for $ac_word... " >&6; }
19813if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19814  $as_echo_n "(cached) " >&6
19815else
19816  case $CHECK_TOOLSDIR_MAKE in
19817  [\\/]* | ?:[\\/]*)
19818  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19819  ;;
19820  *)
19821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19822for as_dir in $PATH
19823do
19824  IFS=$as_save_IFS
19825  test -z "$as_dir" && as_dir=.
19826    for ac_exec_ext in '' $ac_executable_extensions; do
19827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19828    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19830    break 2
19831  fi
19832done
19833  done
19834IFS=$as_save_IFS
19835
19836  ;;
19837esac
19838fi
19839CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19840if test -n "$CHECK_TOOLSDIR_MAKE"; then
19841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19842$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19843else
19844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19845$as_echo "no" >&6; }
19846fi
19847
19848
19849  test -n "$CHECK_TOOLSDIR_MAKE" && break
19850done
19851
19852
19853  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19854  DESCRIPTION="make in tools-dir"
19855
19856  # On Cygwin, we require a newer version of make than on other platforms
19857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19858    MAKE_VERSION_EXPR="-e 4\."
19859    MAKE_REQUIRED_VERSION="4.0"
19860   else
19861    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19862    MAKE_REQUIRED_VERSION="3.81"
19863  fi
19864
19865  if test "x$MAKE_CANDIDATE" != x; then
19866    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19867$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19868    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19869    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19870    if test "x$IS_GNU_MAKE" = x; then
19871      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19872$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19873    else
19874      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19875      if test "x$IS_MODERN_MAKE" = x; then
19876        { $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
19877$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;}
19878      else
19879        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19880          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19881            MAKE_EXPECTED_ENV='cygwin'
19882          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19883            MAKE_EXPECTED_ENV='msys'
19884          else
19885            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19886          fi
19887          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19888          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19889        else
19890          # Not relevant for non-Windows
19891          IS_MAKE_CORRECT_ENV=true
19892        fi
19893        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19894          { $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
19895$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;}
19896        else
19897          FOUND_MAKE=$MAKE_CANDIDATE
19898
19899  # Only process if variable expands to non-empty
19900
19901  if test "x$FOUND_MAKE" != x; then
19902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19903
19904  # First separate the path from the arguments. This will split at the first
19905  # space.
19906  complete="$FOUND_MAKE"
19907  path="${complete%% *}"
19908  tmp="$complete EOL"
19909  arguments="${tmp#* }"
19910
19911  # Input might be given as Windows format, start by converting to
19912  # unix format.
19913  new_path=`$CYGPATH -u "$path"`
19914
19915  # Now try to locate executable using which
19916  new_path=`$WHICH "$new_path" 2> /dev/null`
19917  # bat and cmd files are not always considered executable in cygwin causing which
19918  # to not find them
19919  if test "x$new_path" = x \
19920      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19921      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19922    new_path=`$CYGPATH -u "$path"`
19923  fi
19924  if test "x$new_path" = x; then
19925    # Oops. Which didn't find the executable.
19926    # The splitting of arguments from the executable at a space might have been incorrect,
19927    # since paths with space are more likely in Windows. Give it another try with the whole
19928    # argument.
19929    path="$complete"
19930    arguments="EOL"
19931    new_path=`$CYGPATH -u "$path"`
19932    new_path=`$WHICH "$new_path" 2> /dev/null`
19933    # bat and cmd files are not always considered executable in cygwin causing which
19934    # to not find them
19935    if test "x$new_path" = x \
19936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19938      new_path=`$CYGPATH -u "$path"`
19939    fi
19940    if test "x$new_path" = x; then
19941      # It's still not found. Now this is an unrecoverable error.
19942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19943$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19944      has_space=`$ECHO "$complete" | $GREP " "`
19945      if test "x$has_space" != x; then
19946        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19947$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19948      fi
19949      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19950    fi
19951  fi
19952
19953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19956  # "foo.exe" is OK but "foo" is an error.
19957  #
19958  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19959  # It is also a way to make sure we got the proper file name for the real test later on.
19960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19961  if test "x$test_shortpath" = x; then
19962    # Short path failed, file does not exist as specified.
19963    # Try adding .exe or .cmd
19964    if test -f "${new_path}.exe"; then
19965      input_to_shortpath="${new_path}.exe"
19966    elif test -f "${new_path}.cmd"; then
19967      input_to_shortpath="${new_path}.cmd"
19968    else
19969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19970$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19971      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19972$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19973      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19974    fi
19975  else
19976    input_to_shortpath="$new_path"
19977  fi
19978
19979  # Call helper function which possibly converts this using DOS-style short mode.
19980  # If so, the updated path is stored in $new_path.
19981  new_path="$input_to_shortpath"
19982
19983  input_path="$input_to_shortpath"
19984  # Check if we need to convert this using DOS-style short mode. If the path
19985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19986  # take no chances and rewrite it.
19987  # Note: m4 eats our [], so we need to use [ and ] instead.
19988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19989  if test "x$has_forbidden_chars" != x; then
19990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19994      # Going to short mode and back again did indeed matter. Since short mode is
19995      # case insensitive, let's make it lowercase to improve readability.
19996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19997      # Now convert it back to Unix-style (cygpath)
19998      input_path=`$CYGPATH -u "$shortmode_path"`
19999      new_path="$input_path"
20000    fi
20001  fi
20002
20003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20004  if test "x$test_cygdrive_prefix" = x; then
20005    # As a simple fix, exclude /usr/bin since it's not a real path.
20006    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20008      # a path prefixed by /cygdrive for fixpath to work.
20009      new_path="$CYGWIN_ROOT_PATH$input_path"
20010    fi
20011  fi
20012
20013  # remove trailing .exe if any
20014  new_path="${new_path/%.exe/}"
20015
20016    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20017
20018  # First separate the path from the arguments. This will split at the first
20019  # space.
20020  complete="$FOUND_MAKE"
20021  path="${complete%% *}"
20022  tmp="$complete EOL"
20023  arguments="${tmp#* }"
20024
20025  # Input might be given as Windows format, start by converting to
20026  # unix format.
20027  new_path="$path"
20028
20029  windows_path="$new_path"
20030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20031    unix_path=`$CYGPATH -u "$windows_path"`
20032    new_path="$unix_path"
20033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20035    new_path="$unix_path"
20036  fi
20037
20038
20039  # Now try to locate executable using which
20040  new_path=`$WHICH "$new_path" 2> /dev/null`
20041
20042  if test "x$new_path" = x; then
20043    # Oops. Which didn't find the executable.
20044    # The splitting of arguments from the executable at a space might have been incorrect,
20045    # since paths with space are more likely in Windows. Give it another try with the whole
20046    # argument.
20047    path="$complete"
20048    arguments="EOL"
20049    new_path="$path"
20050
20051  windows_path="$new_path"
20052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20053    unix_path=`$CYGPATH -u "$windows_path"`
20054    new_path="$unix_path"
20055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20057    new_path="$unix_path"
20058  fi
20059
20060
20061    new_path=`$WHICH "$new_path" 2> /dev/null`
20062    # bat and cmd files are not always considered executable in MSYS causing which
20063    # to not find them
20064    if test "x$new_path" = x \
20065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20067      new_path="$path"
20068
20069  windows_path="$new_path"
20070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20071    unix_path=`$CYGPATH -u "$windows_path"`
20072    new_path="$unix_path"
20073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20075    new_path="$unix_path"
20076  fi
20077
20078    fi
20079
20080    if test "x$new_path" = x; then
20081      # It's still not found. Now this is an unrecoverable error.
20082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20083$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20084      has_space=`$ECHO "$complete" | $GREP " "`
20085      if test "x$has_space" != x; then
20086        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20087$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20088      fi
20089      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20090    fi
20091  fi
20092
20093  # Now new_path has a complete unix path to the binary
20094  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20095    # Keep paths in /bin as-is, but remove trailing .exe if any
20096    new_path="${new_path/%.exe/}"
20097    # Do not save /bin paths to all_fixpath_prefixes!
20098  else
20099    # Not in mixed or Windows style, start by that.
20100    new_path=`cmd //c echo $new_path`
20101
20102  input_path="$new_path"
20103  # Check if we need to convert this using DOS-style short mode. If the path
20104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20105  # take no chances and rewrite it.
20106  # Note: m4 eats our [], so we need to use [ and ] instead.
20107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20108  if test "x$has_forbidden_chars" != x; then
20109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20111  fi
20112
20113    # Output is in $new_path
20114
20115  windows_path="$new_path"
20116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20117    unix_path=`$CYGPATH -u "$windows_path"`
20118    new_path="$unix_path"
20119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20121    new_path="$unix_path"
20122  fi
20123
20124    # remove trailing .exe if any
20125    new_path="${new_path/%.exe/}"
20126
20127    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20128    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20129  fi
20130
20131    else
20132      # We're on a unix platform. Hooray! :)
20133      # First separate the path from the arguments. This will split at the first
20134      # space.
20135      complete="$FOUND_MAKE"
20136      path="${complete%% *}"
20137      tmp="$complete EOL"
20138      arguments="${tmp#* }"
20139
20140      # Cannot rely on the command "which" here since it doesn't always work.
20141      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20142      if test -z "$is_absolute_path"; then
20143        # Path to executable is not absolute. Find it.
20144        IFS_save="$IFS"
20145        IFS=:
20146        for p in $PATH; do
20147          if test -f "$p/$path" && test -x "$p/$path"; then
20148            new_path="$p/$path"
20149            break
20150          fi
20151        done
20152        IFS="$IFS_save"
20153      else
20154        # This is an absolute path, we can use it without further modifications.
20155        new_path="$path"
20156      fi
20157
20158      if test "x$new_path" = x; then
20159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20161        has_space=`$ECHO "$complete" | $GREP " "`
20162        if test "x$has_space" != x; then
20163          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20164$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20165        fi
20166        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20167      fi
20168    fi
20169
20170    # Now join together the path and the arguments once again
20171    if test "x$arguments" != xEOL; then
20172      new_complete="$new_path ${arguments% *}"
20173    else
20174      new_complete="$new_path"
20175    fi
20176
20177    if test "x$complete" != "x$new_complete"; then
20178      FOUND_MAKE="$new_complete"
20179      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20180$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20181    fi
20182  fi
20183
20184        fi
20185      fi
20186    fi
20187  fi
20188
20189        fi
20190        PATH=$OLD_PATH
20191      fi
20192    fi
20193
20194    if test "x$FOUND_MAKE" = x; then
20195      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
20196    fi
20197
20198    else
20199      # If it succeeded, then it was overridden by the user. We will use it
20200      # for the tool.
20201
20202      # First remove it from the list of overridden variables, so we can test
20203      # for unknown variables in the end.
20204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20205
20206      # Check if we try to supply an empty value
20207      if test "x$MAKE" = x; then
20208        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20209$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20210        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20211$as_echo_n "checking for MAKE... " >&6; }
20212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20213$as_echo "disabled" >&6; }
20214      else
20215        # Check if the provided tool contains a complete path.
20216        tool_specified="$MAKE"
20217        tool_basename="${tool_specified##*/}"
20218        if test "x$tool_basename" = "x$tool_specified"; then
20219          # A command without a complete path is provided, search $PATH.
20220          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20221$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20222          # Extract the first word of "$tool_basename", so it can be a program name with args.
20223set dummy $tool_basename; ac_word=$2
20224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20225$as_echo_n "checking for $ac_word... " >&6; }
20226if ${ac_cv_path_MAKE+:} false; then :
20227  $as_echo_n "(cached) " >&6
20228else
20229  case $MAKE in
20230  [\\/]* | ?:[\\/]*)
20231  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20232  ;;
20233  *)
20234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20235for as_dir in $PATH
20236do
20237  IFS=$as_save_IFS
20238  test -z "$as_dir" && as_dir=.
20239    for ac_exec_ext in '' $ac_executable_extensions; do
20240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20241    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20243    break 2
20244  fi
20245done
20246  done
20247IFS=$as_save_IFS
20248
20249  ;;
20250esac
20251fi
20252MAKE=$ac_cv_path_MAKE
20253if test -n "$MAKE"; then
20254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20255$as_echo "$MAKE" >&6; }
20256else
20257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20258$as_echo "no" >&6; }
20259fi
20260
20261
20262          if test "x$MAKE" = x; then
20263            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20264          fi
20265        else
20266          # Otherwise we believe it is a complete path. Use it as it is.
20267          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20268$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20269          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20270$as_echo_n "checking for MAKE... " >&6; }
20271          if test ! -x "$tool_specified"; then
20272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20273$as_echo "not found" >&6; }
20274            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20275          fi
20276          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20277$as_echo "$tool_specified" >&6; }
20278        fi
20279      fi
20280    fi
20281
20282    # If MAKE was set by user, verify the version
20283
20284  MAKE_CANDIDATE=""$MAKE""
20285  DESCRIPTION="user supplied MAKE=$MAKE"
20286
20287  # On Cygwin, we require a newer version of make than on other platforms
20288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20289    MAKE_VERSION_EXPR="-e 4\."
20290    MAKE_REQUIRED_VERSION="4.0"
20291   else
20292    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20293    MAKE_REQUIRED_VERSION="3.81"
20294  fi
20295
20296  if test "x$MAKE_CANDIDATE" != x; then
20297    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20298$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20299    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20300    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20301    if test "x$IS_GNU_MAKE" = x; then
20302      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20303$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20304    else
20305      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20306      if test "x$IS_MODERN_MAKE" = x; then
20307        { $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
20308$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;}
20309      else
20310        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20311          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20312            MAKE_EXPECTED_ENV='cygwin'
20313          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20314            MAKE_EXPECTED_ENV='msys'
20315          else
20316            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20317          fi
20318          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20319          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20320        else
20321          # Not relevant for non-Windows
20322          IS_MAKE_CORRECT_ENV=true
20323        fi
20324        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20325          { $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
20326$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;}
20327        else
20328          FOUND_MAKE=$MAKE_CANDIDATE
20329
20330  # Only process if variable expands to non-empty
20331
20332  if test "x$FOUND_MAKE" != x; then
20333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20334
20335  # First separate the path from the arguments. This will split at the first
20336  # space.
20337  complete="$FOUND_MAKE"
20338  path="${complete%% *}"
20339  tmp="$complete EOL"
20340  arguments="${tmp#* }"
20341
20342  # Input might be given as Windows format, start by converting to
20343  # unix format.
20344  new_path=`$CYGPATH -u "$path"`
20345
20346  # Now try to locate executable using which
20347  new_path=`$WHICH "$new_path" 2> /dev/null`
20348  # bat and cmd files are not always considered executable in cygwin causing which
20349  # to not find them
20350  if test "x$new_path" = x \
20351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20353    new_path=`$CYGPATH -u "$path"`
20354  fi
20355  if test "x$new_path" = x; then
20356    # Oops. Which didn't find the executable.
20357    # The splitting of arguments from the executable at a space might have been incorrect,
20358    # since paths with space are more likely in Windows. Give it another try with the whole
20359    # argument.
20360    path="$complete"
20361    arguments="EOL"
20362    new_path=`$CYGPATH -u "$path"`
20363    new_path=`$WHICH "$new_path" 2> /dev/null`
20364    # bat and cmd files are not always considered executable in cygwin causing which
20365    # to not find them
20366    if test "x$new_path" = x \
20367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20369      new_path=`$CYGPATH -u "$path"`
20370    fi
20371    if test "x$new_path" = x; then
20372      # It's still not found. Now this is an unrecoverable error.
20373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20374$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20375      has_space=`$ECHO "$complete" | $GREP " "`
20376      if test "x$has_space" != x; then
20377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20379      fi
20380      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20381    fi
20382  fi
20383
20384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20387  # "foo.exe" is OK but "foo" is an error.
20388  #
20389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20390  # It is also a way to make sure we got the proper file name for the real test later on.
20391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20392  if test "x$test_shortpath" = x; then
20393    # Short path failed, file does not exist as specified.
20394    # Try adding .exe or .cmd
20395    if test -f "${new_path}.exe"; then
20396      input_to_shortpath="${new_path}.exe"
20397    elif test -f "${new_path}.cmd"; then
20398      input_to_shortpath="${new_path}.cmd"
20399    else
20400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20401$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20405    fi
20406  else
20407    input_to_shortpath="$new_path"
20408  fi
20409
20410  # Call helper function which possibly converts this using DOS-style short mode.
20411  # If so, the updated path is stored in $new_path.
20412  new_path="$input_to_shortpath"
20413
20414  input_path="$input_to_shortpath"
20415  # Check if we need to convert this using DOS-style short mode. If the path
20416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20417  # take no chances and rewrite it.
20418  # Note: m4 eats our [], so we need to use [ and ] instead.
20419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20420  if test "x$has_forbidden_chars" != x; then
20421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20425      # Going to short mode and back again did indeed matter. Since short mode is
20426      # case insensitive, let's make it lowercase to improve readability.
20427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20428      # Now convert it back to Unix-style (cygpath)
20429      input_path=`$CYGPATH -u "$shortmode_path"`
20430      new_path="$input_path"
20431    fi
20432  fi
20433
20434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20435  if test "x$test_cygdrive_prefix" = x; then
20436    # As a simple fix, exclude /usr/bin since it's not a real path.
20437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20439      # a path prefixed by /cygdrive for fixpath to work.
20440      new_path="$CYGWIN_ROOT_PATH$input_path"
20441    fi
20442  fi
20443
20444  # remove trailing .exe if any
20445  new_path="${new_path/%.exe/}"
20446
20447    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20448
20449  # First separate the path from the arguments. This will split at the first
20450  # space.
20451  complete="$FOUND_MAKE"
20452  path="${complete%% *}"
20453  tmp="$complete EOL"
20454  arguments="${tmp#* }"
20455
20456  # Input might be given as Windows format, start by converting to
20457  # unix format.
20458  new_path="$path"
20459
20460  windows_path="$new_path"
20461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20462    unix_path=`$CYGPATH -u "$windows_path"`
20463    new_path="$unix_path"
20464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20466    new_path="$unix_path"
20467  fi
20468
20469
20470  # Now try to locate executable using which
20471  new_path=`$WHICH "$new_path" 2> /dev/null`
20472
20473  if test "x$new_path" = x; then
20474    # Oops. Which didn't find the executable.
20475    # The splitting of arguments from the executable at a space might have been incorrect,
20476    # since paths with space are more likely in Windows. Give it another try with the whole
20477    # argument.
20478    path="$complete"
20479    arguments="EOL"
20480    new_path="$path"
20481
20482  windows_path="$new_path"
20483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20484    unix_path=`$CYGPATH -u "$windows_path"`
20485    new_path="$unix_path"
20486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20488    new_path="$unix_path"
20489  fi
20490
20491
20492    new_path=`$WHICH "$new_path" 2> /dev/null`
20493    # bat and cmd files are not always considered executable in MSYS causing which
20494    # to not find them
20495    if test "x$new_path" = x \
20496        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20497        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20498      new_path="$path"
20499
20500  windows_path="$new_path"
20501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20502    unix_path=`$CYGPATH -u "$windows_path"`
20503    new_path="$unix_path"
20504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20505    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20506    new_path="$unix_path"
20507  fi
20508
20509    fi
20510
20511    if test "x$new_path" = x; then
20512      # It's still not found. Now this is an unrecoverable error.
20513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20515      has_space=`$ECHO "$complete" | $GREP " "`
20516      if test "x$has_space" != x; then
20517        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20518$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20519      fi
20520      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20521    fi
20522  fi
20523
20524  # Now new_path has a complete unix path to the binary
20525  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20526    # Keep paths in /bin as-is, but remove trailing .exe if any
20527    new_path="${new_path/%.exe/}"
20528    # Do not save /bin paths to all_fixpath_prefixes!
20529  else
20530    # Not in mixed or Windows style, start by that.
20531    new_path=`cmd //c echo $new_path`
20532
20533  input_path="$new_path"
20534  # Check if we need to convert this using DOS-style short mode. If the path
20535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20536  # take no chances and rewrite it.
20537  # Note: m4 eats our [], so we need to use [ and ] instead.
20538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20539  if test "x$has_forbidden_chars" != x; then
20540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20541    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20542  fi
20543
20544    # Output is in $new_path
20545
20546  windows_path="$new_path"
20547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20548    unix_path=`$CYGPATH -u "$windows_path"`
20549    new_path="$unix_path"
20550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20552    new_path="$unix_path"
20553  fi
20554
20555    # remove trailing .exe if any
20556    new_path="${new_path/%.exe/}"
20557
20558    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20559    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20560  fi
20561
20562    else
20563      # We're on a unix platform. Hooray! :)
20564      # First separate the path from the arguments. This will split at the first
20565      # space.
20566      complete="$FOUND_MAKE"
20567      path="${complete%% *}"
20568      tmp="$complete EOL"
20569      arguments="${tmp#* }"
20570
20571      # Cannot rely on the command "which" here since it doesn't always work.
20572      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20573      if test -z "$is_absolute_path"; then
20574        # Path to executable is not absolute. Find it.
20575        IFS_save="$IFS"
20576        IFS=:
20577        for p in $PATH; do
20578          if test -f "$p/$path" && test -x "$p/$path"; then
20579            new_path="$p/$path"
20580            break
20581          fi
20582        done
20583        IFS="$IFS_save"
20584      else
20585        # This is an absolute path, we can use it without further modifications.
20586        new_path="$path"
20587      fi
20588
20589      if test "x$new_path" = x; then
20590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20592        has_space=`$ECHO "$complete" | $GREP " "`
20593        if test "x$has_space" != x; then
20594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20596        fi
20597        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20598      fi
20599    fi
20600
20601    # Now join together the path and the arguments once again
20602    if test "x$arguments" != xEOL; then
20603      new_complete="$new_path ${arguments% *}"
20604    else
20605      new_complete="$new_path"
20606    fi
20607
20608    if test "x$complete" != "x$new_complete"; then
20609      FOUND_MAKE="$new_complete"
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20611$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20612    fi
20613  fi
20614
20615        fi
20616      fi
20617    fi
20618  fi
20619
20620    if test "x$FOUND_MAKE" = x; then
20621      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20622    fi
20623
20624  fi
20625
20626
20627  MAKE=$FOUND_MAKE
20628
20629  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20630$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20631
20632
20633  # Check if make supports the output sync option and if so, setup using it.
20634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20635$as_echo_n "checking if make --output-sync is supported... " >&6; }
20636  if $MAKE --version -O > /dev/null 2>&1; then
20637    OUTPUT_SYNC_SUPPORTED=true
20638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20639$as_echo "yes" >&6; }
20640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20641$as_echo_n "checking for output-sync value... " >&6; }
20642
20643# Check whether --with-output-sync was given.
20644if test "${with_output_sync+set}" = set; then :
20645  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20646fi
20647
20648    if test "x$OUTPUT_SYNC" = "x"; then
20649      OUTPUT_SYNC=none
20650    fi
20651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20652$as_echo "$OUTPUT_SYNC" >&6; }
20653    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20654      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20655    fi
20656  else
20657    OUTPUT_SYNC_SUPPORTED=false
20658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20659$as_echo "no" >&6; }
20660  fi
20661
20662
20663
20664
20665
20666
20667  # Test if find supports -delete
20668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20669$as_echo_n "checking if find supports -delete... " >&6; }
20670  FIND_DELETE="-delete"
20671
20672  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20673
20674  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20675
20676  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20677  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20678    # No, it does not.
20679    rm $DELETEDIR/TestIfFindSupportsDelete
20680    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20681      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20682      FIND_DELETE="-print | xargs rm"
20683    else
20684      FIND_DELETE="-exec rm \{\} \+"
20685    fi
20686    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20687$as_echo "no" >&6; }
20688  else
20689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20690$as_echo "yes" >&6; }
20691  fi
20692  rmdir $DELETEDIR
20693
20694
20695
20696  # These tools might not be installed by default,
20697  # need hint on how to install them.
20698
20699
20700
20701  # Publish this variable in the help.
20702
20703
20704  if [ -z "${UNZIP+x}" ]; then
20705    # The variable is not set by user, try to locate tool using the code snippet
20706    for ac_prog in unzip
20707do
20708  # Extract the first word of "$ac_prog", so it can be a program name with args.
20709set dummy $ac_prog; ac_word=$2
20710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20711$as_echo_n "checking for $ac_word... " >&6; }
20712if ${ac_cv_path_UNZIP+:} false; then :
20713  $as_echo_n "(cached) " >&6
20714else
20715  case $UNZIP in
20716  [\\/]* | ?:[\\/]*)
20717  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20718  ;;
20719  *)
20720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20721for as_dir in $PATH
20722do
20723  IFS=$as_save_IFS
20724  test -z "$as_dir" && as_dir=.
20725    for ac_exec_ext in '' $ac_executable_extensions; do
20726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20727    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20729    break 2
20730  fi
20731done
20732  done
20733IFS=$as_save_IFS
20734
20735  ;;
20736esac
20737fi
20738UNZIP=$ac_cv_path_UNZIP
20739if test -n "$UNZIP"; then
20740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20741$as_echo "$UNZIP" >&6; }
20742else
20743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20744$as_echo "no" >&6; }
20745fi
20746
20747
20748  test -n "$UNZIP" && break
20749done
20750
20751  else
20752    # The variable is set, but is it from the command line or the environment?
20753
20754    # Try to remove the string !UNZIP! from our list.
20755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20757      # If it failed, the variable was not from the command line. Ignore it,
20758      # but warn the user (except for BASH, which is always set by the calling BASH).
20759      if test "xUNZIP" != xBASH; then
20760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20761$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20762      fi
20763      # Try to locate tool using the code snippet
20764      for ac_prog in unzip
20765do
20766  # Extract the first word of "$ac_prog", so it can be a program name with args.
20767set dummy $ac_prog; ac_word=$2
20768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20769$as_echo_n "checking for $ac_word... " >&6; }
20770if ${ac_cv_path_UNZIP+:} false; then :
20771  $as_echo_n "(cached) " >&6
20772else
20773  case $UNZIP in
20774  [\\/]* | ?:[\\/]*)
20775  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20776  ;;
20777  *)
20778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20779for as_dir in $PATH
20780do
20781  IFS=$as_save_IFS
20782  test -z "$as_dir" && as_dir=.
20783    for ac_exec_ext in '' $ac_executable_extensions; do
20784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20785    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20787    break 2
20788  fi
20789done
20790  done
20791IFS=$as_save_IFS
20792
20793  ;;
20794esac
20795fi
20796UNZIP=$ac_cv_path_UNZIP
20797if test -n "$UNZIP"; then
20798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20799$as_echo "$UNZIP" >&6; }
20800else
20801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20802$as_echo "no" >&6; }
20803fi
20804
20805
20806  test -n "$UNZIP" && break
20807done
20808
20809    else
20810      # If it succeeded, then it was overridden by the user. We will use it
20811      # for the tool.
20812
20813      # First remove it from the list of overridden variables, so we can test
20814      # for unknown variables in the end.
20815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20816
20817      # Check if we try to supply an empty value
20818      if test "x$UNZIP" = x; then
20819        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20820$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20822$as_echo_n "checking for UNZIP... " >&6; }
20823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20824$as_echo "disabled" >&6; }
20825      else
20826        # Check if the provided tool contains a complete path.
20827        tool_specified="$UNZIP"
20828        tool_basename="${tool_specified##*/}"
20829        if test "x$tool_basename" = "x$tool_specified"; then
20830          # A command without a complete path is provided, search $PATH.
20831          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20832$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20833          # Extract the first word of "$tool_basename", so it can be a program name with args.
20834set dummy $tool_basename; ac_word=$2
20835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20836$as_echo_n "checking for $ac_word... " >&6; }
20837if ${ac_cv_path_UNZIP+:} false; then :
20838  $as_echo_n "(cached) " >&6
20839else
20840  case $UNZIP in
20841  [\\/]* | ?:[\\/]*)
20842  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20843  ;;
20844  *)
20845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20846for as_dir in $PATH
20847do
20848  IFS=$as_save_IFS
20849  test -z "$as_dir" && as_dir=.
20850    for ac_exec_ext in '' $ac_executable_extensions; do
20851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20852    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20854    break 2
20855  fi
20856done
20857  done
20858IFS=$as_save_IFS
20859
20860  ;;
20861esac
20862fi
20863UNZIP=$ac_cv_path_UNZIP
20864if test -n "$UNZIP"; then
20865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20866$as_echo "$UNZIP" >&6; }
20867else
20868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20869$as_echo "no" >&6; }
20870fi
20871
20872
20873          if test "x$UNZIP" = x; then
20874            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20875          fi
20876        else
20877          # Otherwise we believe it is a complete path. Use it as it is.
20878          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20879$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20880          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20881$as_echo_n "checking for UNZIP... " >&6; }
20882          if test ! -x "$tool_specified"; then
20883            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20884$as_echo "not found" >&6; }
20885            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20886          fi
20887          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20888$as_echo "$tool_specified" >&6; }
20889        fi
20890      fi
20891    fi
20892
20893  fi
20894
20895
20896
20897  if test "x$UNZIP" = x; then
20898    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20899  fi
20900
20901
20902
20903
20904
20905  # Publish this variable in the help.
20906
20907
20908  if [ -z "${ZIP+x}" ]; then
20909    # The variable is not set by user, try to locate tool using the code snippet
20910    for ac_prog in zip
20911do
20912  # Extract the first word of "$ac_prog", so it can be a program name with args.
20913set dummy $ac_prog; ac_word=$2
20914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20915$as_echo_n "checking for $ac_word... " >&6; }
20916if ${ac_cv_path_ZIP+:} false; then :
20917  $as_echo_n "(cached) " >&6
20918else
20919  case $ZIP in
20920  [\\/]* | ?:[\\/]*)
20921  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20922  ;;
20923  *)
20924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20925for as_dir in $PATH
20926do
20927  IFS=$as_save_IFS
20928  test -z "$as_dir" && as_dir=.
20929    for ac_exec_ext in '' $ac_executable_extensions; do
20930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20931    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20933    break 2
20934  fi
20935done
20936  done
20937IFS=$as_save_IFS
20938
20939  ;;
20940esac
20941fi
20942ZIP=$ac_cv_path_ZIP
20943if test -n "$ZIP"; then
20944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20945$as_echo "$ZIP" >&6; }
20946else
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20948$as_echo "no" >&6; }
20949fi
20950
20951
20952  test -n "$ZIP" && break
20953done
20954
20955  else
20956    # The variable is set, but is it from the command line or the environment?
20957
20958    # Try to remove the string !ZIP! from our list.
20959    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20960    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20961      # If it failed, the variable was not from the command line. Ignore it,
20962      # but warn the user (except for BASH, which is always set by the calling BASH).
20963      if test "xZIP" != xBASH; then
20964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20965$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20966      fi
20967      # Try to locate tool using the code snippet
20968      for ac_prog in zip
20969do
20970  # Extract the first word of "$ac_prog", so it can be a program name with args.
20971set dummy $ac_prog; ac_word=$2
20972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20973$as_echo_n "checking for $ac_word... " >&6; }
20974if ${ac_cv_path_ZIP+:} false; then :
20975  $as_echo_n "(cached) " >&6
20976else
20977  case $ZIP in
20978  [\\/]* | ?:[\\/]*)
20979  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20980  ;;
20981  *)
20982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20983for as_dir in $PATH
20984do
20985  IFS=$as_save_IFS
20986  test -z "$as_dir" && as_dir=.
20987    for ac_exec_ext in '' $ac_executable_extensions; do
20988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20989    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20991    break 2
20992  fi
20993done
20994  done
20995IFS=$as_save_IFS
20996
20997  ;;
20998esac
20999fi
21000ZIP=$ac_cv_path_ZIP
21001if test -n "$ZIP"; then
21002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21003$as_echo "$ZIP" >&6; }
21004else
21005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21006$as_echo "no" >&6; }
21007fi
21008
21009
21010  test -n "$ZIP" && break
21011done
21012
21013    else
21014      # If it succeeded, then it was overridden by the user. We will use it
21015      # for the tool.
21016
21017      # First remove it from the list of overridden variables, so we can test
21018      # for unknown variables in the end.
21019      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21020
21021      # Check if we try to supply an empty value
21022      if test "x$ZIP" = x; then
21023        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21024$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21025        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21026$as_echo_n "checking for ZIP... " >&6; }
21027        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21028$as_echo "disabled" >&6; }
21029      else
21030        # Check if the provided tool contains a complete path.
21031        tool_specified="$ZIP"
21032        tool_basename="${tool_specified##*/}"
21033        if test "x$tool_basename" = "x$tool_specified"; then
21034          # A command without a complete path is provided, search $PATH.
21035          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21036$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21037          # Extract the first word of "$tool_basename", so it can be a program name with args.
21038set dummy $tool_basename; ac_word=$2
21039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21040$as_echo_n "checking for $ac_word... " >&6; }
21041if ${ac_cv_path_ZIP+:} false; then :
21042  $as_echo_n "(cached) " >&6
21043else
21044  case $ZIP in
21045  [\\/]* | ?:[\\/]*)
21046  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21047  ;;
21048  *)
21049  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21050for as_dir in $PATH
21051do
21052  IFS=$as_save_IFS
21053  test -z "$as_dir" && as_dir=.
21054    for ac_exec_ext in '' $ac_executable_extensions; do
21055  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21056    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21058    break 2
21059  fi
21060done
21061  done
21062IFS=$as_save_IFS
21063
21064  ;;
21065esac
21066fi
21067ZIP=$ac_cv_path_ZIP
21068if test -n "$ZIP"; then
21069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21070$as_echo "$ZIP" >&6; }
21071else
21072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21073$as_echo "no" >&6; }
21074fi
21075
21076
21077          if test "x$ZIP" = x; then
21078            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21079          fi
21080        else
21081          # Otherwise we believe it is a complete path. Use it as it is.
21082          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21083$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21084          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21085$as_echo_n "checking for ZIP... " >&6; }
21086          if test ! -x "$tool_specified"; then
21087            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21088$as_echo "not found" >&6; }
21089            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21090          fi
21091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21092$as_echo "$tool_specified" >&6; }
21093        fi
21094      fi
21095    fi
21096
21097  fi
21098
21099
21100
21101  if test "x$ZIP" = x; then
21102    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21103  fi
21104
21105
21106
21107  # Non-required basic tools
21108
21109
21110
21111  # Publish this variable in the help.
21112
21113
21114  if [ -z "${LDD+x}" ]; then
21115    # The variable is not set by user, try to locate tool using the code snippet
21116    for ac_prog in ldd
21117do
21118  # Extract the first word of "$ac_prog", so it can be a program name with args.
21119set dummy $ac_prog; ac_word=$2
21120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21121$as_echo_n "checking for $ac_word... " >&6; }
21122if ${ac_cv_path_LDD+:} false; then :
21123  $as_echo_n "(cached) " >&6
21124else
21125  case $LDD in
21126  [\\/]* | ?:[\\/]*)
21127  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21128  ;;
21129  *)
21130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21131for as_dir in $PATH
21132do
21133  IFS=$as_save_IFS
21134  test -z "$as_dir" && as_dir=.
21135    for ac_exec_ext in '' $ac_executable_extensions; do
21136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21137    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21139    break 2
21140  fi
21141done
21142  done
21143IFS=$as_save_IFS
21144
21145  ;;
21146esac
21147fi
21148LDD=$ac_cv_path_LDD
21149if test -n "$LDD"; then
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21151$as_echo "$LDD" >&6; }
21152else
21153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21154$as_echo "no" >&6; }
21155fi
21156
21157
21158  test -n "$LDD" && break
21159done
21160
21161  else
21162    # The variable is set, but is it from the command line or the environment?
21163
21164    # Try to remove the string !LDD! from our list.
21165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21167      # If it failed, the variable was not from the command line. Ignore it,
21168      # but warn the user (except for BASH, which is always set by the calling BASH).
21169      if test "xLDD" != xBASH; then
21170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21171$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21172      fi
21173      # Try to locate tool using the code snippet
21174      for ac_prog in ldd
21175do
21176  # Extract the first word of "$ac_prog", so it can be a program name with args.
21177set dummy $ac_prog; ac_word=$2
21178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21179$as_echo_n "checking for $ac_word... " >&6; }
21180if ${ac_cv_path_LDD+:} false; then :
21181  $as_echo_n "(cached) " >&6
21182else
21183  case $LDD in
21184  [\\/]* | ?:[\\/]*)
21185  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21186  ;;
21187  *)
21188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21189for as_dir in $PATH
21190do
21191  IFS=$as_save_IFS
21192  test -z "$as_dir" && as_dir=.
21193    for ac_exec_ext in '' $ac_executable_extensions; do
21194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21195    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21197    break 2
21198  fi
21199done
21200  done
21201IFS=$as_save_IFS
21202
21203  ;;
21204esac
21205fi
21206LDD=$ac_cv_path_LDD
21207if test -n "$LDD"; then
21208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21209$as_echo "$LDD" >&6; }
21210else
21211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21212$as_echo "no" >&6; }
21213fi
21214
21215
21216  test -n "$LDD" && break
21217done
21218
21219    else
21220      # If it succeeded, then it was overridden by the user. We will use it
21221      # for the tool.
21222
21223      # First remove it from the list of overridden variables, so we can test
21224      # for unknown variables in the end.
21225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21226
21227      # Check if we try to supply an empty value
21228      if test "x$LDD" = x; then
21229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21230$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21232$as_echo_n "checking for LDD... " >&6; }
21233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21234$as_echo "disabled" >&6; }
21235      else
21236        # Check if the provided tool contains a complete path.
21237        tool_specified="$LDD"
21238        tool_basename="${tool_specified##*/}"
21239        if test "x$tool_basename" = "x$tool_specified"; then
21240          # A command without a complete path is provided, search $PATH.
21241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21242$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21243          # Extract the first word of "$tool_basename", so it can be a program name with args.
21244set dummy $tool_basename; ac_word=$2
21245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21246$as_echo_n "checking for $ac_word... " >&6; }
21247if ${ac_cv_path_LDD+:} false; then :
21248  $as_echo_n "(cached) " >&6
21249else
21250  case $LDD in
21251  [\\/]* | ?:[\\/]*)
21252  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21253  ;;
21254  *)
21255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256for as_dir in $PATH
21257do
21258  IFS=$as_save_IFS
21259  test -z "$as_dir" && as_dir=.
21260    for ac_exec_ext in '' $ac_executable_extensions; do
21261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21262    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264    break 2
21265  fi
21266done
21267  done
21268IFS=$as_save_IFS
21269
21270  ;;
21271esac
21272fi
21273LDD=$ac_cv_path_LDD
21274if test -n "$LDD"; then
21275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21276$as_echo "$LDD" >&6; }
21277else
21278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21279$as_echo "no" >&6; }
21280fi
21281
21282
21283          if test "x$LDD" = x; then
21284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21285          fi
21286        else
21287          # Otherwise we believe it is a complete path. Use it as it is.
21288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21289$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21291$as_echo_n "checking for LDD... " >&6; }
21292          if test ! -x "$tool_specified"; then
21293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21294$as_echo "not found" >&6; }
21295            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21296          fi
21297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21298$as_echo "$tool_specified" >&6; }
21299        fi
21300      fi
21301    fi
21302
21303  fi
21304
21305
21306  if test "x$LDD" = "x"; then
21307    # List shared lib dependencies is used for
21308    # debug output and checking for forbidden dependencies.
21309    # We can build without it.
21310    LDD="true"
21311  fi
21312
21313
21314  # Publish this variable in the help.
21315
21316
21317  if [ -z "${OTOOL+x}" ]; then
21318    # The variable is not set by user, try to locate tool using the code snippet
21319    for ac_prog in otool
21320do
21321  # Extract the first word of "$ac_prog", so it can be a program name with args.
21322set dummy $ac_prog; ac_word=$2
21323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21324$as_echo_n "checking for $ac_word... " >&6; }
21325if ${ac_cv_path_OTOOL+:} false; then :
21326  $as_echo_n "(cached) " >&6
21327else
21328  case $OTOOL in
21329  [\\/]* | ?:[\\/]*)
21330  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21331  ;;
21332  *)
21333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21334for as_dir in $PATH
21335do
21336  IFS=$as_save_IFS
21337  test -z "$as_dir" && as_dir=.
21338    for ac_exec_ext in '' $ac_executable_extensions; do
21339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21340    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21342    break 2
21343  fi
21344done
21345  done
21346IFS=$as_save_IFS
21347
21348  ;;
21349esac
21350fi
21351OTOOL=$ac_cv_path_OTOOL
21352if test -n "$OTOOL"; then
21353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21354$as_echo "$OTOOL" >&6; }
21355else
21356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21357$as_echo "no" >&6; }
21358fi
21359
21360
21361  test -n "$OTOOL" && break
21362done
21363
21364  else
21365    # The variable is set, but is it from the command line or the environment?
21366
21367    # Try to remove the string !OTOOL! from our list.
21368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21370      # If it failed, the variable was not from the command line. Ignore it,
21371      # but warn the user (except for BASH, which is always set by the calling BASH).
21372      if test "xOTOOL" != xBASH; then
21373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21374$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21375      fi
21376      # Try to locate tool using the code snippet
21377      for ac_prog in otool
21378do
21379  # Extract the first word of "$ac_prog", so it can be a program name with args.
21380set dummy $ac_prog; ac_word=$2
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21382$as_echo_n "checking for $ac_word... " >&6; }
21383if ${ac_cv_path_OTOOL+:} false; then :
21384  $as_echo_n "(cached) " >&6
21385else
21386  case $OTOOL in
21387  [\\/]* | ?:[\\/]*)
21388  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21389  ;;
21390  *)
21391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21392for as_dir in $PATH
21393do
21394  IFS=$as_save_IFS
21395  test -z "$as_dir" && as_dir=.
21396    for ac_exec_ext in '' $ac_executable_extensions; do
21397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21398    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21400    break 2
21401  fi
21402done
21403  done
21404IFS=$as_save_IFS
21405
21406  ;;
21407esac
21408fi
21409OTOOL=$ac_cv_path_OTOOL
21410if test -n "$OTOOL"; then
21411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21412$as_echo "$OTOOL" >&6; }
21413else
21414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21415$as_echo "no" >&6; }
21416fi
21417
21418
21419  test -n "$OTOOL" && break
21420done
21421
21422    else
21423      # If it succeeded, then it was overridden by the user. We will use it
21424      # for the tool.
21425
21426      # First remove it from the list of overridden variables, so we can test
21427      # for unknown variables in the end.
21428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21429
21430      # Check if we try to supply an empty value
21431      if test "x$OTOOL" = x; then
21432        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21433$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21435$as_echo_n "checking for OTOOL... " >&6; }
21436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21437$as_echo "disabled" >&6; }
21438      else
21439        # Check if the provided tool contains a complete path.
21440        tool_specified="$OTOOL"
21441        tool_basename="${tool_specified##*/}"
21442        if test "x$tool_basename" = "x$tool_specified"; then
21443          # A command without a complete path is provided, search $PATH.
21444          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21445$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21446          # Extract the first word of "$tool_basename", so it can be a program name with args.
21447set dummy $tool_basename; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_OTOOL+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $OTOOL in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476OTOOL=$ac_cv_path_OTOOL
21477if test -n "$OTOOL"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21479$as_echo "$OTOOL" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486          if test "x$OTOOL" = x; then
21487            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21488          fi
21489        else
21490          # Otherwise we believe it is a complete path. Use it as it is.
21491          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21492$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21493          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21494$as_echo_n "checking for OTOOL... " >&6; }
21495          if test ! -x "$tool_specified"; then
21496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21497$as_echo "not found" >&6; }
21498            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21499          fi
21500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21501$as_echo "$tool_specified" >&6; }
21502        fi
21503      fi
21504    fi
21505
21506  fi
21507
21508
21509  if test "x$OTOOL" = "x"; then
21510    OTOOL="true"
21511  fi
21512
21513
21514  # Publish this variable in the help.
21515
21516
21517  if [ -z "${READELF+x}" ]; then
21518    # The variable is not set by user, try to locate tool using the code snippet
21519    for ac_prog in greadelf readelf
21520do
21521  # Extract the first word of "$ac_prog", so it can be a program name with args.
21522set dummy $ac_prog; ac_word=$2
21523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21524$as_echo_n "checking for $ac_word... " >&6; }
21525if ${ac_cv_path_READELF+:} false; then :
21526  $as_echo_n "(cached) " >&6
21527else
21528  case $READELF in
21529  [\\/]* | ?:[\\/]*)
21530  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21531  ;;
21532  *)
21533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21534for as_dir in $PATH
21535do
21536  IFS=$as_save_IFS
21537  test -z "$as_dir" && as_dir=.
21538    for ac_exec_ext in '' $ac_executable_extensions; do
21539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21540    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21542    break 2
21543  fi
21544done
21545  done
21546IFS=$as_save_IFS
21547
21548  ;;
21549esac
21550fi
21551READELF=$ac_cv_path_READELF
21552if test -n "$READELF"; then
21553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21554$as_echo "$READELF" >&6; }
21555else
21556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21557$as_echo "no" >&6; }
21558fi
21559
21560
21561  test -n "$READELF" && break
21562done
21563
21564  else
21565    # The variable is set, but is it from the command line or the environment?
21566
21567    # Try to remove the string !READELF! from our list.
21568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21570      # If it failed, the variable was not from the command line. Ignore it,
21571      # but warn the user (except for BASH, which is always set by the calling BASH).
21572      if test "xREADELF" != xBASH; then
21573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21574$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21575      fi
21576      # Try to locate tool using the code snippet
21577      for ac_prog in greadelf readelf
21578do
21579  # Extract the first word of "$ac_prog", so it can be a program name with args.
21580set dummy $ac_prog; ac_word=$2
21581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21582$as_echo_n "checking for $ac_word... " >&6; }
21583if ${ac_cv_path_READELF+:} false; then :
21584  $as_echo_n "(cached) " >&6
21585else
21586  case $READELF in
21587  [\\/]* | ?:[\\/]*)
21588  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21589  ;;
21590  *)
21591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21592for as_dir in $PATH
21593do
21594  IFS=$as_save_IFS
21595  test -z "$as_dir" && as_dir=.
21596    for ac_exec_ext in '' $ac_executable_extensions; do
21597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21598    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21600    break 2
21601  fi
21602done
21603  done
21604IFS=$as_save_IFS
21605
21606  ;;
21607esac
21608fi
21609READELF=$ac_cv_path_READELF
21610if test -n "$READELF"; then
21611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21612$as_echo "$READELF" >&6; }
21613else
21614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21615$as_echo "no" >&6; }
21616fi
21617
21618
21619  test -n "$READELF" && break
21620done
21621
21622    else
21623      # If it succeeded, then it was overridden by the user. We will use it
21624      # for the tool.
21625
21626      # First remove it from the list of overridden variables, so we can test
21627      # for unknown variables in the end.
21628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21629
21630      # Check if we try to supply an empty value
21631      if test "x$READELF" = x; then
21632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21633$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21635$as_echo_n "checking for READELF... " >&6; }
21636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21637$as_echo "disabled" >&6; }
21638      else
21639        # Check if the provided tool contains a complete path.
21640        tool_specified="$READELF"
21641        tool_basename="${tool_specified##*/}"
21642        if test "x$tool_basename" = "x$tool_specified"; then
21643          # A command without a complete path is provided, search $PATH.
21644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21645$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21646          # Extract the first word of "$tool_basename", so it can be a program name with args.
21647set dummy $tool_basename; ac_word=$2
21648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21649$as_echo_n "checking for $ac_word... " >&6; }
21650if ${ac_cv_path_READELF+:} false; then :
21651  $as_echo_n "(cached) " >&6
21652else
21653  case $READELF in
21654  [\\/]* | ?:[\\/]*)
21655  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21656  ;;
21657  *)
21658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21659for as_dir in $PATH
21660do
21661  IFS=$as_save_IFS
21662  test -z "$as_dir" && as_dir=.
21663    for ac_exec_ext in '' $ac_executable_extensions; do
21664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21665    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21667    break 2
21668  fi
21669done
21670  done
21671IFS=$as_save_IFS
21672
21673  ;;
21674esac
21675fi
21676READELF=$ac_cv_path_READELF
21677if test -n "$READELF"; then
21678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21679$as_echo "$READELF" >&6; }
21680else
21681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21682$as_echo "no" >&6; }
21683fi
21684
21685
21686          if test "x$READELF" = x; then
21687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21688          fi
21689        else
21690          # Otherwise we believe it is a complete path. Use it as it is.
21691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21692$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21694$as_echo_n "checking for READELF... " >&6; }
21695          if test ! -x "$tool_specified"; then
21696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21697$as_echo "not found" >&6; }
21698            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21699          fi
21700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21701$as_echo "$tool_specified" >&6; }
21702        fi
21703      fi
21704    fi
21705
21706  fi
21707
21708
21709
21710
21711  # Publish this variable in the help.
21712
21713
21714  if [ -z "${HG+x}" ]; then
21715    # The variable is not set by user, try to locate tool using the code snippet
21716    for ac_prog in hg
21717do
21718  # Extract the first word of "$ac_prog", so it can be a program name with args.
21719set dummy $ac_prog; ac_word=$2
21720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21721$as_echo_n "checking for $ac_word... " >&6; }
21722if ${ac_cv_path_HG+:} false; then :
21723  $as_echo_n "(cached) " >&6
21724else
21725  case $HG in
21726  [\\/]* | ?:[\\/]*)
21727  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21728  ;;
21729  *)
21730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21731for as_dir in $PATH
21732do
21733  IFS=$as_save_IFS
21734  test -z "$as_dir" && as_dir=.
21735    for ac_exec_ext in '' $ac_executable_extensions; do
21736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21737    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21739    break 2
21740  fi
21741done
21742  done
21743IFS=$as_save_IFS
21744
21745  ;;
21746esac
21747fi
21748HG=$ac_cv_path_HG
21749if test -n "$HG"; then
21750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21751$as_echo "$HG" >&6; }
21752else
21753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21754$as_echo "no" >&6; }
21755fi
21756
21757
21758  test -n "$HG" && break
21759done
21760
21761  else
21762    # The variable is set, but is it from the command line or the environment?
21763
21764    # Try to remove the string !HG! from our list.
21765    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21766    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21767      # If it failed, the variable was not from the command line. Ignore it,
21768      # but warn the user (except for BASH, which is always set by the calling BASH).
21769      if test "xHG" != xBASH; then
21770        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21771$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21772      fi
21773      # Try to locate tool using the code snippet
21774      for ac_prog in hg
21775do
21776  # Extract the first word of "$ac_prog", so it can be a program name with args.
21777set dummy $ac_prog; ac_word=$2
21778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21779$as_echo_n "checking for $ac_word... " >&6; }
21780if ${ac_cv_path_HG+:} false; then :
21781  $as_echo_n "(cached) " >&6
21782else
21783  case $HG in
21784  [\\/]* | ?:[\\/]*)
21785  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21786  ;;
21787  *)
21788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21789for as_dir in $PATH
21790do
21791  IFS=$as_save_IFS
21792  test -z "$as_dir" && as_dir=.
21793    for ac_exec_ext in '' $ac_executable_extensions; do
21794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21795    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21797    break 2
21798  fi
21799done
21800  done
21801IFS=$as_save_IFS
21802
21803  ;;
21804esac
21805fi
21806HG=$ac_cv_path_HG
21807if test -n "$HG"; then
21808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21809$as_echo "$HG" >&6; }
21810else
21811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21812$as_echo "no" >&6; }
21813fi
21814
21815
21816  test -n "$HG" && break
21817done
21818
21819    else
21820      # If it succeeded, then it was overridden by the user. We will use it
21821      # for the tool.
21822
21823      # First remove it from the list of overridden variables, so we can test
21824      # for unknown variables in the end.
21825      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21826
21827      # Check if we try to supply an empty value
21828      if test "x$HG" = x; then
21829        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21830$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21831        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21832$as_echo_n "checking for HG... " >&6; }
21833        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21834$as_echo "disabled" >&6; }
21835      else
21836        # Check if the provided tool contains a complete path.
21837        tool_specified="$HG"
21838        tool_basename="${tool_specified##*/}"
21839        if test "x$tool_basename" = "x$tool_specified"; then
21840          # A command without a complete path is provided, search $PATH.
21841          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21842$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21843          # Extract the first word of "$tool_basename", so it can be a program name with args.
21844set dummy $tool_basename; ac_word=$2
21845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21846$as_echo_n "checking for $ac_word... " >&6; }
21847if ${ac_cv_path_HG+:} false; then :
21848  $as_echo_n "(cached) " >&6
21849else
21850  case $HG in
21851  [\\/]* | ?:[\\/]*)
21852  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21853  ;;
21854  *)
21855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21856for as_dir in $PATH
21857do
21858  IFS=$as_save_IFS
21859  test -z "$as_dir" && as_dir=.
21860    for ac_exec_ext in '' $ac_executable_extensions; do
21861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21862    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21864    break 2
21865  fi
21866done
21867  done
21868IFS=$as_save_IFS
21869
21870  ;;
21871esac
21872fi
21873HG=$ac_cv_path_HG
21874if test -n "$HG"; then
21875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21876$as_echo "$HG" >&6; }
21877else
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21879$as_echo "no" >&6; }
21880fi
21881
21882
21883          if test "x$HG" = x; then
21884            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21885          fi
21886        else
21887          # Otherwise we believe it is a complete path. Use it as it is.
21888          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21889$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21890          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21891$as_echo_n "checking for HG... " >&6; }
21892          if test ! -x "$tool_specified"; then
21893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21894$as_echo "not found" >&6; }
21895            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21896          fi
21897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21898$as_echo "$tool_specified" >&6; }
21899        fi
21900      fi
21901    fi
21902
21903  fi
21904
21905
21906
21907
21908  # Publish this variable in the help.
21909
21910
21911  if [ -z "${STAT+x}" ]; then
21912    # The variable is not set by user, try to locate tool using the code snippet
21913    for ac_prog in stat
21914do
21915  # Extract the first word of "$ac_prog", so it can be a program name with args.
21916set dummy $ac_prog; ac_word=$2
21917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21918$as_echo_n "checking for $ac_word... " >&6; }
21919if ${ac_cv_path_STAT+:} false; then :
21920  $as_echo_n "(cached) " >&6
21921else
21922  case $STAT in
21923  [\\/]* | ?:[\\/]*)
21924  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21925  ;;
21926  *)
21927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21928for as_dir in $PATH
21929do
21930  IFS=$as_save_IFS
21931  test -z "$as_dir" && as_dir=.
21932    for ac_exec_ext in '' $ac_executable_extensions; do
21933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21934    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21936    break 2
21937  fi
21938done
21939  done
21940IFS=$as_save_IFS
21941
21942  ;;
21943esac
21944fi
21945STAT=$ac_cv_path_STAT
21946if test -n "$STAT"; then
21947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21948$as_echo "$STAT" >&6; }
21949else
21950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21951$as_echo "no" >&6; }
21952fi
21953
21954
21955  test -n "$STAT" && break
21956done
21957
21958  else
21959    # The variable is set, but is it from the command line or the environment?
21960
21961    # Try to remove the string !STAT! from our list.
21962    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21963    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21964      # If it failed, the variable was not from the command line. Ignore it,
21965      # but warn the user (except for BASH, which is always set by the calling BASH).
21966      if test "xSTAT" != xBASH; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21968$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21969      fi
21970      # Try to locate tool using the code snippet
21971      for ac_prog in stat
21972do
21973  # Extract the first word of "$ac_prog", so it can be a program name with args.
21974set dummy $ac_prog; ac_word=$2
21975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21976$as_echo_n "checking for $ac_word... " >&6; }
21977if ${ac_cv_path_STAT+:} false; then :
21978  $as_echo_n "(cached) " >&6
21979else
21980  case $STAT in
21981  [\\/]* | ?:[\\/]*)
21982  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21983  ;;
21984  *)
21985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21986for as_dir in $PATH
21987do
21988  IFS=$as_save_IFS
21989  test -z "$as_dir" && as_dir=.
21990    for ac_exec_ext in '' $ac_executable_extensions; do
21991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21992    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21994    break 2
21995  fi
21996done
21997  done
21998IFS=$as_save_IFS
21999
22000  ;;
22001esac
22002fi
22003STAT=$ac_cv_path_STAT
22004if test -n "$STAT"; then
22005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22006$as_echo "$STAT" >&6; }
22007else
22008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22009$as_echo "no" >&6; }
22010fi
22011
22012
22013  test -n "$STAT" && break
22014done
22015
22016    else
22017      # If it succeeded, then it was overridden by the user. We will use it
22018      # for the tool.
22019
22020      # First remove it from the list of overridden variables, so we can test
22021      # for unknown variables in the end.
22022      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22023
22024      # Check if we try to supply an empty value
22025      if test "x$STAT" = x; then
22026        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22027$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22029$as_echo_n "checking for STAT... " >&6; }
22030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22031$as_echo "disabled" >&6; }
22032      else
22033        # Check if the provided tool contains a complete path.
22034        tool_specified="$STAT"
22035        tool_basename="${tool_specified##*/}"
22036        if test "x$tool_basename" = "x$tool_specified"; then
22037          # A command without a complete path is provided, search $PATH.
22038          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22039$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22040          # Extract the first word of "$tool_basename", so it can be a program name with args.
22041set dummy $tool_basename; ac_word=$2
22042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22043$as_echo_n "checking for $ac_word... " >&6; }
22044if ${ac_cv_path_STAT+:} false; then :
22045  $as_echo_n "(cached) " >&6
22046else
22047  case $STAT in
22048  [\\/]* | ?:[\\/]*)
22049  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22050  ;;
22051  *)
22052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22053for as_dir in $PATH
22054do
22055  IFS=$as_save_IFS
22056  test -z "$as_dir" && as_dir=.
22057    for ac_exec_ext in '' $ac_executable_extensions; do
22058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22059    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22061    break 2
22062  fi
22063done
22064  done
22065IFS=$as_save_IFS
22066
22067  ;;
22068esac
22069fi
22070STAT=$ac_cv_path_STAT
22071if test -n "$STAT"; then
22072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22073$as_echo "$STAT" >&6; }
22074else
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22076$as_echo "no" >&6; }
22077fi
22078
22079
22080          if test "x$STAT" = x; then
22081            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22082          fi
22083        else
22084          # Otherwise we believe it is a complete path. Use it as it is.
22085          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22086$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22087          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22088$as_echo_n "checking for STAT... " >&6; }
22089          if test ! -x "$tool_specified"; then
22090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22091$as_echo "not found" >&6; }
22092            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22093          fi
22094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22095$as_echo "$tool_specified" >&6; }
22096        fi
22097      fi
22098    fi
22099
22100  fi
22101
22102
22103
22104
22105  # Publish this variable in the help.
22106
22107
22108  if [ -z "${TIME+x}" ]; then
22109    # The variable is not set by user, try to locate tool using the code snippet
22110    for ac_prog in time
22111do
22112  # Extract the first word of "$ac_prog", so it can be a program name with args.
22113set dummy $ac_prog; ac_word=$2
22114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22115$as_echo_n "checking for $ac_word... " >&6; }
22116if ${ac_cv_path_TIME+:} false; then :
22117  $as_echo_n "(cached) " >&6
22118else
22119  case $TIME in
22120  [\\/]* | ?:[\\/]*)
22121  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22122  ;;
22123  *)
22124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22125for as_dir in $PATH
22126do
22127  IFS=$as_save_IFS
22128  test -z "$as_dir" && as_dir=.
22129    for ac_exec_ext in '' $ac_executable_extensions; do
22130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22131    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22133    break 2
22134  fi
22135done
22136  done
22137IFS=$as_save_IFS
22138
22139  ;;
22140esac
22141fi
22142TIME=$ac_cv_path_TIME
22143if test -n "$TIME"; then
22144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22145$as_echo "$TIME" >&6; }
22146else
22147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22148$as_echo "no" >&6; }
22149fi
22150
22151
22152  test -n "$TIME" && break
22153done
22154
22155  else
22156    # The variable is set, but is it from the command line or the environment?
22157
22158    # Try to remove the string !TIME! from our list.
22159    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22160    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22161      # If it failed, the variable was not from the command line. Ignore it,
22162      # but warn the user (except for BASH, which is always set by the calling BASH).
22163      if test "xTIME" != xBASH; then
22164        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22165$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22166      fi
22167      # Try to locate tool using the code snippet
22168      for ac_prog in time
22169do
22170  # Extract the first word of "$ac_prog", so it can be a program name with args.
22171set dummy $ac_prog; ac_word=$2
22172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22173$as_echo_n "checking for $ac_word... " >&6; }
22174if ${ac_cv_path_TIME+:} false; then :
22175  $as_echo_n "(cached) " >&6
22176else
22177  case $TIME in
22178  [\\/]* | ?:[\\/]*)
22179  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22180  ;;
22181  *)
22182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22183for as_dir in $PATH
22184do
22185  IFS=$as_save_IFS
22186  test -z "$as_dir" && as_dir=.
22187    for ac_exec_ext in '' $ac_executable_extensions; do
22188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22189    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22191    break 2
22192  fi
22193done
22194  done
22195IFS=$as_save_IFS
22196
22197  ;;
22198esac
22199fi
22200TIME=$ac_cv_path_TIME
22201if test -n "$TIME"; then
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22203$as_echo "$TIME" >&6; }
22204else
22205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22206$as_echo "no" >&6; }
22207fi
22208
22209
22210  test -n "$TIME" && break
22211done
22212
22213    else
22214      # If it succeeded, then it was overridden by the user. We will use it
22215      # for the tool.
22216
22217      # First remove it from the list of overridden variables, so we can test
22218      # for unknown variables in the end.
22219      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22220
22221      # Check if we try to supply an empty value
22222      if test "x$TIME" = x; then
22223        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22224$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22225        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22226$as_echo_n "checking for TIME... " >&6; }
22227        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22228$as_echo "disabled" >&6; }
22229      else
22230        # Check if the provided tool contains a complete path.
22231        tool_specified="$TIME"
22232        tool_basename="${tool_specified##*/}"
22233        if test "x$tool_basename" = "x$tool_specified"; then
22234          # A command without a complete path is provided, search $PATH.
22235          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22236$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22237          # Extract the first word of "$tool_basename", so it can be a program name with args.
22238set dummy $tool_basename; ac_word=$2
22239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22240$as_echo_n "checking for $ac_word... " >&6; }
22241if ${ac_cv_path_TIME+:} false; then :
22242  $as_echo_n "(cached) " >&6
22243else
22244  case $TIME in
22245  [\\/]* | ?:[\\/]*)
22246  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22247  ;;
22248  *)
22249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22250for as_dir in $PATH
22251do
22252  IFS=$as_save_IFS
22253  test -z "$as_dir" && as_dir=.
22254    for ac_exec_ext in '' $ac_executable_extensions; do
22255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22256    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22258    break 2
22259  fi
22260done
22261  done
22262IFS=$as_save_IFS
22263
22264  ;;
22265esac
22266fi
22267TIME=$ac_cv_path_TIME
22268if test -n "$TIME"; then
22269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22270$as_echo "$TIME" >&6; }
22271else
22272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22273$as_echo "no" >&6; }
22274fi
22275
22276
22277          if test "x$TIME" = x; then
22278            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22279          fi
22280        else
22281          # Otherwise we believe it is a complete path. Use it as it is.
22282          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22283$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22284          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22285$as_echo_n "checking for TIME... " >&6; }
22286          if test ! -x "$tool_specified"; then
22287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22288$as_echo "not found" >&6; }
22289            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22290          fi
22291          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22292$as_echo "$tool_specified" >&6; }
22293        fi
22294      fi
22295    fi
22296
22297  fi
22298
22299
22300
22301
22302  # Publish this variable in the help.
22303
22304
22305  if [ -z "${DTRACE+x}" ]; then
22306    # The variable is not set by user, try to locate tool using the code snippet
22307    for ac_prog in dtrace
22308do
22309  # Extract the first word of "$ac_prog", so it can be a program name with args.
22310set dummy $ac_prog; ac_word=$2
22311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22312$as_echo_n "checking for $ac_word... " >&6; }
22313if ${ac_cv_path_DTRACE+:} false; then :
22314  $as_echo_n "(cached) " >&6
22315else
22316  case $DTRACE in
22317  [\\/]* | ?:[\\/]*)
22318  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22319  ;;
22320  *)
22321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22322for as_dir in $PATH
22323do
22324  IFS=$as_save_IFS
22325  test -z "$as_dir" && as_dir=.
22326    for ac_exec_ext in '' $ac_executable_extensions; do
22327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22328    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22330    break 2
22331  fi
22332done
22333  done
22334IFS=$as_save_IFS
22335
22336  ;;
22337esac
22338fi
22339DTRACE=$ac_cv_path_DTRACE
22340if test -n "$DTRACE"; then
22341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22342$as_echo "$DTRACE" >&6; }
22343else
22344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22345$as_echo "no" >&6; }
22346fi
22347
22348
22349  test -n "$DTRACE" && break
22350done
22351
22352  else
22353    # The variable is set, but is it from the command line or the environment?
22354
22355    # Try to remove the string !DTRACE! from our list.
22356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22358      # If it failed, the variable was not from the command line. Ignore it,
22359      # but warn the user (except for BASH, which is always set by the calling BASH).
22360      if test "xDTRACE" != xBASH; then
22361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22362$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22363      fi
22364      # Try to locate tool using the code snippet
22365      for ac_prog in dtrace
22366do
22367  # Extract the first word of "$ac_prog", so it can be a program name with args.
22368set dummy $ac_prog; ac_word=$2
22369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22370$as_echo_n "checking for $ac_word... " >&6; }
22371if ${ac_cv_path_DTRACE+:} false; then :
22372  $as_echo_n "(cached) " >&6
22373else
22374  case $DTRACE in
22375  [\\/]* | ?:[\\/]*)
22376  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22377  ;;
22378  *)
22379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22380for as_dir in $PATH
22381do
22382  IFS=$as_save_IFS
22383  test -z "$as_dir" && as_dir=.
22384    for ac_exec_ext in '' $ac_executable_extensions; do
22385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22386    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22388    break 2
22389  fi
22390done
22391  done
22392IFS=$as_save_IFS
22393
22394  ;;
22395esac
22396fi
22397DTRACE=$ac_cv_path_DTRACE
22398if test -n "$DTRACE"; then
22399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22400$as_echo "$DTRACE" >&6; }
22401else
22402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22403$as_echo "no" >&6; }
22404fi
22405
22406
22407  test -n "$DTRACE" && break
22408done
22409
22410    else
22411      # If it succeeded, then it was overridden by the user. We will use it
22412      # for the tool.
22413
22414      # First remove it from the list of overridden variables, so we can test
22415      # for unknown variables in the end.
22416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22417
22418      # Check if we try to supply an empty value
22419      if test "x$DTRACE" = x; then
22420        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22421$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22422        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22423$as_echo_n "checking for DTRACE... " >&6; }
22424        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22425$as_echo "disabled" >&6; }
22426      else
22427        # Check if the provided tool contains a complete path.
22428        tool_specified="$DTRACE"
22429        tool_basename="${tool_specified##*/}"
22430        if test "x$tool_basename" = "x$tool_specified"; then
22431          # A command without a complete path is provided, search $PATH.
22432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22433$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22434          # Extract the first word of "$tool_basename", so it can be a program name with args.
22435set dummy $tool_basename; ac_word=$2
22436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22437$as_echo_n "checking for $ac_word... " >&6; }
22438if ${ac_cv_path_DTRACE+:} false; then :
22439  $as_echo_n "(cached) " >&6
22440else
22441  case $DTRACE in
22442  [\\/]* | ?:[\\/]*)
22443  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22444  ;;
22445  *)
22446  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22447for as_dir in $PATH
22448do
22449  IFS=$as_save_IFS
22450  test -z "$as_dir" && as_dir=.
22451    for ac_exec_ext in '' $ac_executable_extensions; do
22452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22453    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22455    break 2
22456  fi
22457done
22458  done
22459IFS=$as_save_IFS
22460
22461  ;;
22462esac
22463fi
22464DTRACE=$ac_cv_path_DTRACE
22465if test -n "$DTRACE"; then
22466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22467$as_echo "$DTRACE" >&6; }
22468else
22469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22470$as_echo "no" >&6; }
22471fi
22472
22473
22474          if test "x$DTRACE" = x; then
22475            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22476          fi
22477        else
22478          # Otherwise we believe it is a complete path. Use it as it is.
22479          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22480$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22481          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22482$as_echo_n "checking for DTRACE... " >&6; }
22483          if test ! -x "$tool_specified"; then
22484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22485$as_echo "not found" >&6; }
22486            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22487          fi
22488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22489$as_echo "$tool_specified" >&6; }
22490        fi
22491      fi
22492    fi
22493
22494  fi
22495
22496
22497
22498
22499  # Publish this variable in the help.
22500
22501
22502  if [ -z "${PATCH+x}" ]; then
22503    # The variable is not set by user, try to locate tool using the code snippet
22504    for ac_prog in gpatch patch
22505do
22506  # Extract the first word of "$ac_prog", so it can be a program name with args.
22507set dummy $ac_prog; ac_word=$2
22508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22509$as_echo_n "checking for $ac_word... " >&6; }
22510if ${ac_cv_path_PATCH+:} false; then :
22511  $as_echo_n "(cached) " >&6
22512else
22513  case $PATCH in
22514  [\\/]* | ?:[\\/]*)
22515  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22516  ;;
22517  *)
22518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22519for as_dir in $PATH
22520do
22521  IFS=$as_save_IFS
22522  test -z "$as_dir" && as_dir=.
22523    for ac_exec_ext in '' $ac_executable_extensions; do
22524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22525    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22527    break 2
22528  fi
22529done
22530  done
22531IFS=$as_save_IFS
22532
22533  ;;
22534esac
22535fi
22536PATCH=$ac_cv_path_PATCH
22537if test -n "$PATCH"; then
22538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22539$as_echo "$PATCH" >&6; }
22540else
22541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22542$as_echo "no" >&6; }
22543fi
22544
22545
22546  test -n "$PATCH" && break
22547done
22548
22549  else
22550    # The variable is set, but is it from the command line or the environment?
22551
22552    # Try to remove the string !PATCH! from our list.
22553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22555      # If it failed, the variable was not from the command line. Ignore it,
22556      # but warn the user (except for BASH, which is always set by the calling BASH).
22557      if test "xPATCH" != xBASH; then
22558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22559$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22560      fi
22561      # Try to locate tool using the code snippet
22562      for ac_prog in gpatch patch
22563do
22564  # Extract the first word of "$ac_prog", so it can be a program name with args.
22565set dummy $ac_prog; ac_word=$2
22566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22567$as_echo_n "checking for $ac_word... " >&6; }
22568if ${ac_cv_path_PATCH+:} false; then :
22569  $as_echo_n "(cached) " >&6
22570else
22571  case $PATCH in
22572  [\\/]* | ?:[\\/]*)
22573  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22574  ;;
22575  *)
22576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22577for as_dir in $PATH
22578do
22579  IFS=$as_save_IFS
22580  test -z "$as_dir" && as_dir=.
22581    for ac_exec_ext in '' $ac_executable_extensions; do
22582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22583    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22585    break 2
22586  fi
22587done
22588  done
22589IFS=$as_save_IFS
22590
22591  ;;
22592esac
22593fi
22594PATCH=$ac_cv_path_PATCH
22595if test -n "$PATCH"; then
22596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22597$as_echo "$PATCH" >&6; }
22598else
22599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22600$as_echo "no" >&6; }
22601fi
22602
22603
22604  test -n "$PATCH" && break
22605done
22606
22607    else
22608      # If it succeeded, then it was overridden by the user. We will use it
22609      # for the tool.
22610
22611      # First remove it from the list of overridden variables, so we can test
22612      # for unknown variables in the end.
22613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22614
22615      # Check if we try to supply an empty value
22616      if test "x$PATCH" = x; then
22617        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22618$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22620$as_echo_n "checking for PATCH... " >&6; }
22621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22622$as_echo "disabled" >&6; }
22623      else
22624        # Check if the provided tool contains a complete path.
22625        tool_specified="$PATCH"
22626        tool_basename="${tool_specified##*/}"
22627        if test "x$tool_basename" = "x$tool_specified"; then
22628          # A command without a complete path is provided, search $PATH.
22629          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22630$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22631          # Extract the first word of "$tool_basename", so it can be a program name with args.
22632set dummy $tool_basename; ac_word=$2
22633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22634$as_echo_n "checking for $ac_word... " >&6; }
22635if ${ac_cv_path_PATCH+:} false; then :
22636  $as_echo_n "(cached) " >&6
22637else
22638  case $PATCH in
22639  [\\/]* | ?:[\\/]*)
22640  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22641  ;;
22642  *)
22643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22644for as_dir in $PATH
22645do
22646  IFS=$as_save_IFS
22647  test -z "$as_dir" && as_dir=.
22648    for ac_exec_ext in '' $ac_executable_extensions; do
22649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22650    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22652    break 2
22653  fi
22654done
22655  done
22656IFS=$as_save_IFS
22657
22658  ;;
22659esac
22660fi
22661PATCH=$ac_cv_path_PATCH
22662if test -n "$PATCH"; then
22663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22664$as_echo "$PATCH" >&6; }
22665else
22666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22667$as_echo "no" >&6; }
22668fi
22669
22670
22671          if test "x$PATCH" = x; then
22672            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22673          fi
22674        else
22675          # Otherwise we believe it is a complete path. Use it as it is.
22676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22677$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22678          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22679$as_echo_n "checking for PATCH... " >&6; }
22680          if test ! -x "$tool_specified"; then
22681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22682$as_echo "not found" >&6; }
22683            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22684          fi
22685          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22686$as_echo "$tool_specified" >&6; }
22687        fi
22688      fi
22689    fi
22690
22691  fi
22692
22693
22694  # Check if it's GNU time
22695  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22696  if test "x$IS_GNU_TIME" != x; then
22697    IS_GNU_TIME=yes
22698  else
22699    IS_GNU_TIME=no
22700  fi
22701
22702
22703  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22704
22705
22706
22707  # Publish this variable in the help.
22708
22709
22710  if [ -z "${DSYMUTIL+x}" ]; then
22711    # The variable is not set by user, try to locate tool using the code snippet
22712    for ac_prog in dsymutil
22713do
22714  # Extract the first word of "$ac_prog", so it can be a program name with args.
22715set dummy $ac_prog; ac_word=$2
22716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717$as_echo_n "checking for $ac_word... " >&6; }
22718if ${ac_cv_path_DSYMUTIL+:} false; then :
22719  $as_echo_n "(cached) " >&6
22720else
22721  case $DSYMUTIL in
22722  [\\/]* | ?:[\\/]*)
22723  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22724  ;;
22725  *)
22726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727for as_dir in $PATH
22728do
22729  IFS=$as_save_IFS
22730  test -z "$as_dir" && as_dir=.
22731    for ac_exec_ext in '' $ac_executable_extensions; do
22732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735    break 2
22736  fi
22737done
22738  done
22739IFS=$as_save_IFS
22740
22741  ;;
22742esac
22743fi
22744DSYMUTIL=$ac_cv_path_DSYMUTIL
22745if test -n "$DSYMUTIL"; then
22746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22747$as_echo "$DSYMUTIL" >&6; }
22748else
22749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750$as_echo "no" >&6; }
22751fi
22752
22753
22754  test -n "$DSYMUTIL" && break
22755done
22756
22757  else
22758    # The variable is set, but is it from the command line or the environment?
22759
22760    # Try to remove the string !DSYMUTIL! from our list.
22761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22763      # If it failed, the variable was not from the command line. Ignore it,
22764      # but warn the user (except for BASH, which is always set by the calling BASH).
22765      if test "xDSYMUTIL" != xBASH; then
22766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22767$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22768      fi
22769      # Try to locate tool using the code snippet
22770      for ac_prog in dsymutil
22771do
22772  # Extract the first word of "$ac_prog", so it can be a program name with args.
22773set dummy $ac_prog; ac_word=$2
22774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22775$as_echo_n "checking for $ac_word... " >&6; }
22776if ${ac_cv_path_DSYMUTIL+:} false; then :
22777  $as_echo_n "(cached) " >&6
22778else
22779  case $DSYMUTIL in
22780  [\\/]* | ?:[\\/]*)
22781  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22782  ;;
22783  *)
22784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22785for as_dir in $PATH
22786do
22787  IFS=$as_save_IFS
22788  test -z "$as_dir" && as_dir=.
22789    for ac_exec_ext in '' $ac_executable_extensions; do
22790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22791    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22793    break 2
22794  fi
22795done
22796  done
22797IFS=$as_save_IFS
22798
22799  ;;
22800esac
22801fi
22802DSYMUTIL=$ac_cv_path_DSYMUTIL
22803if test -n "$DSYMUTIL"; then
22804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22805$as_echo "$DSYMUTIL" >&6; }
22806else
22807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22808$as_echo "no" >&6; }
22809fi
22810
22811
22812  test -n "$DSYMUTIL" && break
22813done
22814
22815    else
22816      # If it succeeded, then it was overridden by the user. We will use it
22817      # for the tool.
22818
22819      # First remove it from the list of overridden variables, so we can test
22820      # for unknown variables in the end.
22821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22822
22823      # Check if we try to supply an empty value
22824      if test "x$DSYMUTIL" = x; then
22825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22826$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22828$as_echo_n "checking for DSYMUTIL... " >&6; }
22829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22830$as_echo "disabled" >&6; }
22831      else
22832        # Check if the provided tool contains a complete path.
22833        tool_specified="$DSYMUTIL"
22834        tool_basename="${tool_specified##*/}"
22835        if test "x$tool_basename" = "x$tool_specified"; then
22836          # A command without a complete path is provided, search $PATH.
22837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22838$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22839          # Extract the first word of "$tool_basename", so it can be a program name with args.
22840set dummy $tool_basename; ac_word=$2
22841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22842$as_echo_n "checking for $ac_word... " >&6; }
22843if ${ac_cv_path_DSYMUTIL+:} false; then :
22844  $as_echo_n "(cached) " >&6
22845else
22846  case $DSYMUTIL in
22847  [\\/]* | ?:[\\/]*)
22848  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22849  ;;
22850  *)
22851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22852for as_dir in $PATH
22853do
22854  IFS=$as_save_IFS
22855  test -z "$as_dir" && as_dir=.
22856    for ac_exec_ext in '' $ac_executable_extensions; do
22857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22858    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22860    break 2
22861  fi
22862done
22863  done
22864IFS=$as_save_IFS
22865
22866  ;;
22867esac
22868fi
22869DSYMUTIL=$ac_cv_path_DSYMUTIL
22870if test -n "$DSYMUTIL"; then
22871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22872$as_echo "$DSYMUTIL" >&6; }
22873else
22874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22875$as_echo "no" >&6; }
22876fi
22877
22878
22879          if test "x$DSYMUTIL" = x; then
22880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22881          fi
22882        else
22883          # Otherwise we believe it is a complete path. Use it as it is.
22884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22885$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22887$as_echo_n "checking for DSYMUTIL... " >&6; }
22888          if test ! -x "$tool_specified"; then
22889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22890$as_echo "not found" >&6; }
22891            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22892          fi
22893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22894$as_echo "$tool_specified" >&6; }
22895        fi
22896      fi
22897    fi
22898
22899  fi
22900
22901
22902
22903  if test "x$DSYMUTIL" = x; then
22904    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22905  fi
22906
22907
22908
22909
22910
22911  # Publish this variable in the help.
22912
22913
22914  if [ -z "${XATTR+x}" ]; then
22915    # The variable is not set by user, try to locate tool using the code snippet
22916    for ac_prog in xattr
22917do
22918  # Extract the first word of "$ac_prog", so it can be a program name with args.
22919set dummy $ac_prog; ac_word=$2
22920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22921$as_echo_n "checking for $ac_word... " >&6; }
22922if ${ac_cv_path_XATTR+:} false; then :
22923  $as_echo_n "(cached) " >&6
22924else
22925  case $XATTR in
22926  [\\/]* | ?:[\\/]*)
22927  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22928  ;;
22929  *)
22930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22931for as_dir in $PATH
22932do
22933  IFS=$as_save_IFS
22934  test -z "$as_dir" && as_dir=.
22935    for ac_exec_ext in '' $ac_executable_extensions; do
22936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22937    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22939    break 2
22940  fi
22941done
22942  done
22943IFS=$as_save_IFS
22944
22945  ;;
22946esac
22947fi
22948XATTR=$ac_cv_path_XATTR
22949if test -n "$XATTR"; then
22950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22951$as_echo "$XATTR" >&6; }
22952else
22953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22954$as_echo "no" >&6; }
22955fi
22956
22957
22958  test -n "$XATTR" && break
22959done
22960
22961  else
22962    # The variable is set, but is it from the command line or the environment?
22963
22964    # Try to remove the string !XATTR! from our list.
22965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22967      # If it failed, the variable was not from the command line. Ignore it,
22968      # but warn the user (except for BASH, which is always set by the calling BASH).
22969      if test "xXATTR" != xBASH; then
22970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22971$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22972      fi
22973      # Try to locate tool using the code snippet
22974      for ac_prog in xattr
22975do
22976  # Extract the first word of "$ac_prog", so it can be a program name with args.
22977set dummy $ac_prog; ac_word=$2
22978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22979$as_echo_n "checking for $ac_word... " >&6; }
22980if ${ac_cv_path_XATTR+:} false; then :
22981  $as_echo_n "(cached) " >&6
22982else
22983  case $XATTR in
22984  [\\/]* | ?:[\\/]*)
22985  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22986  ;;
22987  *)
22988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22989for as_dir in $PATH
22990do
22991  IFS=$as_save_IFS
22992  test -z "$as_dir" && as_dir=.
22993    for ac_exec_ext in '' $ac_executable_extensions; do
22994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22995    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22997    break 2
22998  fi
22999done
23000  done
23001IFS=$as_save_IFS
23002
23003  ;;
23004esac
23005fi
23006XATTR=$ac_cv_path_XATTR
23007if test -n "$XATTR"; then
23008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23009$as_echo "$XATTR" >&6; }
23010else
23011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23012$as_echo "no" >&6; }
23013fi
23014
23015
23016  test -n "$XATTR" && break
23017done
23018
23019    else
23020      # If it succeeded, then it was overridden by the user. We will use it
23021      # for the tool.
23022
23023      # First remove it from the list of overridden variables, so we can test
23024      # for unknown variables in the end.
23025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23026
23027      # Check if we try to supply an empty value
23028      if test "x$XATTR" = x; then
23029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23030$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23032$as_echo_n "checking for XATTR... " >&6; }
23033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23034$as_echo "disabled" >&6; }
23035      else
23036        # Check if the provided tool contains a complete path.
23037        tool_specified="$XATTR"
23038        tool_basename="${tool_specified##*/}"
23039        if test "x$tool_basename" = "x$tool_specified"; then
23040          # A command without a complete path is provided, search $PATH.
23041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23042$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23043          # Extract the first word of "$tool_basename", so it can be a program name with args.
23044set dummy $tool_basename; ac_word=$2
23045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23046$as_echo_n "checking for $ac_word... " >&6; }
23047if ${ac_cv_path_XATTR+:} false; then :
23048  $as_echo_n "(cached) " >&6
23049else
23050  case $XATTR in
23051  [\\/]* | ?:[\\/]*)
23052  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23053  ;;
23054  *)
23055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23056for as_dir in $PATH
23057do
23058  IFS=$as_save_IFS
23059  test -z "$as_dir" && as_dir=.
23060    for ac_exec_ext in '' $ac_executable_extensions; do
23061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23062    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23064    break 2
23065  fi
23066done
23067  done
23068IFS=$as_save_IFS
23069
23070  ;;
23071esac
23072fi
23073XATTR=$ac_cv_path_XATTR
23074if test -n "$XATTR"; then
23075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23076$as_echo "$XATTR" >&6; }
23077else
23078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23079$as_echo "no" >&6; }
23080fi
23081
23082
23083          if test "x$XATTR" = x; then
23084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23085          fi
23086        else
23087          # Otherwise we believe it is a complete path. Use it as it is.
23088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23089$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23091$as_echo_n "checking for XATTR... " >&6; }
23092          if test ! -x "$tool_specified"; then
23093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23094$as_echo "not found" >&6; }
23095            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23096          fi
23097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23098$as_echo "$tool_specified" >&6; }
23099        fi
23100      fi
23101    fi
23102
23103  fi
23104
23105
23106
23107  if test "x$XATTR" = x; then
23108    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23109  fi
23110
23111
23112
23113
23114  # Publish this variable in the help.
23115
23116
23117  if [ -z "${CODESIGN+x}" ]; then
23118    # The variable is not set by user, try to locate tool using the code snippet
23119    for ac_prog in codesign
23120do
23121  # Extract the first word of "$ac_prog", so it can be a program name with args.
23122set dummy $ac_prog; ac_word=$2
23123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23124$as_echo_n "checking for $ac_word... " >&6; }
23125if ${ac_cv_path_CODESIGN+:} false; then :
23126  $as_echo_n "(cached) " >&6
23127else
23128  case $CODESIGN in
23129  [\\/]* | ?:[\\/]*)
23130  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23131  ;;
23132  *)
23133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23134for as_dir in $PATH
23135do
23136  IFS=$as_save_IFS
23137  test -z "$as_dir" && as_dir=.
23138    for ac_exec_ext in '' $ac_executable_extensions; do
23139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23140    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23142    break 2
23143  fi
23144done
23145  done
23146IFS=$as_save_IFS
23147
23148  ;;
23149esac
23150fi
23151CODESIGN=$ac_cv_path_CODESIGN
23152if test -n "$CODESIGN"; then
23153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23154$as_echo "$CODESIGN" >&6; }
23155else
23156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23157$as_echo "no" >&6; }
23158fi
23159
23160
23161  test -n "$CODESIGN" && break
23162done
23163
23164  else
23165    # The variable is set, but is it from the command line or the environment?
23166
23167    # Try to remove the string !CODESIGN! from our list.
23168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23170      # If it failed, the variable was not from the command line. Ignore it,
23171      # but warn the user (except for BASH, which is always set by the calling BASH).
23172      if test "xCODESIGN" != xBASH; then
23173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23174$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23175      fi
23176      # Try to locate tool using the code snippet
23177      for ac_prog in codesign
23178do
23179  # Extract the first word of "$ac_prog", so it can be a program name with args.
23180set dummy $ac_prog; ac_word=$2
23181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23182$as_echo_n "checking for $ac_word... " >&6; }
23183if ${ac_cv_path_CODESIGN+:} false; then :
23184  $as_echo_n "(cached) " >&6
23185else
23186  case $CODESIGN in
23187  [\\/]* | ?:[\\/]*)
23188  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23189  ;;
23190  *)
23191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23192for as_dir in $PATH
23193do
23194  IFS=$as_save_IFS
23195  test -z "$as_dir" && as_dir=.
23196    for ac_exec_ext in '' $ac_executable_extensions; do
23197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23198    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23200    break 2
23201  fi
23202done
23203  done
23204IFS=$as_save_IFS
23205
23206  ;;
23207esac
23208fi
23209CODESIGN=$ac_cv_path_CODESIGN
23210if test -n "$CODESIGN"; then
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23212$as_echo "$CODESIGN" >&6; }
23213else
23214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215$as_echo "no" >&6; }
23216fi
23217
23218
23219  test -n "$CODESIGN" && break
23220done
23221
23222    else
23223      # If it succeeded, then it was overridden by the user. We will use it
23224      # for the tool.
23225
23226      # First remove it from the list of overridden variables, so we can test
23227      # for unknown variables in the end.
23228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23229
23230      # Check if we try to supply an empty value
23231      if test "x$CODESIGN" = x; then
23232        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23233$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23235$as_echo_n "checking for CODESIGN... " >&6; }
23236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23237$as_echo "disabled" >&6; }
23238      else
23239        # Check if the provided tool contains a complete path.
23240        tool_specified="$CODESIGN"
23241        tool_basename="${tool_specified##*/}"
23242        if test "x$tool_basename" = "x$tool_specified"; then
23243          # A command without a complete path is provided, search $PATH.
23244          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23245$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23246          # Extract the first word of "$tool_basename", so it can be a program name with args.
23247set dummy $tool_basename; ac_word=$2
23248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23249$as_echo_n "checking for $ac_word... " >&6; }
23250if ${ac_cv_path_CODESIGN+:} false; then :
23251  $as_echo_n "(cached) " >&6
23252else
23253  case $CODESIGN in
23254  [\\/]* | ?:[\\/]*)
23255  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23256  ;;
23257  *)
23258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23259for as_dir in $PATH
23260do
23261  IFS=$as_save_IFS
23262  test -z "$as_dir" && as_dir=.
23263    for ac_exec_ext in '' $ac_executable_extensions; do
23264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23265    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23267    break 2
23268  fi
23269done
23270  done
23271IFS=$as_save_IFS
23272
23273  ;;
23274esac
23275fi
23276CODESIGN=$ac_cv_path_CODESIGN
23277if test -n "$CODESIGN"; then
23278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23279$as_echo "$CODESIGN" >&6; }
23280else
23281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23282$as_echo "no" >&6; }
23283fi
23284
23285
23286          if test "x$CODESIGN" = x; then
23287            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23288          fi
23289        else
23290          # Otherwise we believe it is a complete path. Use it as it is.
23291          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23292$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23293          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23294$as_echo_n "checking for CODESIGN... " >&6; }
23295          if test ! -x "$tool_specified"; then
23296            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23297$as_echo "not found" >&6; }
23298            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23299          fi
23300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23301$as_echo "$tool_specified" >&6; }
23302        fi
23303      fi
23304    fi
23305
23306  fi
23307
23308
23309    if test "x$CODESIGN" != "x"; then
23310      # Verify that the openjdk_codesign certificate is present
23311      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23312$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23313      rm -f codesign-testfile
23314      touch codesign-testfile
23315      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23316      rm -f codesign-testfile
23317      if test "x$CODESIGN" = x; then
23318        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23319$as_echo "no" >&6; }
23320      else
23321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23322$as_echo "yes" >&6; }
23323      fi
23324    fi
23325
23326
23327
23328  # Publish this variable in the help.
23329
23330
23331  if [ -z "${SETFILE+x}" ]; then
23332    # The variable is not set by user, try to locate tool using the code snippet
23333    for ac_prog in SetFile
23334do
23335  # Extract the first word of "$ac_prog", so it can be a program name with args.
23336set dummy $ac_prog; ac_word=$2
23337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23338$as_echo_n "checking for $ac_word... " >&6; }
23339if ${ac_cv_path_SETFILE+:} false; then :
23340  $as_echo_n "(cached) " >&6
23341else
23342  case $SETFILE in
23343  [\\/]* | ?:[\\/]*)
23344  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23345  ;;
23346  *)
23347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23348for as_dir in $PATH
23349do
23350  IFS=$as_save_IFS
23351  test -z "$as_dir" && as_dir=.
23352    for ac_exec_ext in '' $ac_executable_extensions; do
23353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23354    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23356    break 2
23357  fi
23358done
23359  done
23360IFS=$as_save_IFS
23361
23362  ;;
23363esac
23364fi
23365SETFILE=$ac_cv_path_SETFILE
23366if test -n "$SETFILE"; then
23367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23368$as_echo "$SETFILE" >&6; }
23369else
23370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23371$as_echo "no" >&6; }
23372fi
23373
23374
23375  test -n "$SETFILE" && break
23376done
23377
23378  else
23379    # The variable is set, but is it from the command line or the environment?
23380
23381    # Try to remove the string !SETFILE! from our list.
23382    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23383    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23384      # If it failed, the variable was not from the command line. Ignore it,
23385      # but warn the user (except for BASH, which is always set by the calling BASH).
23386      if test "xSETFILE" != xBASH; then
23387        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23388$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23389      fi
23390      # Try to locate tool using the code snippet
23391      for ac_prog in SetFile
23392do
23393  # Extract the first word of "$ac_prog", so it can be a program name with args.
23394set dummy $ac_prog; ac_word=$2
23395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23396$as_echo_n "checking for $ac_word... " >&6; }
23397if ${ac_cv_path_SETFILE+:} false; then :
23398  $as_echo_n "(cached) " >&6
23399else
23400  case $SETFILE in
23401  [\\/]* | ?:[\\/]*)
23402  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23403  ;;
23404  *)
23405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23406for as_dir in $PATH
23407do
23408  IFS=$as_save_IFS
23409  test -z "$as_dir" && as_dir=.
23410    for ac_exec_ext in '' $ac_executable_extensions; do
23411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23412    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23414    break 2
23415  fi
23416done
23417  done
23418IFS=$as_save_IFS
23419
23420  ;;
23421esac
23422fi
23423SETFILE=$ac_cv_path_SETFILE
23424if test -n "$SETFILE"; then
23425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23426$as_echo "$SETFILE" >&6; }
23427else
23428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23429$as_echo "no" >&6; }
23430fi
23431
23432
23433  test -n "$SETFILE" && break
23434done
23435
23436    else
23437      # If it succeeded, then it was overridden by the user. We will use it
23438      # for the tool.
23439
23440      # First remove it from the list of overridden variables, so we can test
23441      # for unknown variables in the end.
23442      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23443
23444      # Check if we try to supply an empty value
23445      if test "x$SETFILE" = x; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23447$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23449$as_echo_n "checking for SETFILE... " >&6; }
23450        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23451$as_echo "disabled" >&6; }
23452      else
23453        # Check if the provided tool contains a complete path.
23454        tool_specified="$SETFILE"
23455        tool_basename="${tool_specified##*/}"
23456        if test "x$tool_basename" = "x$tool_specified"; then
23457          # A command without a complete path is provided, search $PATH.
23458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23459$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23460          # Extract the first word of "$tool_basename", so it can be a program name with args.
23461set dummy $tool_basename; ac_word=$2
23462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23463$as_echo_n "checking for $ac_word... " >&6; }
23464if ${ac_cv_path_SETFILE+:} false; then :
23465  $as_echo_n "(cached) " >&6
23466else
23467  case $SETFILE in
23468  [\\/]* | ?:[\\/]*)
23469  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23470  ;;
23471  *)
23472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23473for as_dir in $PATH
23474do
23475  IFS=$as_save_IFS
23476  test -z "$as_dir" && as_dir=.
23477    for ac_exec_ext in '' $ac_executable_extensions; do
23478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23479    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23481    break 2
23482  fi
23483done
23484  done
23485IFS=$as_save_IFS
23486
23487  ;;
23488esac
23489fi
23490SETFILE=$ac_cv_path_SETFILE
23491if test -n "$SETFILE"; then
23492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23493$as_echo "$SETFILE" >&6; }
23494else
23495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23496$as_echo "no" >&6; }
23497fi
23498
23499
23500          if test "x$SETFILE" = x; then
23501            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23502          fi
23503        else
23504          # Otherwise we believe it is a complete path. Use it as it is.
23505          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23506$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23507          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23508$as_echo_n "checking for SETFILE... " >&6; }
23509          if test ! -x "$tool_specified"; then
23510            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23511$as_echo "not found" >&6; }
23512            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23513          fi
23514          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23515$as_echo "$tool_specified" >&6; }
23516        fi
23517      fi
23518    fi
23519
23520  fi
23521
23522
23523
23524  if test "x$SETFILE" = x; then
23525    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23526  fi
23527
23528
23529  fi
23530
23531
23532  # Test if bash supports pipefail.
23533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23534$as_echo_n "checking if bash supports pipefail... " >&6; }
23535  if ${BASH} -c 'set -o pipefail'; then
23536    BASH_ARGS="$BASH_ARGS -o pipefail"
23537    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23538$as_echo "yes" >&6; }
23539  else
23540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23541$as_echo "no" >&6; }
23542  fi
23543
23544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23545$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23546  if ${BASH} -e -c 'true'; then
23547    BASH_ARGS="$BASH_ARGS -e"
23548    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23549$as_echo "yes" >&6; }
23550  else
23551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23552$as_echo "no" >&6; }
23553  fi
23554
23555
23556
23557
23558# Check if pkg-config is available.
23559
23560
23561if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23562	if test -n "$ac_tool_prefix"; then
23563  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23564set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23566$as_echo_n "checking for $ac_word... " >&6; }
23567if ${ac_cv_path_PKG_CONFIG+:} false; then :
23568  $as_echo_n "(cached) " >&6
23569else
23570  case $PKG_CONFIG in
23571  [\\/]* | ?:[\\/]*)
23572  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23573  ;;
23574  *)
23575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23576for as_dir in $PATH
23577do
23578  IFS=$as_save_IFS
23579  test -z "$as_dir" && as_dir=.
23580    for ac_exec_ext in '' $ac_executable_extensions; do
23581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23582    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23584    break 2
23585  fi
23586done
23587  done
23588IFS=$as_save_IFS
23589
23590  ;;
23591esac
23592fi
23593PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23594if test -n "$PKG_CONFIG"; then
23595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23596$as_echo "$PKG_CONFIG" >&6; }
23597else
23598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23599$as_echo "no" >&6; }
23600fi
23601
23602
23603fi
23604if test -z "$ac_cv_path_PKG_CONFIG"; then
23605  ac_pt_PKG_CONFIG=$PKG_CONFIG
23606  # Extract the first word of "pkg-config", so it can be a program name with args.
23607set dummy pkg-config; ac_word=$2
23608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23609$as_echo_n "checking for $ac_word... " >&6; }
23610if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23611  $as_echo_n "(cached) " >&6
23612else
23613  case $ac_pt_PKG_CONFIG in
23614  [\\/]* | ?:[\\/]*)
23615  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23616  ;;
23617  *)
23618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23619for as_dir in $PATH
23620do
23621  IFS=$as_save_IFS
23622  test -z "$as_dir" && as_dir=.
23623    for ac_exec_ext in '' $ac_executable_extensions; do
23624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23625    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23627    break 2
23628  fi
23629done
23630  done
23631IFS=$as_save_IFS
23632
23633  ;;
23634esac
23635fi
23636ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23637if test -n "$ac_pt_PKG_CONFIG"; then
23638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23639$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23640else
23641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23642$as_echo "no" >&6; }
23643fi
23644
23645  if test "x$ac_pt_PKG_CONFIG" = x; then
23646    PKG_CONFIG=""
23647  else
23648    case $cross_compiling:$ac_tool_warned in
23649yes:)
23650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23652ac_tool_warned=yes ;;
23653esac
23654    PKG_CONFIG=$ac_pt_PKG_CONFIG
23655  fi
23656else
23657  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23658fi
23659
23660fi
23661if test -n "$PKG_CONFIG"; then
23662	_pkg_min_version=0.9.0
23663	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23664$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23665	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23666		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23667$as_echo "yes" >&6; }
23668	else
23669		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23670$as_echo "no" >&6; }
23671		PKG_CONFIG=""
23672	fi
23673
23674fi
23675
23676# After basic tools have been setup, we can check build os specific details.
23677
23678  ###############################################################################
23679
23680  # Note that this is the build platform OS version!
23681
23682  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23683  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23684  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23685  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23686
23687
23688
23689
23690
23691# Misc basic settings
23692
23693
23694# Check whether --with-default-make-target was given.
23695if test "${with_default_make_target+set}" = set; then :
23696  withval=$with_default_make_target;
23697fi
23698
23699  if test "x$with_default_make_target" = "x" \
23700      || test "x$with_default_make_target" = "xyes"; then
23701    DEFAULT_MAKE_TARGET="exploded-image"
23702  elif test "x$with_default_make_target" = "xno"; then
23703    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23704  else
23705    DEFAULT_MAKE_TARGET="$with_default_make_target"
23706  fi
23707
23708
23709
23710
23711###############################################################################
23712#
23713# Determine OpenJDK variants, options and version numbers.
23714#
23715###############################################################################
23716
23717# We need build & target for this.
23718
23719  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23720  # We always build headless support.
23721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23722$as_echo_n "checking headful support... " >&6; }
23723  # Check whether --enable-headful was given.
23724if test "${enable_headful+set}" = set; then :
23725  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23726else
23727  SUPPORT_HEADFUL=yes
23728fi
23729
23730
23731  SUPPORT_HEADLESS=yes
23732  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23733
23734  if test "x$SUPPORT_HEADFUL" = xyes; then
23735    # We are building both headful and headless.
23736    headful_msg="include support for both headful and headless"
23737  fi
23738
23739  if test "x$SUPPORT_HEADFUL" = xno; then
23740    # Thus we are building headless only.
23741    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23742    headful_msg="headless only"
23743  fi
23744
23745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23746$as_echo "$headful_msg" >&6; }
23747
23748
23749
23750
23751
23752  # Choose cacerts source file
23753
23754# Check whether --with-cacerts-file was given.
23755if test "${with_cacerts_file+set}" = set; then :
23756  withval=$with_cacerts_file;
23757fi
23758
23759  if test "x$with_cacerts_file" != x; then
23760    CACERTS_FILE=$with_cacerts_file
23761  fi
23762
23763
23764  # Enable or disable unlimited crypto
23765  # Check whether --enable-unlimited-crypto was given.
23766if test "${enable_unlimited_crypto+set}" = set; then :
23767  enableval=$enable_unlimited_crypto;
23768else
23769  enable_unlimited_crypto=no
23770fi
23771
23772  if test "x$enable_unlimited_crypto" = "xyes"; then
23773    UNLIMITED_CRYPTO=true
23774  else
23775    UNLIMITED_CRYPTO=false
23776  fi
23777
23778
23779  # Should we build the serviceability agent (SA)?
23780  INCLUDE_SA=true
23781  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23782    INCLUDE_SA=false
23783  fi
23784  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23785    INCLUDE_SA=false
23786  fi
23787  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23788    INCLUDE_SA=false
23789  fi
23790
23791
23792  # Compress jars
23793  COMPRESS_JARS=false
23794
23795
23796
23797  # Setup default copyright year. Mostly overridden when building close to a new year.
23798
23799# Check whether --with-copyright-year was given.
23800if test "${with_copyright_year+set}" = set; then :
23801  withval=$with_copyright_year;
23802fi
23803
23804  if test "x$with_copyright_year" = xyes; then
23805    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23806  elif test "x$with_copyright_year" != x; then
23807    COPYRIGHT_YEAR="$with_copyright_year"
23808  else
23809    COPYRIGHT_YEAR=`date +'%Y'`
23810  fi
23811
23812
23813
23814  # Check whether --enable-keep-packaged-modules was given.
23815if test "${enable_keep_packaged_modules+set}" = set; then :
23816  enableval=$enable_keep_packaged_modules;
23817fi
23818
23819
23820  if test "x$enable_keep_packaged_modules" = "xyes"; then
23821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23822$as_echo_n "checking if packaged modules are kept... " >&6; }
23823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23824$as_echo "yes" >&6; }
23825    JLINK_KEEP_PACKAGED_MODULES=true
23826  elif test "x$enable_keep_packaged_modules" = "xno"; then
23827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23828$as_echo_n "checking if packaged modules are kept... " >&6; }
23829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23830$as_echo "no" >&6; }
23831    JLINK_KEEP_PACKAGED_MODULES=false
23832  elif test "x$enable_keep_packaged_modules" = "x"; then
23833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23834$as_echo "yes (default)" >&6; }
23835    JLINK_KEEP_PACKAGED_MODULES=true
23836  else
23837    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23838  fi
23839
23840
23841
23842
23843  # Warn user that old version arguments are deprecated.
23844
23845
23846# Check whether --with-milestone was given.
23847if test "${with_milestone+set}" = set; then :
23848  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23849$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23850fi
23851
23852
23853
23854
23855# Check whether --with-update-version was given.
23856if test "${with_update_version+set}" = set; then :
23857  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23858$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23859fi
23860
23861
23862
23863
23864# Check whether --with-user-release-suffix was given.
23865if test "${with_user_release_suffix+set}" = set; then :
23866  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
23867$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23868fi
23869
23870
23871
23872
23873# Check whether --with-build-number was given.
23874if test "${with_build_number+set}" = set; then :
23875  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23876$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23877fi
23878
23879
23880
23881  # Source the version numbers file
23882  . $AUTOCONF_DIR/version-numbers
23883
23884  # Some non-version number information is set in that file
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894  # Override version from arguments
23895
23896  # If --with-version-string is set, process it first. It is possible to
23897  # override parts with more specific flags, since these are processed later.
23898
23899# Check whether --with-version-string was given.
23900if test "${with_version_string+set}" = set; then :
23901  withval=$with_version_string;
23902fi
23903
23904  if test "x$with_version_string" = xyes; then
23905    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23906  elif test "x$with_version_string" != x; then
23907    # Additional [] needed to keep m4 from mangling shell constructs.
23908    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23909      VERSION_MAJOR=${BASH_REMATCH[1]}
23910      VERSION_MINOR=${BASH_REMATCH[3]}
23911      VERSION_SECURITY=${BASH_REMATCH[5]}
23912      VERSION_PATCH=${BASH_REMATCH[7]}
23913      VERSION_PRE=${BASH_REMATCH[9]}
23914      version_plus_separator=${BASH_REMATCH[11]}
23915      VERSION_BUILD=${BASH_REMATCH[12]}
23916      VERSION_OPT=${BASH_REMATCH[14]}
23917      # Unspecified numerical fields are interpreted as 0.
23918      if test "x$VERSION_MINOR" = x; then
23919        VERSION_MINOR=0
23920      fi
23921      if test "x$VERSION_SECURITY" = x; then
23922        VERSION_SECURITY=0
23923      fi
23924      if test "x$VERSION_PATCH" = x; then
23925        VERSION_PATCH=0
23926      fi
23927      if test "x$version_plus_separator" != x \
23928          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23929        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23930      fi
23931      # Stop the version part process from setting default values.
23932      # We still allow them to explicitely override though.
23933      NO_DEFAULT_VERSION_PARTS=true
23934    else
23935      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23936    fi
23937  fi
23938
23939
23940# Check whether --with-version-pre was given.
23941if test "${with_version_pre+set}" = set; then :
23942  withval=$with_version_pre; with_version_pre_present=true
23943else
23944  with_version_pre_present=false
23945fi
23946
23947
23948  if test "x$with_version_pre_present" = xtrue; then
23949    if test "x$with_version_pre" = xyes; then
23950      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23951    elif test "x$with_version_pre" = xno; then
23952      # Interpret --without-* as empty string instead of the literal "no"
23953      VERSION_PRE=
23954    else
23955      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23956       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23957      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23959$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23960      fi
23961    fi
23962  else
23963    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23964      # Default is to use "internal" as pre
23965      VERSION_PRE="internal"
23966    fi
23967  fi
23968
23969
23970# Check whether --with-version-opt was given.
23971if test "${with_version_opt+set}" = set; then :
23972  withval=$with_version_opt; with_version_opt_present=true
23973else
23974  with_version_opt_present=false
23975fi
23976
23977
23978  if test "x$with_version_opt_present" = xtrue; then
23979    if test "x$with_version_opt" = xyes; then
23980      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23981    elif test "x$with_version_opt" = xno; then
23982      # Interpret --without-* as empty string instead of the literal "no"
23983      VERSION_OPT=
23984    else
23985      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23986       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23987      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23989$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23990      fi
23991    fi
23992  else
23993    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23994      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23995      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23996      # Outer [ ] to quote m4.
23997       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23998      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
23999    fi
24000  fi
24001
24002
24003# Check whether --with-version-build was given.
24004if test "${with_version_build+set}" = set; then :
24005  withval=$with_version_build; with_version_build_present=true
24006else
24007  with_version_build_present=false
24008fi
24009
24010
24011  if test "x$with_version_build_present" = xtrue; then
24012    if test "x$with_version_build" = xyes; then
24013      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24014    elif test "x$with_version_build" = xno; then
24015      # Interpret --without-* as empty string instead of the literal "no"
24016      VERSION_BUILD=
24017    elif test "x$with_version_build" = x; then
24018      VERSION_BUILD=
24019    else
24020
24021  # Additional [] needed to keep m4 from mangling shell constructs.
24022  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24023    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24024  fi
24025  # Extract the version number without leading zeros.
24026  cleaned_value=${BASH_REMATCH[1]}
24027  if test "x$cleaned_value" = x; then
24028    # Special case for zero
24029    cleaned_value=${BASH_REMATCH[2]}
24030  fi
24031
24032  if test $cleaned_value -gt 255; then
24033    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24034  fi
24035  if test "x$cleaned_value" != "x$with_version_build"; then
24036    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24037$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24038  fi
24039  VERSION_BUILD=$cleaned_value
24040
24041    fi
24042  else
24043    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24044      # Default is to not have a build number.
24045      VERSION_BUILD=""
24046      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24047      VERSION_BUILD=0
24048    fi
24049  fi
24050
24051
24052# Check whether --with-version-major was given.
24053if test "${with_version_major+set}" = set; then :
24054  withval=$with_version_major; with_version_major_present=true
24055else
24056  with_version_major_present=false
24057fi
24058
24059
24060  if test "x$with_version_major_present" = xtrue; then
24061    if test "x$with_version_major" = xyes; then
24062      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24063    else
24064
24065  # Additional [] needed to keep m4 from mangling shell constructs.
24066  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24067    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24068  fi
24069  # Extract the version number without leading zeros.
24070  cleaned_value=${BASH_REMATCH[1]}
24071  if test "x$cleaned_value" = x; then
24072    # Special case for zero
24073    cleaned_value=${BASH_REMATCH[2]}
24074  fi
24075
24076  if test $cleaned_value -gt 255; then
24077    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24078  fi
24079  if test "x$cleaned_value" != "x$with_version_major"; then
24080    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24081$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24082  fi
24083  VERSION_MAJOR=$cleaned_value
24084
24085    fi
24086  else
24087    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24088      # Default is to get value from version-numbers
24089      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24090    fi
24091  fi
24092
24093
24094# Check whether --with-version-minor was given.
24095if test "${with_version_minor+set}" = set; then :
24096  withval=$with_version_minor; with_version_minor_present=true
24097else
24098  with_version_minor_present=false
24099fi
24100
24101
24102  if test "x$with_version_minor_present" = xtrue; then
24103    if test "x$with_version_minor" = xyes; then
24104      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24105    elif test "x$with_version_minor" = xno; then
24106      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24107      VERSION_MINOR=0
24108    elif test "x$with_version_minor" = x; then
24109      VERSION_MINOR=0
24110    else
24111
24112  # Additional [] needed to keep m4 from mangling shell constructs.
24113  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24114    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24115  fi
24116  # Extract the version number without leading zeros.
24117  cleaned_value=${BASH_REMATCH[1]}
24118  if test "x$cleaned_value" = x; then
24119    # Special case for zero
24120    cleaned_value=${BASH_REMATCH[2]}
24121  fi
24122
24123  if test $cleaned_value -gt 255; then
24124    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24125  fi
24126  if test "x$cleaned_value" != "x$with_version_minor"; then
24127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24128$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24129  fi
24130  VERSION_MINOR=$cleaned_value
24131
24132    fi
24133  else
24134    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24135      # Default is 0, if unspecified
24136      VERSION_MINOR=0
24137    fi
24138  fi
24139
24140
24141# Check whether --with-version-security was given.
24142if test "${with_version_security+set}" = set; then :
24143  withval=$with_version_security; with_version_security_present=true
24144else
24145  with_version_security_present=false
24146fi
24147
24148
24149  if test "x$with_version_security_present" = xtrue; then
24150    if test "x$with_version_security" = xyes; then
24151      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24152    elif test "x$with_version_security" = xno; then
24153      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24154      VERSION_SECURITY=0
24155    elif test "x$with_version_security" = x; then
24156      VERSION_SECURITY=0
24157    else
24158
24159  # Additional [] needed to keep m4 from mangling shell constructs.
24160  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24161    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24162  fi
24163  # Extract the version number without leading zeros.
24164  cleaned_value=${BASH_REMATCH[1]}
24165  if test "x$cleaned_value" = x; then
24166    # Special case for zero
24167    cleaned_value=${BASH_REMATCH[2]}
24168  fi
24169
24170  if test $cleaned_value -gt 255; then
24171    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24172  fi
24173  if test "x$cleaned_value" != "x$with_version_security"; then
24174    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24175$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24176  fi
24177  VERSION_SECURITY=$cleaned_value
24178
24179    fi
24180  else
24181    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24182      # Default is 0, if unspecified
24183      VERSION_SECURITY=0
24184    fi
24185  fi
24186
24187
24188# Check whether --with-version-patch was given.
24189if test "${with_version_patch+set}" = set; then :
24190  withval=$with_version_patch; with_version_patch_present=true
24191else
24192  with_version_patch_present=false
24193fi
24194
24195
24196  if test "x$with_version_patch_present" = xtrue; then
24197    if test "x$with_version_patch" = xyes; then
24198      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24199    elif test "x$with_version_patch" = xno; then
24200      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24201      VERSION_PATCH=0
24202    elif test "x$with_version_patch" = x; then
24203      VERSION_PATCH=0
24204    else
24205
24206  # Additional [] needed to keep m4 from mangling shell constructs.
24207  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24208    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24209  fi
24210  # Extract the version number without leading zeros.
24211  cleaned_value=${BASH_REMATCH[1]}
24212  if test "x$cleaned_value" = x; then
24213    # Special case for zero
24214    cleaned_value=${BASH_REMATCH[2]}
24215  fi
24216
24217  if test $cleaned_value -gt 255; then
24218    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24219  fi
24220  if test "x$cleaned_value" != "x$with_version_patch"; then
24221    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24222$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24223  fi
24224  VERSION_PATCH=$cleaned_value
24225
24226    fi
24227  else
24228    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24229      # Default is 0, if unspecified
24230      VERSION_PATCH=0
24231    fi
24232  fi
24233
24234  # Calculate derived version properties
24235
24236  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24237  if test "x$VERSION_PRE" = x; then
24238    VERSION_IS_GA=true
24239  else
24240    VERSION_IS_GA=false
24241  fi
24242
24243  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24244  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24245
24246  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24247  # Strip trailing zeroes from stripped_version_number
24248  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24249  VERSION_NUMBER=$stripped_version_number
24250
24251  # The complete version string, with additional build information
24252  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24253    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24254  else
24255    # If either build or opt is set, we need a + separator
24256    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24257  fi
24258
24259  # The short version string, just VERSION_NUMBER and PRE, if present.
24260  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24261
24262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24263$as_echo_n "checking for version string... " >&6; }
24264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24265$as_echo "$VERSION_STRING" >&6; }
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281###############################################################################
24282#
24283# Setup BootJDK, used to bootstrap the build.
24284#
24285###############################################################################
24286
24287
24288  BOOT_JDK_FOUND=no
24289
24290# Check whether --with-boot-jdk was given.
24291if test "${with_boot_jdk+set}" = set; then :
24292  withval=$with_boot_jdk;
24293fi
24294
24295
24296  # We look for the Boot JDK through various means, going from more certain to
24297  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24298  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24299  # must check if this is indeed valid; otherwise we'll continue looking.
24300
24301  # Test: Is bootjdk explicitely set by command line arguments?
24302
24303  if test "x$BOOT_JDK_FOUND" = xno; then
24304    # Now execute the test
24305
24306  if test "x$with_boot_jdk" != x; then
24307    BOOT_JDK=$with_boot_jdk
24308    BOOT_JDK_FOUND=maybe
24309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24310$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24311  fi
24312
24313
24314    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24315    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24316      # Do we have a bin/java?
24317      if test ! -x "$BOOT_JDK/bin/java"; then
24318        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24320        BOOT_JDK_FOUND=no
24321      else
24322        # Do we have a bin/javac?
24323        if test ! -x "$BOOT_JDK/bin/javac"; then
24324          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24326          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24327$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24328          BOOT_JDK_FOUND=no
24329        else
24330          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24331          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24332
24333          # Extra M4 quote needed to protect [] in grep expression.
24334          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24335          if test "x$FOUND_CORRECT_VERSION" = x; then
24336            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24338            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24339$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24340            BOOT_JDK_FOUND=no
24341          else
24342            # We're done! :-)
24343            BOOT_JDK_FOUND=yes
24344
24345  # Only process if variable expands to non-empty
24346
24347  if test "x$BOOT_JDK" != x; then
24348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24349
24350  # Input might be given as Windows format, start by converting to
24351  # unix format.
24352  path="$BOOT_JDK"
24353  new_path=`$CYGPATH -u "$path"`
24354
24355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24358  # "foo.exe" is OK but "foo" is an error.
24359  #
24360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24361  # It is also a way to make sure we got the proper file name for the real test later on.
24362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24363  if test "x$test_shortpath" = x; then
24364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24365$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24366    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24367  fi
24368
24369  # Call helper function which possibly converts this using DOS-style short mode.
24370  # If so, the updated path is stored in $new_path.
24371
24372  input_path="$new_path"
24373  # Check if we need to convert this using DOS-style short mode. If the path
24374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24375  # take no chances and rewrite it.
24376  # Note: m4 eats our [], so we need to use [ and ] instead.
24377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24378  if test "x$has_forbidden_chars" != x; then
24379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24383      # Going to short mode and back again did indeed matter. Since short mode is
24384      # case insensitive, let's make it lowercase to improve readability.
24385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24386      # Now convert it back to Unix-style (cygpath)
24387      input_path=`$CYGPATH -u "$shortmode_path"`
24388      new_path="$input_path"
24389    fi
24390  fi
24391
24392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24393  if test "x$test_cygdrive_prefix" = x; then
24394    # As a simple fix, exclude /usr/bin since it's not a real path.
24395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24397      # a path prefixed by /cygdrive for fixpath to work.
24398      new_path="$CYGWIN_ROOT_PATH$input_path"
24399    fi
24400  fi
24401
24402
24403  if test "x$path" != "x$new_path"; then
24404    BOOT_JDK="$new_path"
24405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24406$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24407  fi
24408
24409    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24410
24411  path="$BOOT_JDK"
24412  has_colon=`$ECHO $path | $GREP ^.:`
24413  new_path="$path"
24414  if test "x$has_colon" = x; then
24415    # Not in mixed or Windows style, start by that.
24416    new_path=`cmd //c echo $path`
24417  fi
24418
24419
24420  input_path="$new_path"
24421  # Check if we need to convert this using DOS-style short mode. If the path
24422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24423  # take no chances and rewrite it.
24424  # Note: m4 eats our [], so we need to use [ and ] instead.
24425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24426  if test "x$has_forbidden_chars" != x; then
24427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24429  fi
24430
24431
24432  windows_path="$new_path"
24433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24434    unix_path=`$CYGPATH -u "$windows_path"`
24435    new_path="$unix_path"
24436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24438    new_path="$unix_path"
24439  fi
24440
24441  if test "x$path" != "x$new_path"; then
24442    BOOT_JDK="$new_path"
24443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24444$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24445  fi
24446
24447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24449
24450    else
24451      # We're on a unix platform. Hooray! :)
24452      path="$BOOT_JDK"
24453      has_space=`$ECHO "$path" | $GREP " "`
24454      if test "x$has_space" != x; then
24455        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24457        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24458      fi
24459
24460      # Use eval to expand a potential ~
24461      eval path="$path"
24462      if test ! -f "$path" && test ! -d "$path"; then
24463        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24464      fi
24465
24466      if test -d "$path"; then
24467        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24468      else
24469        dir="`$DIRNAME "$path"`"
24470        base="`$BASENAME "$path"`"
24471        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24472      fi
24473    fi
24474  fi
24475
24476            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24477$as_echo_n "checking for Boot JDK... " >&6; }
24478            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24479$as_echo "$BOOT_JDK" >&6; }
24480            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24481$as_echo_n "checking Boot JDK version... " >&6; }
24482            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24484$as_echo "$BOOT_JDK_VERSION" >&6; }
24485          fi # end check jdk version
24486        fi # end check javac
24487      fi # end check java
24488    fi # end check boot jdk found
24489  fi
24490
24491  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24492    # Having specified an argument which is incorrect will produce an instant failure;
24493    # we should not go on looking
24494    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24495  fi
24496
24497  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24498
24499  if test "x$BOOT_JDK_FOUND" = xno; then
24500    # Now execute the test
24501
24502  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24503    # First check at user selected default
24504
24505  if test "x$BOOT_JDK_FOUND" = xno; then
24506    # Now execute the test
24507
24508  if test -x /usr/libexec/java_home; then
24509    BOOT_JDK=`/usr/libexec/java_home `
24510    BOOT_JDK_FOUND=maybe
24511    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24512$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24513  fi
24514
24515
24516    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24517    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24518      # Do we have a bin/java?
24519      if test ! -x "$BOOT_JDK/bin/java"; then
24520        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24522        BOOT_JDK_FOUND=no
24523      else
24524        # Do we have a bin/javac?
24525        if test ! -x "$BOOT_JDK/bin/javac"; then
24526          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24528          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24529$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24530          BOOT_JDK_FOUND=no
24531        else
24532          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24533          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24534
24535          # Extra M4 quote needed to protect [] in grep expression.
24536          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24537          if test "x$FOUND_CORRECT_VERSION" = x; then
24538            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24540            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24541$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24542            BOOT_JDK_FOUND=no
24543          else
24544            # We're done! :-)
24545            BOOT_JDK_FOUND=yes
24546
24547  # Only process if variable expands to non-empty
24548
24549  if test "x$BOOT_JDK" != x; then
24550    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24551
24552  # Input might be given as Windows format, start by converting to
24553  # unix format.
24554  path="$BOOT_JDK"
24555  new_path=`$CYGPATH -u "$path"`
24556
24557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24560  # "foo.exe" is OK but "foo" is an error.
24561  #
24562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24563  # It is also a way to make sure we got the proper file name for the real test later on.
24564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24565  if test "x$test_shortpath" = x; then
24566    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24567$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24568    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24569  fi
24570
24571  # Call helper function which possibly converts this using DOS-style short mode.
24572  # If so, the updated path is stored in $new_path.
24573
24574  input_path="$new_path"
24575  # Check if we need to convert this using DOS-style short mode. If the path
24576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24577  # take no chances and rewrite it.
24578  # Note: m4 eats our [], so we need to use [ and ] instead.
24579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24580  if test "x$has_forbidden_chars" != x; then
24581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24585      # Going to short mode and back again did indeed matter. Since short mode is
24586      # case insensitive, let's make it lowercase to improve readability.
24587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24588      # Now convert it back to Unix-style (cygpath)
24589      input_path=`$CYGPATH -u "$shortmode_path"`
24590      new_path="$input_path"
24591    fi
24592  fi
24593
24594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24595  if test "x$test_cygdrive_prefix" = x; then
24596    # As a simple fix, exclude /usr/bin since it's not a real path.
24597    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24599      # a path prefixed by /cygdrive for fixpath to work.
24600      new_path="$CYGWIN_ROOT_PATH$input_path"
24601    fi
24602  fi
24603
24604
24605  if test "x$path" != "x$new_path"; then
24606    BOOT_JDK="$new_path"
24607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24608$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24609  fi
24610
24611    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24612
24613  path="$BOOT_JDK"
24614  has_colon=`$ECHO $path | $GREP ^.:`
24615  new_path="$path"
24616  if test "x$has_colon" = x; then
24617    # Not in mixed or Windows style, start by that.
24618    new_path=`cmd //c echo $path`
24619  fi
24620
24621
24622  input_path="$new_path"
24623  # Check if we need to convert this using DOS-style short mode. If the path
24624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24625  # take no chances and rewrite it.
24626  # Note: m4 eats our [], so we need to use [ and ] instead.
24627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24628  if test "x$has_forbidden_chars" != x; then
24629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24630    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24631  fi
24632
24633
24634  windows_path="$new_path"
24635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24636    unix_path=`$CYGPATH -u "$windows_path"`
24637    new_path="$unix_path"
24638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24640    new_path="$unix_path"
24641  fi
24642
24643  if test "x$path" != "x$new_path"; then
24644    BOOT_JDK="$new_path"
24645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24646$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24647  fi
24648
24649  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24650  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24651
24652    else
24653      # We're on a unix platform. Hooray! :)
24654      path="$BOOT_JDK"
24655      has_space=`$ECHO "$path" | $GREP " "`
24656      if test "x$has_space" != x; then
24657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24658$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24659        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24660      fi
24661
24662      # Use eval to expand a potential ~
24663      eval path="$path"
24664      if test ! -f "$path" && test ! -d "$path"; then
24665        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24666      fi
24667
24668      if test -d "$path"; then
24669        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24670      else
24671        dir="`$DIRNAME "$path"`"
24672        base="`$BASENAME "$path"`"
24673        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24674      fi
24675    fi
24676  fi
24677
24678            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24679$as_echo_n "checking for Boot JDK... " >&6; }
24680            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24681$as_echo "$BOOT_JDK" >&6; }
24682            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24683$as_echo_n "checking Boot JDK version... " >&6; }
24684            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24686$as_echo "$BOOT_JDK_VERSION" >&6; }
24687          fi # end check jdk version
24688        fi # end check javac
24689      fi # end check java
24690    fi # end check boot jdk found
24691  fi
24692
24693    # If that did not work out (e.g. too old), try explicit versions instead
24694
24695  if test "x$BOOT_JDK_FOUND" = xno; then
24696    # Now execute the test
24697
24698  if test -x /usr/libexec/java_home; then
24699    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24700    BOOT_JDK_FOUND=maybe
24701    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24702$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24703  fi
24704
24705
24706    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24707    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24708      # Do we have a bin/java?
24709      if test ! -x "$BOOT_JDK/bin/java"; then
24710        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24711$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24712        BOOT_JDK_FOUND=no
24713      else
24714        # Do we have a bin/javac?
24715        if test ! -x "$BOOT_JDK/bin/javac"; then
24716          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24718          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24719$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24720          BOOT_JDK_FOUND=no
24721        else
24722          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24723          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24724
24725          # Extra M4 quote needed to protect [] in grep expression.
24726          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24727          if test "x$FOUND_CORRECT_VERSION" = x; then
24728            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24729$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24730            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24731$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24732            BOOT_JDK_FOUND=no
24733          else
24734            # We're done! :-)
24735            BOOT_JDK_FOUND=yes
24736
24737  # Only process if variable expands to non-empty
24738
24739  if test "x$BOOT_JDK" != x; then
24740    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24741
24742  # Input might be given as Windows format, start by converting to
24743  # unix format.
24744  path="$BOOT_JDK"
24745  new_path=`$CYGPATH -u "$path"`
24746
24747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24750  # "foo.exe" is OK but "foo" is an error.
24751  #
24752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24753  # It is also a way to make sure we got the proper file name for the real test later on.
24754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24755  if test "x$test_shortpath" = x; then
24756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24759  fi
24760
24761  # Call helper function which possibly converts this using DOS-style short mode.
24762  # If so, the updated path is stored in $new_path.
24763
24764  input_path="$new_path"
24765  # Check if we need to convert this using DOS-style short mode. If the path
24766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24767  # take no chances and rewrite it.
24768  # Note: m4 eats our [], so we need to use [ and ] instead.
24769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24770  if test "x$has_forbidden_chars" != x; then
24771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24775      # Going to short mode and back again did indeed matter. Since short mode is
24776      # case insensitive, let's make it lowercase to improve readability.
24777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24778      # Now convert it back to Unix-style (cygpath)
24779      input_path=`$CYGPATH -u "$shortmode_path"`
24780      new_path="$input_path"
24781    fi
24782  fi
24783
24784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24785  if test "x$test_cygdrive_prefix" = x; then
24786    # As a simple fix, exclude /usr/bin since it's not a real path.
24787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24789      # a path prefixed by /cygdrive for fixpath to work.
24790      new_path="$CYGWIN_ROOT_PATH$input_path"
24791    fi
24792  fi
24793
24794
24795  if test "x$path" != "x$new_path"; then
24796    BOOT_JDK="$new_path"
24797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24799  fi
24800
24801    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24802
24803  path="$BOOT_JDK"
24804  has_colon=`$ECHO $path | $GREP ^.:`
24805  new_path="$path"
24806  if test "x$has_colon" = x; then
24807    # Not in mixed or Windows style, start by that.
24808    new_path=`cmd //c echo $path`
24809  fi
24810
24811
24812  input_path="$new_path"
24813  # Check if we need to convert this using DOS-style short mode. If the path
24814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24815  # take no chances and rewrite it.
24816  # Note: m4 eats our [], so we need to use [ and ] instead.
24817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24818  if test "x$has_forbidden_chars" != x; then
24819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24821  fi
24822
24823
24824  windows_path="$new_path"
24825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24826    unix_path=`$CYGPATH -u "$windows_path"`
24827    new_path="$unix_path"
24828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24830    new_path="$unix_path"
24831  fi
24832
24833  if test "x$path" != "x$new_path"; then
24834    BOOT_JDK="$new_path"
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24837  fi
24838
24839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24841
24842    else
24843      # We're on a unix platform. Hooray! :)
24844      path="$BOOT_JDK"
24845      has_space=`$ECHO "$path" | $GREP " "`
24846      if test "x$has_space" != x; then
24847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24849        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24850      fi
24851
24852      # Use eval to expand a potential ~
24853      eval path="$path"
24854      if test ! -f "$path" && test ! -d "$path"; then
24855        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24856      fi
24857
24858      if test -d "$path"; then
24859        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24860      else
24861        dir="`$DIRNAME "$path"`"
24862        base="`$BASENAME "$path"`"
24863        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24864      fi
24865    fi
24866  fi
24867
24868            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24869$as_echo_n "checking for Boot JDK... " >&6; }
24870            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24871$as_echo "$BOOT_JDK" >&6; }
24872            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24873$as_echo_n "checking Boot JDK version... " >&6; }
24874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24876$as_echo "$BOOT_JDK_VERSION" >&6; }
24877          fi # end check jdk version
24878        fi # end check javac
24879      fi # end check java
24880    fi # end check boot jdk found
24881  fi
24882
24883
24884  if test "x$BOOT_JDK_FOUND" = xno; then
24885    # Now execute the test
24886
24887  if test -x /usr/libexec/java_home; then
24888    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24889    BOOT_JDK_FOUND=maybe
24890    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24891$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24892  fi
24893
24894
24895    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24896    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24897      # Do we have a bin/java?
24898      if test ! -x "$BOOT_JDK/bin/java"; then
24899        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24901        BOOT_JDK_FOUND=no
24902      else
24903        # Do we have a bin/javac?
24904        if test ! -x "$BOOT_JDK/bin/javac"; then
24905          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24907          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24908$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24909          BOOT_JDK_FOUND=no
24910        else
24911          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24912          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24913
24914          # Extra M4 quote needed to protect [] in grep expression.
24915          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24916          if test "x$FOUND_CORRECT_VERSION" = x; then
24917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24919            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24920$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24921            BOOT_JDK_FOUND=no
24922          else
24923            # We're done! :-)
24924            BOOT_JDK_FOUND=yes
24925
24926  # Only process if variable expands to non-empty
24927
24928  if test "x$BOOT_JDK" != x; then
24929    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24930
24931  # Input might be given as Windows format, start by converting to
24932  # unix format.
24933  path="$BOOT_JDK"
24934  new_path=`$CYGPATH -u "$path"`
24935
24936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24939  # "foo.exe" is OK but "foo" is an error.
24940  #
24941  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24942  # It is also a way to make sure we got the proper file name for the real test later on.
24943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24944  if test "x$test_shortpath" = x; then
24945    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24946$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24947    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24948  fi
24949
24950  # Call helper function which possibly converts this using DOS-style short mode.
24951  # If so, the updated path is stored in $new_path.
24952
24953  input_path="$new_path"
24954  # Check if we need to convert this using DOS-style short mode. If the path
24955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24956  # take no chances and rewrite it.
24957  # Note: m4 eats our [], so we need to use [ and ] instead.
24958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24959  if test "x$has_forbidden_chars" != x; then
24960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24961    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24962    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24963    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24964      # Going to short mode and back again did indeed matter. Since short mode is
24965      # case insensitive, let's make it lowercase to improve readability.
24966      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24967      # Now convert it back to Unix-style (cygpath)
24968      input_path=`$CYGPATH -u "$shortmode_path"`
24969      new_path="$input_path"
24970    fi
24971  fi
24972
24973  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24974  if test "x$test_cygdrive_prefix" = x; then
24975    # As a simple fix, exclude /usr/bin since it's not a real path.
24976    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24977      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24978      # a path prefixed by /cygdrive for fixpath to work.
24979      new_path="$CYGWIN_ROOT_PATH$input_path"
24980    fi
24981  fi
24982
24983
24984  if test "x$path" != "x$new_path"; then
24985    BOOT_JDK="$new_path"
24986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24988  fi
24989
24990    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24991
24992  path="$BOOT_JDK"
24993  has_colon=`$ECHO $path | $GREP ^.:`
24994  new_path="$path"
24995  if test "x$has_colon" = x; then
24996    # Not in mixed or Windows style, start by that.
24997    new_path=`cmd //c echo $path`
24998  fi
24999
25000
25001  input_path="$new_path"
25002  # Check if we need to convert this using DOS-style short mode. If the path
25003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25004  # take no chances and rewrite it.
25005  # Note: m4 eats our [], so we need to use [ and ] instead.
25006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25007  if test "x$has_forbidden_chars" != x; then
25008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25010  fi
25011
25012
25013  windows_path="$new_path"
25014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25015    unix_path=`$CYGPATH -u "$windows_path"`
25016    new_path="$unix_path"
25017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25019    new_path="$unix_path"
25020  fi
25021
25022  if test "x$path" != "x$new_path"; then
25023    BOOT_JDK="$new_path"
25024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25026  fi
25027
25028  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25029  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25030
25031    else
25032      # We're on a unix platform. Hooray! :)
25033      path="$BOOT_JDK"
25034      has_space=`$ECHO "$path" | $GREP " "`
25035      if test "x$has_space" != x; then
25036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25038        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25039      fi
25040
25041      # Use eval to expand a potential ~
25042      eval path="$path"
25043      if test ! -f "$path" && test ! -d "$path"; then
25044        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25045      fi
25046
25047      if test -d "$path"; then
25048        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25049      else
25050        dir="`$DIRNAME "$path"`"
25051        base="`$BASENAME "$path"`"
25052        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25053      fi
25054    fi
25055  fi
25056
25057            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25058$as_echo_n "checking for Boot JDK... " >&6; }
25059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25060$as_echo "$BOOT_JDK" >&6; }
25061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25062$as_echo_n "checking Boot JDK version... " >&6; }
25063            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25065$as_echo "$BOOT_JDK_VERSION" >&6; }
25066          fi # end check jdk version
25067        fi # end check javac
25068      fi # end check java
25069    fi # end check boot jdk found
25070  fi
25071
25072
25073  if test "x$BOOT_JDK_FOUND" = xno; then
25074    # Now execute the test
25075
25076  if test -x /usr/libexec/java_home; then
25077    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25078    BOOT_JDK_FOUND=maybe
25079    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25080$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25081  fi
25082
25083
25084    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25085    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25086      # Do we have a bin/java?
25087      if test ! -x "$BOOT_JDK/bin/java"; then
25088        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25089$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25090        BOOT_JDK_FOUND=no
25091      else
25092        # Do we have a bin/javac?
25093        if test ! -x "$BOOT_JDK/bin/javac"; then
25094          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25096          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25097$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25098          BOOT_JDK_FOUND=no
25099        else
25100          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25101          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25102
25103          # Extra M4 quote needed to protect [] in grep expression.
25104          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25105          if test "x$FOUND_CORRECT_VERSION" = x; then
25106            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25107$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25108            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25109$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25110            BOOT_JDK_FOUND=no
25111          else
25112            # We're done! :-)
25113            BOOT_JDK_FOUND=yes
25114
25115  # Only process if variable expands to non-empty
25116
25117  if test "x$BOOT_JDK" != x; then
25118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25119
25120  # Input might be given as Windows format, start by converting to
25121  # unix format.
25122  path="$BOOT_JDK"
25123  new_path=`$CYGPATH -u "$path"`
25124
25125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25128  # "foo.exe" is OK but "foo" is an error.
25129  #
25130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25131  # It is also a way to make sure we got the proper file name for the real test later on.
25132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25133  if test "x$test_shortpath" = x; then
25134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25136    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25137  fi
25138
25139  # Call helper function which possibly converts this using DOS-style short mode.
25140  # If so, the updated path is stored in $new_path.
25141
25142  input_path="$new_path"
25143  # Check if we need to convert this using DOS-style short mode. If the path
25144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25145  # take no chances and rewrite it.
25146  # Note: m4 eats our [], so we need to use [ and ] instead.
25147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25148  if test "x$has_forbidden_chars" != x; then
25149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25153      # Going to short mode and back again did indeed matter. Since short mode is
25154      # case insensitive, let's make it lowercase to improve readability.
25155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25156      # Now convert it back to Unix-style (cygpath)
25157      input_path=`$CYGPATH -u "$shortmode_path"`
25158      new_path="$input_path"
25159    fi
25160  fi
25161
25162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25163  if test "x$test_cygdrive_prefix" = x; then
25164    # As a simple fix, exclude /usr/bin since it's not a real path.
25165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25167      # a path prefixed by /cygdrive for fixpath to work.
25168      new_path="$CYGWIN_ROOT_PATH$input_path"
25169    fi
25170  fi
25171
25172
25173  if test "x$path" != "x$new_path"; then
25174    BOOT_JDK="$new_path"
25175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25177  fi
25178
25179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25180
25181  path="$BOOT_JDK"
25182  has_colon=`$ECHO $path | $GREP ^.:`
25183  new_path="$path"
25184  if test "x$has_colon" = x; then
25185    # Not in mixed or Windows style, start by that.
25186    new_path=`cmd //c echo $path`
25187  fi
25188
25189
25190  input_path="$new_path"
25191  # Check if we need to convert this using DOS-style short mode. If the path
25192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25193  # take no chances and rewrite it.
25194  # Note: m4 eats our [], so we need to use [ and ] instead.
25195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25196  if test "x$has_forbidden_chars" != x; then
25197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25199  fi
25200
25201
25202  windows_path="$new_path"
25203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25204    unix_path=`$CYGPATH -u "$windows_path"`
25205    new_path="$unix_path"
25206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25208    new_path="$unix_path"
25209  fi
25210
25211  if test "x$path" != "x$new_path"; then
25212    BOOT_JDK="$new_path"
25213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25214$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25215  fi
25216
25217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25219
25220    else
25221      # We're on a unix platform. Hooray! :)
25222      path="$BOOT_JDK"
25223      has_space=`$ECHO "$path" | $GREP " "`
25224      if test "x$has_space" != x; then
25225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25226$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25228      fi
25229
25230      # Use eval to expand a potential ~
25231      eval path="$path"
25232      if test ! -f "$path" && test ! -d "$path"; then
25233        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25234      fi
25235
25236      if test -d "$path"; then
25237        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25238      else
25239        dir="`$DIRNAME "$path"`"
25240        base="`$BASENAME "$path"`"
25241        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25242      fi
25243    fi
25244  fi
25245
25246            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25247$as_echo_n "checking for Boot JDK... " >&6; }
25248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25249$as_echo "$BOOT_JDK" >&6; }
25250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25251$as_echo_n "checking Boot JDK version... " >&6; }
25252            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25254$as_echo "$BOOT_JDK_VERSION" >&6; }
25255          fi # end check jdk version
25256        fi # end check javac
25257      fi # end check java
25258    fi # end check boot jdk found
25259  fi
25260
25261  fi
25262
25263
25264    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25265    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25266      # Do we have a bin/java?
25267      if test ! -x "$BOOT_JDK/bin/java"; then
25268        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25270        BOOT_JDK_FOUND=no
25271      else
25272        # Do we have a bin/javac?
25273        if test ! -x "$BOOT_JDK/bin/javac"; then
25274          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25276          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25277$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25278          BOOT_JDK_FOUND=no
25279        else
25280          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25281          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25282
25283          # Extra M4 quote needed to protect [] in grep expression.
25284          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25285          if test "x$FOUND_CORRECT_VERSION" = x; then
25286            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25287$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25288            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25289$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25290            BOOT_JDK_FOUND=no
25291          else
25292            # We're done! :-)
25293            BOOT_JDK_FOUND=yes
25294
25295  # Only process if variable expands to non-empty
25296
25297  if test "x$BOOT_JDK" != x; then
25298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299
25300  # Input might be given as Windows format, start by converting to
25301  # unix format.
25302  path="$BOOT_JDK"
25303  new_path=`$CYGPATH -u "$path"`
25304
25305  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25306  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25307  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25308  # "foo.exe" is OK but "foo" is an error.
25309  #
25310  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25311  # It is also a way to make sure we got the proper file name for the real test later on.
25312  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25313  if test "x$test_shortpath" = x; then
25314    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25316    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25317  fi
25318
25319  # Call helper function which possibly converts this using DOS-style short mode.
25320  # If so, the updated path is stored in $new_path.
25321
25322  input_path="$new_path"
25323  # Check if we need to convert this using DOS-style short mode. If the path
25324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25325  # take no chances and rewrite it.
25326  # Note: m4 eats our [], so we need to use [ and ] instead.
25327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25328  if test "x$has_forbidden_chars" != x; then
25329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25333      # Going to short mode and back again did indeed matter. Since short mode is
25334      # case insensitive, let's make it lowercase to improve readability.
25335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25336      # Now convert it back to Unix-style (cygpath)
25337      input_path=`$CYGPATH -u "$shortmode_path"`
25338      new_path="$input_path"
25339    fi
25340  fi
25341
25342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25343  if test "x$test_cygdrive_prefix" = x; then
25344    # As a simple fix, exclude /usr/bin since it's not a real path.
25345    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25347      # a path prefixed by /cygdrive for fixpath to work.
25348      new_path="$CYGWIN_ROOT_PATH$input_path"
25349    fi
25350  fi
25351
25352
25353  if test "x$path" != "x$new_path"; then
25354    BOOT_JDK="$new_path"
25355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25356$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25357  fi
25358
25359    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25360
25361  path="$BOOT_JDK"
25362  has_colon=`$ECHO $path | $GREP ^.:`
25363  new_path="$path"
25364  if test "x$has_colon" = x; then
25365    # Not in mixed or Windows style, start by that.
25366    new_path=`cmd //c echo $path`
25367  fi
25368
25369
25370  input_path="$new_path"
25371  # Check if we need to convert this using DOS-style short mode. If the path
25372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25373  # take no chances and rewrite it.
25374  # Note: m4 eats our [], so we need to use [ and ] instead.
25375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25376  if test "x$has_forbidden_chars" != x; then
25377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25378    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25379  fi
25380
25381
25382  windows_path="$new_path"
25383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25384    unix_path=`$CYGPATH -u "$windows_path"`
25385    new_path="$unix_path"
25386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25388    new_path="$unix_path"
25389  fi
25390
25391  if test "x$path" != "x$new_path"; then
25392    BOOT_JDK="$new_path"
25393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25394$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25395  fi
25396
25397  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25398  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25399
25400    else
25401      # We're on a unix platform. Hooray! :)
25402      path="$BOOT_JDK"
25403      has_space=`$ECHO "$path" | $GREP " "`
25404      if test "x$has_space" != x; then
25405        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25406$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25407        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25408      fi
25409
25410      # Use eval to expand a potential ~
25411      eval path="$path"
25412      if test ! -f "$path" && test ! -d "$path"; then
25413        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25414      fi
25415
25416      if test -d "$path"; then
25417        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25418      else
25419        dir="`$DIRNAME "$path"`"
25420        base="`$BASENAME "$path"`"
25421        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25422      fi
25423    fi
25424  fi
25425
25426            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25427$as_echo_n "checking for Boot JDK... " >&6; }
25428            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25429$as_echo "$BOOT_JDK" >&6; }
25430            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25431$as_echo_n "checking Boot JDK version... " >&6; }
25432            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25434$as_echo "$BOOT_JDK_VERSION" >&6; }
25435          fi # end check jdk version
25436        fi # end check javac
25437      fi # end check java
25438    fi # end check boot jdk found
25439  fi
25440
25441
25442  # Test: Is $JAVA_HOME set?
25443
25444  if test "x$BOOT_JDK_FOUND" = xno; then
25445    # Now execute the test
25446
25447  if test "x$JAVA_HOME" != x; then
25448    JAVA_HOME_PROCESSED="$JAVA_HOME"
25449
25450  # Only process if variable expands to non-empty
25451
25452  if test "x$JAVA_HOME_PROCESSED" != x; then
25453    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25454
25455  # Input might be given as Windows format, start by converting to
25456  # unix format.
25457  path="$JAVA_HOME_PROCESSED"
25458  new_path=`$CYGPATH -u "$path"`
25459
25460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25463  # "foo.exe" is OK but "foo" is an error.
25464  #
25465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25466  # It is also a way to make sure we got the proper file name for the real test later on.
25467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25468  if test "x$test_shortpath" = x; then
25469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25470$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25471    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25472  fi
25473
25474  # Call helper function which possibly converts this using DOS-style short mode.
25475  # If so, the updated path is stored in $new_path.
25476
25477  input_path="$new_path"
25478  # Check if we need to convert this using DOS-style short mode. If the path
25479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25480  # take no chances and rewrite it.
25481  # Note: m4 eats our [], so we need to use [ and ] instead.
25482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25483  if test "x$has_forbidden_chars" != x; then
25484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25488      # Going to short mode and back again did indeed matter. Since short mode is
25489      # case insensitive, let's make it lowercase to improve readability.
25490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25491      # Now convert it back to Unix-style (cygpath)
25492      input_path=`$CYGPATH -u "$shortmode_path"`
25493      new_path="$input_path"
25494    fi
25495  fi
25496
25497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25498  if test "x$test_cygdrive_prefix" = x; then
25499    # As a simple fix, exclude /usr/bin since it's not a real path.
25500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25502      # a path prefixed by /cygdrive for fixpath to work.
25503      new_path="$CYGWIN_ROOT_PATH$input_path"
25504    fi
25505  fi
25506
25507
25508  if test "x$path" != "x$new_path"; then
25509    JAVA_HOME_PROCESSED="$new_path"
25510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25511$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25512  fi
25513
25514    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25515
25516  path="$JAVA_HOME_PROCESSED"
25517  has_colon=`$ECHO $path | $GREP ^.:`
25518  new_path="$path"
25519  if test "x$has_colon" = x; then
25520    # Not in mixed or Windows style, start by that.
25521    new_path=`cmd //c echo $path`
25522  fi
25523
25524
25525  input_path="$new_path"
25526  # Check if we need to convert this using DOS-style short mode. If the path
25527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25528  # take no chances and rewrite it.
25529  # Note: m4 eats our [], so we need to use [ and ] instead.
25530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25531  if test "x$has_forbidden_chars" != x; then
25532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25534  fi
25535
25536
25537  windows_path="$new_path"
25538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25539    unix_path=`$CYGPATH -u "$windows_path"`
25540    new_path="$unix_path"
25541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25543    new_path="$unix_path"
25544  fi
25545
25546  if test "x$path" != "x$new_path"; then
25547    JAVA_HOME_PROCESSED="$new_path"
25548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25549$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25550  fi
25551
25552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25554
25555    else
25556      # We're on a unix platform. Hooray! :)
25557      path="$JAVA_HOME_PROCESSED"
25558      has_space=`$ECHO "$path" | $GREP " "`
25559      if test "x$has_space" != x; then
25560        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25561$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25562        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25563      fi
25564
25565      # Use eval to expand a potential ~
25566      eval path="$path"
25567      if test ! -f "$path" && test ! -d "$path"; then
25568        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25569      fi
25570
25571      if test -d "$path"; then
25572        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25573      else
25574        dir="`$DIRNAME "$path"`"
25575        base="`$BASENAME "$path"`"
25576        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25577      fi
25578    fi
25579  fi
25580
25581    if test ! -d "$JAVA_HOME_PROCESSED"; then
25582      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25583$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25584    else
25585      # Aha, the user has set a JAVA_HOME
25586      # let us use that as the Boot JDK.
25587      BOOT_JDK="$JAVA_HOME_PROCESSED"
25588      BOOT_JDK_FOUND=maybe
25589      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25590$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25591    fi
25592  fi
25593
25594
25595    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25596    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25597      # Do we have a bin/java?
25598      if test ! -x "$BOOT_JDK/bin/java"; then
25599        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25601        BOOT_JDK_FOUND=no
25602      else
25603        # Do we have a bin/javac?
25604        if test ! -x "$BOOT_JDK/bin/javac"; then
25605          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25607          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25608$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25609          BOOT_JDK_FOUND=no
25610        else
25611          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25612          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25613
25614          # Extra M4 quote needed to protect [] in grep expression.
25615          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25616          if test "x$FOUND_CORRECT_VERSION" = x; then
25617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25619            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25620$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25621            BOOT_JDK_FOUND=no
25622          else
25623            # We're done! :-)
25624            BOOT_JDK_FOUND=yes
25625
25626  # Only process if variable expands to non-empty
25627
25628  if test "x$BOOT_JDK" != x; then
25629    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25630
25631  # Input might be given as Windows format, start by converting to
25632  # unix format.
25633  path="$BOOT_JDK"
25634  new_path=`$CYGPATH -u "$path"`
25635
25636  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25637  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25638  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25639  # "foo.exe" is OK but "foo" is an error.
25640  #
25641  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25642  # It is also a way to make sure we got the proper file name for the real test later on.
25643  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25644  if test "x$test_shortpath" = x; then
25645    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25647    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25648  fi
25649
25650  # Call helper function which possibly converts this using DOS-style short mode.
25651  # If so, the updated path is stored in $new_path.
25652
25653  input_path="$new_path"
25654  # Check if we need to convert this using DOS-style short mode. If the path
25655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25656  # take no chances and rewrite it.
25657  # Note: m4 eats our [], so we need to use [ and ] instead.
25658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25659  if test "x$has_forbidden_chars" != x; then
25660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25664      # Going to short mode and back again did indeed matter. Since short mode is
25665      # case insensitive, let's make it lowercase to improve readability.
25666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25667      # Now convert it back to Unix-style (cygpath)
25668      input_path=`$CYGPATH -u "$shortmode_path"`
25669      new_path="$input_path"
25670    fi
25671  fi
25672
25673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25674  if test "x$test_cygdrive_prefix" = x; then
25675    # As a simple fix, exclude /usr/bin since it's not a real path.
25676    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25678      # a path prefixed by /cygdrive for fixpath to work.
25679      new_path="$CYGWIN_ROOT_PATH$input_path"
25680    fi
25681  fi
25682
25683
25684  if test "x$path" != "x$new_path"; then
25685    BOOT_JDK="$new_path"
25686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25688  fi
25689
25690    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25691
25692  path="$BOOT_JDK"
25693  has_colon=`$ECHO $path | $GREP ^.:`
25694  new_path="$path"
25695  if test "x$has_colon" = x; then
25696    # Not in mixed or Windows style, start by that.
25697    new_path=`cmd //c echo $path`
25698  fi
25699
25700
25701  input_path="$new_path"
25702  # Check if we need to convert this using DOS-style short mode. If the path
25703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25704  # take no chances and rewrite it.
25705  # Note: m4 eats our [], so we need to use [ and ] instead.
25706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25707  if test "x$has_forbidden_chars" != x; then
25708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25709    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25710  fi
25711
25712
25713  windows_path="$new_path"
25714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25715    unix_path=`$CYGPATH -u "$windows_path"`
25716    new_path="$unix_path"
25717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25719    new_path="$unix_path"
25720  fi
25721
25722  if test "x$path" != "x$new_path"; then
25723    BOOT_JDK="$new_path"
25724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25725$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25726  fi
25727
25728  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25729  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25730
25731    else
25732      # We're on a unix platform. Hooray! :)
25733      path="$BOOT_JDK"
25734      has_space=`$ECHO "$path" | $GREP " "`
25735      if test "x$has_space" != x; then
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25738        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25739      fi
25740
25741      # Use eval to expand a potential ~
25742      eval path="$path"
25743      if test ! -f "$path" && test ! -d "$path"; then
25744        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25745      fi
25746
25747      if test -d "$path"; then
25748        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25749      else
25750        dir="`$DIRNAME "$path"`"
25751        base="`$BASENAME "$path"`"
25752        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25753      fi
25754    fi
25755  fi
25756
25757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25758$as_echo_n "checking for Boot JDK... " >&6; }
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25760$as_echo "$BOOT_JDK" >&6; }
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25762$as_echo_n "checking Boot JDK version... " >&6; }
25763            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25764            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25765$as_echo "$BOOT_JDK_VERSION" >&6; }
25766          fi # end check jdk version
25767        fi # end check javac
25768      fi # end check java
25769    fi # end check boot jdk found
25770  fi
25771
25772
25773  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25774
25775  if test "x$BOOT_JDK_FOUND" = xno; then
25776    # Now execute the test
25777
25778  # Extract the first word of "javac", so it can be a program name with args.
25779set dummy javac; ac_word=$2
25780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25781$as_echo_n "checking for $ac_word... " >&6; }
25782if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25783  $as_echo_n "(cached) " >&6
25784else
25785  case $JAVAC_CHECK in
25786  [\\/]* | ?:[\\/]*)
25787  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25788  ;;
25789  *)
25790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25791for as_dir in $PATH
25792do
25793  IFS=$as_save_IFS
25794  test -z "$as_dir" && as_dir=.
25795    for ac_exec_ext in '' $ac_executable_extensions; do
25796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25797    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25799    break 2
25800  fi
25801done
25802  done
25803IFS=$as_save_IFS
25804
25805  ;;
25806esac
25807fi
25808JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25809if test -n "$JAVAC_CHECK"; then
25810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25811$as_echo "$JAVAC_CHECK" >&6; }
25812else
25813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25814$as_echo "no" >&6; }
25815fi
25816
25817
25818  # Extract the first word of "java", so it can be a program name with args.
25819set dummy java; ac_word=$2
25820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25821$as_echo_n "checking for $ac_word... " >&6; }
25822if ${ac_cv_path_JAVA_CHECK+:} false; then :
25823  $as_echo_n "(cached) " >&6
25824else
25825  case $JAVA_CHECK in
25826  [\\/]* | ?:[\\/]*)
25827  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25828  ;;
25829  *)
25830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25831for as_dir in $PATH
25832do
25833  IFS=$as_save_IFS
25834  test -z "$as_dir" && as_dir=.
25835    for ac_exec_ext in '' $ac_executable_extensions; do
25836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25837    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25839    break 2
25840  fi
25841done
25842  done
25843IFS=$as_save_IFS
25844
25845  ;;
25846esac
25847fi
25848JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25849if test -n "$JAVA_CHECK"; then
25850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25851$as_echo "$JAVA_CHECK" >&6; }
25852else
25853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25854$as_echo "no" >&6; }
25855fi
25856
25857
25858  BINARY="$JAVAC_CHECK"
25859  if test "x$JAVAC_CHECK" = x; then
25860    BINARY="$JAVA_CHECK"
25861  fi
25862  if test "x$BINARY" != x; then
25863    # So there is a java(c) binary, it might be part of a JDK.
25864    # Lets find the JDK/JRE directory by following symbolic links.
25865    # Linux/GNU systems often have links from /usr/bin/java to
25866    # /etc/alternatives/java to the real JDK binary.
25867
25868  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25869    # Follow a chain of symbolic links. Use readlink
25870    # where it exists, else fall back to horribly
25871    # complicated shell code.
25872    if test "x$READLINK_TESTED" != yes; then
25873      # On MacOSX there is a readlink tool with a different
25874      # purpose than the GNU readlink tool. Check the found readlink.
25875      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25876      if test "x$ISGNU" = x; then
25877        # A readlink that we do not know how to use.
25878        # Are there other non-GNU readlinks out there?
25879        READLINK_TESTED=yes
25880        READLINK=
25881      fi
25882    fi
25883
25884    if test "x$READLINK" != x; then
25885      BINARY=`$READLINK -f $BINARY`
25886    else
25887      # Save the current directory for restoring afterwards
25888      STARTDIR=$PWD
25889      COUNTER=0
25890      sym_link_dir=`$DIRNAME $BINARY`
25891      sym_link_file=`$BASENAME $BINARY`
25892      cd $sym_link_dir
25893      # Use -P flag to resolve symlinks in directories.
25894      cd `$THEPWDCMD -P`
25895      sym_link_dir=`$THEPWDCMD -P`
25896      # Resolve file symlinks
25897      while test $COUNTER -lt 20; do
25898        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25899        if test "x$ISLINK" == x; then
25900          # This is not a symbolic link! We are done!
25901          break
25902        fi
25903        # Again resolve directory symlinks since the target of the just found
25904        # link could be in a different directory
25905        cd `$DIRNAME $ISLINK`
25906        sym_link_dir=`$THEPWDCMD -P`
25907        sym_link_file=`$BASENAME $ISLINK`
25908        let COUNTER=COUNTER+1
25909      done
25910      cd $STARTDIR
25911      BINARY=$sym_link_dir/$sym_link_file
25912    fi
25913  fi
25914
25915    BOOT_JDK=`dirname "$BINARY"`
25916    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25917    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25918      # Looks like we found ourselves an JDK
25919      BOOT_JDK_FOUND=maybe
25920      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25921$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25922    fi
25923  fi
25924
25925
25926    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25927    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25928      # Do we have a bin/java?
25929      if test ! -x "$BOOT_JDK/bin/java"; then
25930        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25931$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25932        BOOT_JDK_FOUND=no
25933      else
25934        # Do we have a bin/javac?
25935        if test ! -x "$BOOT_JDK/bin/javac"; then
25936          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25938          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25939$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25940          BOOT_JDK_FOUND=no
25941        else
25942          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25943          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25944
25945          # Extra M4 quote needed to protect [] in grep expression.
25946          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25947          if test "x$FOUND_CORRECT_VERSION" = x; then
25948            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25950            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25951$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25952            BOOT_JDK_FOUND=no
25953          else
25954            # We're done! :-)
25955            BOOT_JDK_FOUND=yes
25956
25957  # Only process if variable expands to non-empty
25958
25959  if test "x$BOOT_JDK" != x; then
25960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25961
25962  # Input might be given as Windows format, start by converting to
25963  # unix format.
25964  path="$BOOT_JDK"
25965  new_path=`$CYGPATH -u "$path"`
25966
25967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25970  # "foo.exe" is OK but "foo" is an error.
25971  #
25972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25973  # It is also a way to make sure we got the proper file name for the real test later on.
25974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25975  if test "x$test_shortpath" = x; then
25976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25977$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25978    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25979  fi
25980
25981  # Call helper function which possibly converts this using DOS-style short mode.
25982  # If so, the updated path is stored in $new_path.
25983
25984  input_path="$new_path"
25985  # Check if we need to convert this using DOS-style short mode. If the path
25986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25987  # take no chances and rewrite it.
25988  # Note: m4 eats our [], so we need to use [ and ] instead.
25989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25990  if test "x$has_forbidden_chars" != x; then
25991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25995      # Going to short mode and back again did indeed matter. Since short mode is
25996      # case insensitive, let's make it lowercase to improve readability.
25997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25998      # Now convert it back to Unix-style (cygpath)
25999      input_path=`$CYGPATH -u "$shortmode_path"`
26000      new_path="$input_path"
26001    fi
26002  fi
26003
26004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26005  if test "x$test_cygdrive_prefix" = x; then
26006    # As a simple fix, exclude /usr/bin since it's not a real path.
26007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26009      # a path prefixed by /cygdrive for fixpath to work.
26010      new_path="$CYGWIN_ROOT_PATH$input_path"
26011    fi
26012  fi
26013
26014
26015  if test "x$path" != "x$new_path"; then
26016    BOOT_JDK="$new_path"
26017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26019  fi
26020
26021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26022
26023  path="$BOOT_JDK"
26024  has_colon=`$ECHO $path | $GREP ^.:`
26025  new_path="$path"
26026  if test "x$has_colon" = x; then
26027    # Not in mixed or Windows style, start by that.
26028    new_path=`cmd //c echo $path`
26029  fi
26030
26031
26032  input_path="$new_path"
26033  # Check if we need to convert this using DOS-style short mode. If the path
26034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26035  # take no chances and rewrite it.
26036  # Note: m4 eats our [], so we need to use [ and ] instead.
26037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26038  if test "x$has_forbidden_chars" != x; then
26039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26041  fi
26042
26043
26044  windows_path="$new_path"
26045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26046    unix_path=`$CYGPATH -u "$windows_path"`
26047    new_path="$unix_path"
26048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26050    new_path="$unix_path"
26051  fi
26052
26053  if test "x$path" != "x$new_path"; then
26054    BOOT_JDK="$new_path"
26055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26056$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26057  fi
26058
26059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26061
26062    else
26063      # We're on a unix platform. Hooray! :)
26064      path="$BOOT_JDK"
26065      has_space=`$ECHO "$path" | $GREP " "`
26066      if test "x$has_space" != x; then
26067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26070      fi
26071
26072      # Use eval to expand a potential ~
26073      eval path="$path"
26074      if test ! -f "$path" && test ! -d "$path"; then
26075        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26076      fi
26077
26078      if test -d "$path"; then
26079        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26080      else
26081        dir="`$DIRNAME "$path"`"
26082        base="`$BASENAME "$path"`"
26083        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26084      fi
26085    fi
26086  fi
26087
26088            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26089$as_echo_n "checking for Boot JDK... " >&6; }
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26091$as_echo "$BOOT_JDK" >&6; }
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26093$as_echo_n "checking Boot JDK version... " >&6; }
26094            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26095            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26096$as_echo "$BOOT_JDK_VERSION" >&6; }
26097          fi # end check jdk version
26098        fi # end check javac
26099      fi # end check java
26100    fi # end check boot jdk found
26101  fi
26102
26103
26104  # Test: Is there a JDK installed in default, well-known locations?
26105
26106  if test "x$BOOT_JDK_FOUND" = xno; then
26107    # Now execute the test
26108
26109  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26110
26111  if test "x$BOOT_JDK_FOUND" = xno; then
26112    # Now execute the test
26113
26114  if test "x$ProgramW6432" != x; then
26115    VIRTUAL_DIR="$ProgramW6432/Java"
26116
26117  windows_path="$VIRTUAL_DIR"
26118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26119    unix_path=`$CYGPATH -u "$windows_path"`
26120    VIRTUAL_DIR="$unix_path"
26121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26123    VIRTUAL_DIR="$unix_path"
26124  fi
26125
26126
26127  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26128  BOOT_JDK_SUFFIX=""
26129  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26130  if test "x$ALL_JDKS_FOUND" != x; then
26131    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26132
26133  if test "x$BOOT_JDK_FOUND" = xno; then
26134    # Now execute the test
26135
26136        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26137        if test -d "$BOOT_JDK"; then
26138          BOOT_JDK_FOUND=maybe
26139          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26140$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26141        fi
26142
26143
26144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26146      # Do we have a bin/java?
26147      if test ! -x "$BOOT_JDK/bin/java"; then
26148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26150        BOOT_JDK_FOUND=no
26151      else
26152        # Do we have a bin/javac?
26153        if test ! -x "$BOOT_JDK/bin/javac"; then
26154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26158          BOOT_JDK_FOUND=no
26159        else
26160          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26161          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26162
26163          # Extra M4 quote needed to protect [] in grep expression.
26164          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26165          if test "x$FOUND_CORRECT_VERSION" = x; then
26166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26168            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26169$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26170            BOOT_JDK_FOUND=no
26171          else
26172            # We're done! :-)
26173            BOOT_JDK_FOUND=yes
26174
26175  # Only process if variable expands to non-empty
26176
26177  if test "x$BOOT_JDK" != x; then
26178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26179
26180  # Input might be given as Windows format, start by converting to
26181  # unix format.
26182  path="$BOOT_JDK"
26183  new_path=`$CYGPATH -u "$path"`
26184
26185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26188  # "foo.exe" is OK but "foo" is an error.
26189  #
26190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26191  # It is also a way to make sure we got the proper file name for the real test later on.
26192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26193  if test "x$test_shortpath" = x; then
26194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26197  fi
26198
26199  # Call helper function which possibly converts this using DOS-style short mode.
26200  # If so, the updated path is stored in $new_path.
26201
26202  input_path="$new_path"
26203  # Check if we need to convert this using DOS-style short mode. If the path
26204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26205  # take no chances and rewrite it.
26206  # Note: m4 eats our [], so we need to use [ and ] instead.
26207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26208  if test "x$has_forbidden_chars" != x; then
26209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26213      # Going to short mode and back again did indeed matter. Since short mode is
26214      # case insensitive, let's make it lowercase to improve readability.
26215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26216      # Now convert it back to Unix-style (cygpath)
26217      input_path=`$CYGPATH -u "$shortmode_path"`
26218      new_path="$input_path"
26219    fi
26220  fi
26221
26222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26223  if test "x$test_cygdrive_prefix" = x; then
26224    # As a simple fix, exclude /usr/bin since it's not a real path.
26225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26227      # a path prefixed by /cygdrive for fixpath to work.
26228      new_path="$CYGWIN_ROOT_PATH$input_path"
26229    fi
26230  fi
26231
26232
26233  if test "x$path" != "x$new_path"; then
26234    BOOT_JDK="$new_path"
26235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26237  fi
26238
26239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26240
26241  path="$BOOT_JDK"
26242  has_colon=`$ECHO $path | $GREP ^.:`
26243  new_path="$path"
26244  if test "x$has_colon" = x; then
26245    # Not in mixed or Windows style, start by that.
26246    new_path=`cmd //c echo $path`
26247  fi
26248
26249
26250  input_path="$new_path"
26251  # Check if we need to convert this using DOS-style short mode. If the path
26252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26253  # take no chances and rewrite it.
26254  # Note: m4 eats our [], so we need to use [ and ] instead.
26255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26256  if test "x$has_forbidden_chars" != x; then
26257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26259  fi
26260
26261
26262  windows_path="$new_path"
26263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26264    unix_path=`$CYGPATH -u "$windows_path"`
26265    new_path="$unix_path"
26266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26268    new_path="$unix_path"
26269  fi
26270
26271  if test "x$path" != "x$new_path"; then
26272    BOOT_JDK="$new_path"
26273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26275  fi
26276
26277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26279
26280    else
26281      # We're on a unix platform. Hooray! :)
26282      path="$BOOT_JDK"
26283      has_space=`$ECHO "$path" | $GREP " "`
26284      if test "x$has_space" != x; then
26285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26288      fi
26289
26290      # Use eval to expand a potential ~
26291      eval path="$path"
26292      if test ! -f "$path" && test ! -d "$path"; then
26293        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26294      fi
26295
26296      if test -d "$path"; then
26297        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26298      else
26299        dir="`$DIRNAME "$path"`"
26300        base="`$BASENAME "$path"`"
26301        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26302      fi
26303    fi
26304  fi
26305
26306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26307$as_echo_n "checking for Boot JDK... " >&6; }
26308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26309$as_echo "$BOOT_JDK" >&6; }
26310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26311$as_echo_n "checking Boot JDK version... " >&6; }
26312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26314$as_echo "$BOOT_JDK_VERSION" >&6; }
26315          fi # end check jdk version
26316        fi # end check javac
26317      fi # end check java
26318    fi # end check boot jdk found
26319  fi
26320
26321    done
26322  fi
26323
26324  fi
26325
26326
26327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26329      # Do we have a bin/java?
26330      if test ! -x "$BOOT_JDK/bin/java"; then
26331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26333        BOOT_JDK_FOUND=no
26334      else
26335        # Do we have a bin/javac?
26336        if test ! -x "$BOOT_JDK/bin/javac"; then
26337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26341          BOOT_JDK_FOUND=no
26342        else
26343          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26344          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26345
26346          # Extra M4 quote needed to protect [] in grep expression.
26347          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26348          if test "x$FOUND_CORRECT_VERSION" = x; then
26349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26351            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26352$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26353            BOOT_JDK_FOUND=no
26354          else
26355            # We're done! :-)
26356            BOOT_JDK_FOUND=yes
26357
26358  # Only process if variable expands to non-empty
26359
26360  if test "x$BOOT_JDK" != x; then
26361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26362
26363  # Input might be given as Windows format, start by converting to
26364  # unix format.
26365  path="$BOOT_JDK"
26366  new_path=`$CYGPATH -u "$path"`
26367
26368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26371  # "foo.exe" is OK but "foo" is an error.
26372  #
26373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26374  # It is also a way to make sure we got the proper file name for the real test later on.
26375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26376  if test "x$test_shortpath" = x; then
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26379    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26380  fi
26381
26382  # Call helper function which possibly converts this using DOS-style short mode.
26383  # If so, the updated path is stored in $new_path.
26384
26385  input_path="$new_path"
26386  # Check if we need to convert this using DOS-style short mode. If the path
26387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26388  # take no chances and rewrite it.
26389  # Note: m4 eats our [], so we need to use [ and ] instead.
26390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26391  if test "x$has_forbidden_chars" != x; then
26392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26396      # Going to short mode and back again did indeed matter. Since short mode is
26397      # case insensitive, let's make it lowercase to improve readability.
26398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26399      # Now convert it back to Unix-style (cygpath)
26400      input_path=`$CYGPATH -u "$shortmode_path"`
26401      new_path="$input_path"
26402    fi
26403  fi
26404
26405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26406  if test "x$test_cygdrive_prefix" = x; then
26407    # As a simple fix, exclude /usr/bin since it's not a real path.
26408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26410      # a path prefixed by /cygdrive for fixpath to work.
26411      new_path="$CYGWIN_ROOT_PATH$input_path"
26412    fi
26413  fi
26414
26415
26416  if test "x$path" != "x$new_path"; then
26417    BOOT_JDK="$new_path"
26418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26420  fi
26421
26422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26423
26424  path="$BOOT_JDK"
26425  has_colon=`$ECHO $path | $GREP ^.:`
26426  new_path="$path"
26427  if test "x$has_colon" = x; then
26428    # Not in mixed or Windows style, start by that.
26429    new_path=`cmd //c echo $path`
26430  fi
26431
26432
26433  input_path="$new_path"
26434  # Check if we need to convert this using DOS-style short mode. If the path
26435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26436  # take no chances and rewrite it.
26437  # Note: m4 eats our [], so we need to use [ and ] instead.
26438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26439  if test "x$has_forbidden_chars" != x; then
26440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26442  fi
26443
26444
26445  windows_path="$new_path"
26446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26447    unix_path=`$CYGPATH -u "$windows_path"`
26448    new_path="$unix_path"
26449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26451    new_path="$unix_path"
26452  fi
26453
26454  if test "x$path" != "x$new_path"; then
26455    BOOT_JDK="$new_path"
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26458  fi
26459
26460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26462
26463    else
26464      # We're on a unix platform. Hooray! :)
26465      path="$BOOT_JDK"
26466      has_space=`$ECHO "$path" | $GREP " "`
26467      if test "x$has_space" != x; then
26468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26471      fi
26472
26473      # Use eval to expand a potential ~
26474      eval path="$path"
26475      if test ! -f "$path" && test ! -d "$path"; then
26476        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26477      fi
26478
26479      if test -d "$path"; then
26480        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26481      else
26482        dir="`$DIRNAME "$path"`"
26483        base="`$BASENAME "$path"`"
26484        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26485      fi
26486    fi
26487  fi
26488
26489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26490$as_echo_n "checking for Boot JDK... " >&6; }
26491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26492$as_echo "$BOOT_JDK" >&6; }
26493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26494$as_echo_n "checking Boot JDK version... " >&6; }
26495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26497$as_echo "$BOOT_JDK_VERSION" >&6; }
26498          fi # end check jdk version
26499        fi # end check javac
26500      fi # end check java
26501    fi # end check boot jdk found
26502  fi
26503
26504
26505  if test "x$BOOT_JDK_FOUND" = xno; then
26506    # Now execute the test
26507
26508  if test "x$PROGRAMW6432" != x; then
26509    VIRTUAL_DIR="$PROGRAMW6432/Java"
26510
26511  windows_path="$VIRTUAL_DIR"
26512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26513    unix_path=`$CYGPATH -u "$windows_path"`
26514    VIRTUAL_DIR="$unix_path"
26515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26517    VIRTUAL_DIR="$unix_path"
26518  fi
26519
26520
26521  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26522  BOOT_JDK_SUFFIX=""
26523  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26524  if test "x$ALL_JDKS_FOUND" != x; then
26525    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26526
26527  if test "x$BOOT_JDK_FOUND" = xno; then
26528    # Now execute the test
26529
26530        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26531        if test -d "$BOOT_JDK"; then
26532          BOOT_JDK_FOUND=maybe
26533          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26534$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26535        fi
26536
26537
26538    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26539    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26540      # Do we have a bin/java?
26541      if test ! -x "$BOOT_JDK/bin/java"; then
26542        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26544        BOOT_JDK_FOUND=no
26545      else
26546        # Do we have a bin/javac?
26547        if test ! -x "$BOOT_JDK/bin/javac"; then
26548          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26550          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26551$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26552          BOOT_JDK_FOUND=no
26553        else
26554          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26555          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26556
26557          # Extra M4 quote needed to protect [] in grep expression.
26558          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26559          if test "x$FOUND_CORRECT_VERSION" = x; then
26560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26562            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26563$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26564            BOOT_JDK_FOUND=no
26565          else
26566            # We're done! :-)
26567            BOOT_JDK_FOUND=yes
26568
26569  # Only process if variable expands to non-empty
26570
26571  if test "x$BOOT_JDK" != x; then
26572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26573
26574  # Input might be given as Windows format, start by converting to
26575  # unix format.
26576  path="$BOOT_JDK"
26577  new_path=`$CYGPATH -u "$path"`
26578
26579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26582  # "foo.exe" is OK but "foo" is an error.
26583  #
26584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26585  # It is also a way to make sure we got the proper file name for the real test later on.
26586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26587  if test "x$test_shortpath" = x; then
26588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26590    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26591  fi
26592
26593  # Call helper function which possibly converts this using DOS-style short mode.
26594  # If so, the updated path is stored in $new_path.
26595
26596  input_path="$new_path"
26597  # Check if we need to convert this using DOS-style short mode. If the path
26598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26599  # take no chances and rewrite it.
26600  # Note: m4 eats our [], so we need to use [ and ] instead.
26601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26602  if test "x$has_forbidden_chars" != x; then
26603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26607      # Going to short mode and back again did indeed matter. Since short mode is
26608      # case insensitive, let's make it lowercase to improve readability.
26609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26610      # Now convert it back to Unix-style (cygpath)
26611      input_path=`$CYGPATH -u "$shortmode_path"`
26612      new_path="$input_path"
26613    fi
26614  fi
26615
26616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26617  if test "x$test_cygdrive_prefix" = x; then
26618    # As a simple fix, exclude /usr/bin since it's not a real path.
26619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26621      # a path prefixed by /cygdrive for fixpath to work.
26622      new_path="$CYGWIN_ROOT_PATH$input_path"
26623    fi
26624  fi
26625
26626
26627  if test "x$path" != "x$new_path"; then
26628    BOOT_JDK="$new_path"
26629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26631  fi
26632
26633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26634
26635  path="$BOOT_JDK"
26636  has_colon=`$ECHO $path | $GREP ^.:`
26637  new_path="$path"
26638  if test "x$has_colon" = x; then
26639    # Not in mixed or Windows style, start by that.
26640    new_path=`cmd //c echo $path`
26641  fi
26642
26643
26644  input_path="$new_path"
26645  # Check if we need to convert this using DOS-style short mode. If the path
26646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26647  # take no chances and rewrite it.
26648  # Note: m4 eats our [], so we need to use [ and ] instead.
26649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26650  if test "x$has_forbidden_chars" != x; then
26651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26653  fi
26654
26655
26656  windows_path="$new_path"
26657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26658    unix_path=`$CYGPATH -u "$windows_path"`
26659    new_path="$unix_path"
26660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26662    new_path="$unix_path"
26663  fi
26664
26665  if test "x$path" != "x$new_path"; then
26666    BOOT_JDK="$new_path"
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26669  fi
26670
26671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26673
26674    else
26675      # We're on a unix platform. Hooray! :)
26676      path="$BOOT_JDK"
26677      has_space=`$ECHO "$path" | $GREP " "`
26678      if test "x$has_space" != x; then
26679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26682      fi
26683
26684      # Use eval to expand a potential ~
26685      eval path="$path"
26686      if test ! -f "$path" && test ! -d "$path"; then
26687        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26688      fi
26689
26690      if test -d "$path"; then
26691        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26692      else
26693        dir="`$DIRNAME "$path"`"
26694        base="`$BASENAME "$path"`"
26695        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26696      fi
26697    fi
26698  fi
26699
26700            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26701$as_echo_n "checking for Boot JDK... " >&6; }
26702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26703$as_echo "$BOOT_JDK" >&6; }
26704            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26705$as_echo_n "checking Boot JDK version... " >&6; }
26706            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26707            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26708$as_echo "$BOOT_JDK_VERSION" >&6; }
26709          fi # end check jdk version
26710        fi # end check javac
26711      fi # end check java
26712    fi # end check boot jdk found
26713  fi
26714
26715    done
26716  fi
26717
26718  fi
26719
26720
26721    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26722    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26723      # Do we have a bin/java?
26724      if test ! -x "$BOOT_JDK/bin/java"; then
26725        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26727        BOOT_JDK_FOUND=no
26728      else
26729        # Do we have a bin/javac?
26730        if test ! -x "$BOOT_JDK/bin/javac"; then
26731          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26733          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26734$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26735          BOOT_JDK_FOUND=no
26736        else
26737          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26738          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26739
26740          # Extra M4 quote needed to protect [] in grep expression.
26741          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26742          if test "x$FOUND_CORRECT_VERSION" = x; then
26743            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26745            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26746$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26747            BOOT_JDK_FOUND=no
26748          else
26749            # We're done! :-)
26750            BOOT_JDK_FOUND=yes
26751
26752  # Only process if variable expands to non-empty
26753
26754  if test "x$BOOT_JDK" != x; then
26755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26756
26757  # Input might be given as Windows format, start by converting to
26758  # unix format.
26759  path="$BOOT_JDK"
26760  new_path=`$CYGPATH -u "$path"`
26761
26762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26765  # "foo.exe" is OK but "foo" is an error.
26766  #
26767  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26768  # It is also a way to make sure we got the proper file name for the real test later on.
26769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26770  if test "x$test_shortpath" = x; then
26771    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26772$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26773    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26774  fi
26775
26776  # Call helper function which possibly converts this using DOS-style short mode.
26777  # If so, the updated path is stored in $new_path.
26778
26779  input_path="$new_path"
26780  # Check if we need to convert this using DOS-style short mode. If the path
26781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26782  # take no chances and rewrite it.
26783  # Note: m4 eats our [], so we need to use [ and ] instead.
26784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26785  if test "x$has_forbidden_chars" != x; then
26786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26787    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26788    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26789    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26790      # Going to short mode and back again did indeed matter. Since short mode is
26791      # case insensitive, let's make it lowercase to improve readability.
26792      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26793      # Now convert it back to Unix-style (cygpath)
26794      input_path=`$CYGPATH -u "$shortmode_path"`
26795      new_path="$input_path"
26796    fi
26797  fi
26798
26799  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26800  if test "x$test_cygdrive_prefix" = x; then
26801    # As a simple fix, exclude /usr/bin since it's not a real path.
26802    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26803      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26804      # a path prefixed by /cygdrive for fixpath to work.
26805      new_path="$CYGWIN_ROOT_PATH$input_path"
26806    fi
26807  fi
26808
26809
26810  if test "x$path" != "x$new_path"; then
26811    BOOT_JDK="$new_path"
26812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26813$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26814  fi
26815
26816    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26817
26818  path="$BOOT_JDK"
26819  has_colon=`$ECHO $path | $GREP ^.:`
26820  new_path="$path"
26821  if test "x$has_colon" = x; then
26822    # Not in mixed or Windows style, start by that.
26823    new_path=`cmd //c echo $path`
26824  fi
26825
26826
26827  input_path="$new_path"
26828  # Check if we need to convert this using DOS-style short mode. If the path
26829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26830  # take no chances and rewrite it.
26831  # Note: m4 eats our [], so we need to use [ and ] instead.
26832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26833  if test "x$has_forbidden_chars" != x; then
26834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26835    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26836  fi
26837
26838
26839  windows_path="$new_path"
26840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26841    unix_path=`$CYGPATH -u "$windows_path"`
26842    new_path="$unix_path"
26843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26845    new_path="$unix_path"
26846  fi
26847
26848  if test "x$path" != "x$new_path"; then
26849    BOOT_JDK="$new_path"
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26851$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26852  fi
26853
26854  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26855  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26856
26857    else
26858      # We're on a unix platform. Hooray! :)
26859      path="$BOOT_JDK"
26860      has_space=`$ECHO "$path" | $GREP " "`
26861      if test "x$has_space" != x; then
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26864        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26865      fi
26866
26867      # Use eval to expand a potential ~
26868      eval path="$path"
26869      if test ! -f "$path" && test ! -d "$path"; then
26870        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26871      fi
26872
26873      if test -d "$path"; then
26874        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26875      else
26876        dir="`$DIRNAME "$path"`"
26877        base="`$BASENAME "$path"`"
26878        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26879      fi
26880    fi
26881  fi
26882
26883            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26884$as_echo_n "checking for Boot JDK... " >&6; }
26885            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26886$as_echo "$BOOT_JDK" >&6; }
26887            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26888$as_echo_n "checking Boot JDK version... " >&6; }
26889            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26891$as_echo "$BOOT_JDK_VERSION" >&6; }
26892          fi # end check jdk version
26893        fi # end check javac
26894      fi # end check java
26895    fi # end check boot jdk found
26896  fi
26897
26898
26899  if test "x$BOOT_JDK_FOUND" = xno; then
26900    # Now execute the test
26901
26902  if test "x$PROGRAMFILES" != x; then
26903    VIRTUAL_DIR="$PROGRAMFILES/Java"
26904
26905  windows_path="$VIRTUAL_DIR"
26906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26907    unix_path=`$CYGPATH -u "$windows_path"`
26908    VIRTUAL_DIR="$unix_path"
26909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26911    VIRTUAL_DIR="$unix_path"
26912  fi
26913
26914
26915  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26916  BOOT_JDK_SUFFIX=""
26917  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26918  if test "x$ALL_JDKS_FOUND" != x; then
26919    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26920
26921  if test "x$BOOT_JDK_FOUND" = xno; then
26922    # Now execute the test
26923
26924        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26925        if test -d "$BOOT_JDK"; then
26926          BOOT_JDK_FOUND=maybe
26927          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26928$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26929        fi
26930
26931
26932    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26933    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26934      # Do we have a bin/java?
26935      if test ! -x "$BOOT_JDK/bin/java"; then
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26938        BOOT_JDK_FOUND=no
26939      else
26940        # Do we have a bin/javac?
26941        if test ! -x "$BOOT_JDK/bin/javac"; then
26942          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26944          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26945$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26946          BOOT_JDK_FOUND=no
26947        else
26948          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26949          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26950
26951          # Extra M4 quote needed to protect [] in grep expression.
26952          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26953          if test "x$FOUND_CORRECT_VERSION" = x; then
26954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26956            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26957$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26958            BOOT_JDK_FOUND=no
26959          else
26960            # We're done! :-)
26961            BOOT_JDK_FOUND=yes
26962
26963  # Only process if variable expands to non-empty
26964
26965  if test "x$BOOT_JDK" != x; then
26966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26967
26968  # Input might be given as Windows format, start by converting to
26969  # unix format.
26970  path="$BOOT_JDK"
26971  new_path=`$CYGPATH -u "$path"`
26972
26973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26976  # "foo.exe" is OK but "foo" is an error.
26977  #
26978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26979  # It is also a way to make sure we got the proper file name for the real test later on.
26980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26981  if test "x$test_shortpath" = x; then
26982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26985  fi
26986
26987  # Call helper function which possibly converts this using DOS-style short mode.
26988  # If so, the updated path is stored in $new_path.
26989
26990  input_path="$new_path"
26991  # Check if we need to convert this using DOS-style short mode. If the path
26992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26993  # take no chances and rewrite it.
26994  # Note: m4 eats our [], so we need to use [ and ] instead.
26995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26996  if test "x$has_forbidden_chars" != x; then
26997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27001      # Going to short mode and back again did indeed matter. Since short mode is
27002      # case insensitive, let's make it lowercase to improve readability.
27003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27004      # Now convert it back to Unix-style (cygpath)
27005      input_path=`$CYGPATH -u "$shortmode_path"`
27006      new_path="$input_path"
27007    fi
27008  fi
27009
27010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27011  if test "x$test_cygdrive_prefix" = x; then
27012    # As a simple fix, exclude /usr/bin since it's not a real path.
27013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27015      # a path prefixed by /cygdrive for fixpath to work.
27016      new_path="$CYGWIN_ROOT_PATH$input_path"
27017    fi
27018  fi
27019
27020
27021  if test "x$path" != "x$new_path"; then
27022    BOOT_JDK="$new_path"
27023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27025  fi
27026
27027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27028
27029  path="$BOOT_JDK"
27030  has_colon=`$ECHO $path | $GREP ^.:`
27031  new_path="$path"
27032  if test "x$has_colon" = x; then
27033    # Not in mixed or Windows style, start by that.
27034    new_path=`cmd //c echo $path`
27035  fi
27036
27037
27038  input_path="$new_path"
27039  # Check if we need to convert this using DOS-style short mode. If the path
27040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27041  # take no chances and rewrite it.
27042  # Note: m4 eats our [], so we need to use [ and ] instead.
27043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27044  if test "x$has_forbidden_chars" != x; then
27045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27047  fi
27048
27049
27050  windows_path="$new_path"
27051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27052    unix_path=`$CYGPATH -u "$windows_path"`
27053    new_path="$unix_path"
27054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27056    new_path="$unix_path"
27057  fi
27058
27059  if test "x$path" != "x$new_path"; then
27060    BOOT_JDK="$new_path"
27061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27063  fi
27064
27065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27067
27068    else
27069      # We're on a unix platform. Hooray! :)
27070      path="$BOOT_JDK"
27071      has_space=`$ECHO "$path" | $GREP " "`
27072      if test "x$has_space" != x; then
27073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27076      fi
27077
27078      # Use eval to expand a potential ~
27079      eval path="$path"
27080      if test ! -f "$path" && test ! -d "$path"; then
27081        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27082      fi
27083
27084      if test -d "$path"; then
27085        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27086      else
27087        dir="`$DIRNAME "$path"`"
27088        base="`$BASENAME "$path"`"
27089        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27090      fi
27091    fi
27092  fi
27093
27094            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27095$as_echo_n "checking for Boot JDK... " >&6; }
27096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27097$as_echo "$BOOT_JDK" >&6; }
27098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27099$as_echo_n "checking Boot JDK version... " >&6; }
27100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27102$as_echo "$BOOT_JDK_VERSION" >&6; }
27103          fi # end check jdk version
27104        fi # end check javac
27105      fi # end check java
27106    fi # end check boot jdk found
27107  fi
27108
27109    done
27110  fi
27111
27112  fi
27113
27114
27115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27117      # Do we have a bin/java?
27118      if test ! -x "$BOOT_JDK/bin/java"; then
27119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27121        BOOT_JDK_FOUND=no
27122      else
27123        # Do we have a bin/javac?
27124        if test ! -x "$BOOT_JDK/bin/javac"; then
27125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27129          BOOT_JDK_FOUND=no
27130        else
27131          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27132          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27133
27134          # Extra M4 quote needed to protect [] in grep expression.
27135          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27136          if test "x$FOUND_CORRECT_VERSION" = x; then
27137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27139            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27140$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27141            BOOT_JDK_FOUND=no
27142          else
27143            # We're done! :-)
27144            BOOT_JDK_FOUND=yes
27145
27146  # Only process if variable expands to non-empty
27147
27148  if test "x$BOOT_JDK" != x; then
27149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27150
27151  # Input might be given as Windows format, start by converting to
27152  # unix format.
27153  path="$BOOT_JDK"
27154  new_path=`$CYGPATH -u "$path"`
27155
27156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27159  # "foo.exe" is OK but "foo" is an error.
27160  #
27161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27162  # It is also a way to make sure we got the proper file name for the real test later on.
27163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27164  if test "x$test_shortpath" = x; then
27165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27167    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27168  fi
27169
27170  # Call helper function which possibly converts this using DOS-style short mode.
27171  # If so, the updated path is stored in $new_path.
27172
27173  input_path="$new_path"
27174  # Check if we need to convert this using DOS-style short mode. If the path
27175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27176  # take no chances and rewrite it.
27177  # Note: m4 eats our [], so we need to use [ and ] instead.
27178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27179  if test "x$has_forbidden_chars" != x; then
27180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27184      # Going to short mode and back again did indeed matter. Since short mode is
27185      # case insensitive, let's make it lowercase to improve readability.
27186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27187      # Now convert it back to Unix-style (cygpath)
27188      input_path=`$CYGPATH -u "$shortmode_path"`
27189      new_path="$input_path"
27190    fi
27191  fi
27192
27193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27194  if test "x$test_cygdrive_prefix" = x; then
27195    # As a simple fix, exclude /usr/bin since it's not a real path.
27196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27198      # a path prefixed by /cygdrive for fixpath to work.
27199      new_path="$CYGWIN_ROOT_PATH$input_path"
27200    fi
27201  fi
27202
27203
27204  if test "x$path" != "x$new_path"; then
27205    BOOT_JDK="$new_path"
27206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27208  fi
27209
27210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27211
27212  path="$BOOT_JDK"
27213  has_colon=`$ECHO $path | $GREP ^.:`
27214  new_path="$path"
27215  if test "x$has_colon" = x; then
27216    # Not in mixed or Windows style, start by that.
27217    new_path=`cmd //c echo $path`
27218  fi
27219
27220
27221  input_path="$new_path"
27222  # Check if we need to convert this using DOS-style short mode. If the path
27223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27224  # take no chances and rewrite it.
27225  # Note: m4 eats our [], so we need to use [ and ] instead.
27226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27227  if test "x$has_forbidden_chars" != x; then
27228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27230  fi
27231
27232
27233  windows_path="$new_path"
27234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27235    unix_path=`$CYGPATH -u "$windows_path"`
27236    new_path="$unix_path"
27237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27239    new_path="$unix_path"
27240  fi
27241
27242  if test "x$path" != "x$new_path"; then
27243    BOOT_JDK="$new_path"
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27246  fi
27247
27248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27250
27251    else
27252      # We're on a unix platform. Hooray! :)
27253      path="$BOOT_JDK"
27254      has_space=`$ECHO "$path" | $GREP " "`
27255      if test "x$has_space" != x; then
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27259      fi
27260
27261      # Use eval to expand a potential ~
27262      eval path="$path"
27263      if test ! -f "$path" && test ! -d "$path"; then
27264        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27265      fi
27266
27267      if test -d "$path"; then
27268        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27269      else
27270        dir="`$DIRNAME "$path"`"
27271        base="`$BASENAME "$path"`"
27272        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27273      fi
27274    fi
27275  fi
27276
27277            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27278$as_echo_n "checking for Boot JDK... " >&6; }
27279            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27280$as_echo "$BOOT_JDK" >&6; }
27281            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27282$as_echo_n "checking Boot JDK version... " >&6; }
27283            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27285$as_echo "$BOOT_JDK_VERSION" >&6; }
27286          fi # end check jdk version
27287        fi # end check javac
27288      fi # end check java
27289    fi # end check boot jdk found
27290  fi
27291
27292
27293  if test "x$BOOT_JDK_FOUND" = xno; then
27294    # Now execute the test
27295
27296  if test "x$ProgramFiles" != x; then
27297    VIRTUAL_DIR="$ProgramFiles/Java"
27298
27299  windows_path="$VIRTUAL_DIR"
27300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27301    unix_path=`$CYGPATH -u "$windows_path"`
27302    VIRTUAL_DIR="$unix_path"
27303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27305    VIRTUAL_DIR="$unix_path"
27306  fi
27307
27308
27309  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27310  BOOT_JDK_SUFFIX=""
27311  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27312  if test "x$ALL_JDKS_FOUND" != x; then
27313    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27314
27315  if test "x$BOOT_JDK_FOUND" = xno; then
27316    # Now execute the test
27317
27318        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27319        if test -d "$BOOT_JDK"; then
27320          BOOT_JDK_FOUND=maybe
27321          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27322$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27323        fi
27324
27325
27326    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27327    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27328      # Do we have a bin/java?
27329      if test ! -x "$BOOT_JDK/bin/java"; then
27330        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27332        BOOT_JDK_FOUND=no
27333      else
27334        # Do we have a bin/javac?
27335        if test ! -x "$BOOT_JDK/bin/javac"; then
27336          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27338          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27339$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27340          BOOT_JDK_FOUND=no
27341        else
27342          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27343          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27344
27345          # Extra M4 quote needed to protect [] in grep expression.
27346          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27347          if test "x$FOUND_CORRECT_VERSION" = x; then
27348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27350            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27351$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27352            BOOT_JDK_FOUND=no
27353          else
27354            # We're done! :-)
27355            BOOT_JDK_FOUND=yes
27356
27357  # Only process if variable expands to non-empty
27358
27359  if test "x$BOOT_JDK" != x; then
27360    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27361
27362  # Input might be given as Windows format, start by converting to
27363  # unix format.
27364  path="$BOOT_JDK"
27365  new_path=`$CYGPATH -u "$path"`
27366
27367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27370  # "foo.exe" is OK but "foo" is an error.
27371  #
27372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27373  # It is also a way to make sure we got the proper file name for the real test later on.
27374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27375  if test "x$test_shortpath" = x; then
27376    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27377$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27378    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27379  fi
27380
27381  # Call helper function which possibly converts this using DOS-style short mode.
27382  # If so, the updated path is stored in $new_path.
27383
27384  input_path="$new_path"
27385  # Check if we need to convert this using DOS-style short mode. If the path
27386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27387  # take no chances and rewrite it.
27388  # Note: m4 eats our [], so we need to use [ and ] instead.
27389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27390  if test "x$has_forbidden_chars" != x; then
27391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27392    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27393    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27394    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27395      # Going to short mode and back again did indeed matter. Since short mode is
27396      # case insensitive, let's make it lowercase to improve readability.
27397      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27398      # Now convert it back to Unix-style (cygpath)
27399      input_path=`$CYGPATH -u "$shortmode_path"`
27400      new_path="$input_path"
27401    fi
27402  fi
27403
27404  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27405  if test "x$test_cygdrive_prefix" = x; then
27406    # As a simple fix, exclude /usr/bin since it's not a real path.
27407    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27408      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27409      # a path prefixed by /cygdrive for fixpath to work.
27410      new_path="$CYGWIN_ROOT_PATH$input_path"
27411    fi
27412  fi
27413
27414
27415  if test "x$path" != "x$new_path"; then
27416    BOOT_JDK="$new_path"
27417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27418$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27419  fi
27420
27421    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27422
27423  path="$BOOT_JDK"
27424  has_colon=`$ECHO $path | $GREP ^.:`
27425  new_path="$path"
27426  if test "x$has_colon" = x; then
27427    # Not in mixed or Windows style, start by that.
27428    new_path=`cmd //c echo $path`
27429  fi
27430
27431
27432  input_path="$new_path"
27433  # Check if we need to convert this using DOS-style short mode. If the path
27434  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27435  # take no chances and rewrite it.
27436  # Note: m4 eats our [], so we need to use [ and ] instead.
27437  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27438  if test "x$has_forbidden_chars" != x; then
27439    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27440    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27441  fi
27442
27443
27444  windows_path="$new_path"
27445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27446    unix_path=`$CYGPATH -u "$windows_path"`
27447    new_path="$unix_path"
27448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27450    new_path="$unix_path"
27451  fi
27452
27453  if test "x$path" != "x$new_path"; then
27454    BOOT_JDK="$new_path"
27455    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27456$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27457  fi
27458
27459  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27460  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27461
27462    else
27463      # We're on a unix platform. Hooray! :)
27464      path="$BOOT_JDK"
27465      has_space=`$ECHO "$path" | $GREP " "`
27466      if test "x$has_space" != x; then
27467        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27468$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27469        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27470      fi
27471
27472      # Use eval to expand a potential ~
27473      eval path="$path"
27474      if test ! -f "$path" && test ! -d "$path"; then
27475        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27476      fi
27477
27478      if test -d "$path"; then
27479        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27480      else
27481        dir="`$DIRNAME "$path"`"
27482        base="`$BASENAME "$path"`"
27483        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27484      fi
27485    fi
27486  fi
27487
27488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27489$as_echo_n "checking for Boot JDK... " >&6; }
27490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27491$as_echo "$BOOT_JDK" >&6; }
27492            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27493$as_echo_n "checking Boot JDK version... " >&6; }
27494            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27495            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27496$as_echo "$BOOT_JDK_VERSION" >&6; }
27497          fi # end check jdk version
27498        fi # end check javac
27499      fi # end check java
27500    fi # end check boot jdk found
27501  fi
27502
27503    done
27504  fi
27505
27506  fi
27507
27508
27509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27511      # Do we have a bin/java?
27512      if test ! -x "$BOOT_JDK/bin/java"; then
27513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27515        BOOT_JDK_FOUND=no
27516      else
27517        # Do we have a bin/javac?
27518        if test ! -x "$BOOT_JDK/bin/javac"; then
27519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27523          BOOT_JDK_FOUND=no
27524        else
27525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27527
27528          # Extra M4 quote needed to protect [] in grep expression.
27529          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27530          if test "x$FOUND_CORRECT_VERSION" = x; then
27531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27535            BOOT_JDK_FOUND=no
27536          else
27537            # We're done! :-)
27538            BOOT_JDK_FOUND=yes
27539
27540  # Only process if variable expands to non-empty
27541
27542  if test "x$BOOT_JDK" != x; then
27543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27544
27545  # Input might be given as Windows format, start by converting to
27546  # unix format.
27547  path="$BOOT_JDK"
27548  new_path=`$CYGPATH -u "$path"`
27549
27550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27553  # "foo.exe" is OK but "foo" is an error.
27554  #
27555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27556  # It is also a way to make sure we got the proper file name for the real test later on.
27557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27558  if test "x$test_shortpath" = x; then
27559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27562  fi
27563
27564  # Call helper function which possibly converts this using DOS-style short mode.
27565  # If so, the updated path is stored in $new_path.
27566
27567  input_path="$new_path"
27568  # Check if we need to convert this using DOS-style short mode. If the path
27569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27570  # take no chances and rewrite it.
27571  # Note: m4 eats our [], so we need to use [ and ] instead.
27572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27573  if test "x$has_forbidden_chars" != x; then
27574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27578      # Going to short mode and back again did indeed matter. Since short mode is
27579      # case insensitive, let's make it lowercase to improve readability.
27580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27581      # Now convert it back to Unix-style (cygpath)
27582      input_path=`$CYGPATH -u "$shortmode_path"`
27583      new_path="$input_path"
27584    fi
27585  fi
27586
27587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27588  if test "x$test_cygdrive_prefix" = x; then
27589    # As a simple fix, exclude /usr/bin since it's not a real path.
27590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27592      # a path prefixed by /cygdrive for fixpath to work.
27593      new_path="$CYGWIN_ROOT_PATH$input_path"
27594    fi
27595  fi
27596
27597
27598  if test "x$path" != "x$new_path"; then
27599    BOOT_JDK="$new_path"
27600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27602  fi
27603
27604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27605
27606  path="$BOOT_JDK"
27607  has_colon=`$ECHO $path | $GREP ^.:`
27608  new_path="$path"
27609  if test "x$has_colon" = x; then
27610    # Not in mixed or Windows style, start by that.
27611    new_path=`cmd //c echo $path`
27612  fi
27613
27614
27615  input_path="$new_path"
27616  # Check if we need to convert this using DOS-style short mode. If the path
27617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27618  # take no chances and rewrite it.
27619  # Note: m4 eats our [], so we need to use [ and ] instead.
27620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27621  if test "x$has_forbidden_chars" != x; then
27622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27624  fi
27625
27626
27627  windows_path="$new_path"
27628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27629    unix_path=`$CYGPATH -u "$windows_path"`
27630    new_path="$unix_path"
27631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27633    new_path="$unix_path"
27634  fi
27635
27636  if test "x$path" != "x$new_path"; then
27637    BOOT_JDK="$new_path"
27638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27640  fi
27641
27642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27644
27645    else
27646      # We're on a unix platform. Hooray! :)
27647      path="$BOOT_JDK"
27648      has_space=`$ECHO "$path" | $GREP " "`
27649      if test "x$has_space" != x; then
27650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27653      fi
27654
27655      # Use eval to expand a potential ~
27656      eval path="$path"
27657      if test ! -f "$path" && test ! -d "$path"; then
27658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27659      fi
27660
27661      if test -d "$path"; then
27662        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27663      else
27664        dir="`$DIRNAME "$path"`"
27665        base="`$BASENAME "$path"`"
27666        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27667      fi
27668    fi
27669  fi
27670
27671            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27672$as_echo_n "checking for Boot JDK... " >&6; }
27673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27674$as_echo "$BOOT_JDK" >&6; }
27675            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27676$as_echo_n "checking Boot JDK version... " >&6; }
27677            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27679$as_echo "$BOOT_JDK_VERSION" >&6; }
27680          fi # end check jdk version
27681        fi # end check javac
27682      fi # end check java
27683    fi # end check boot jdk found
27684  fi
27685
27686
27687  if test "x$BOOT_JDK_FOUND" = xno; then
27688    # Now execute the test
27689
27690  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27691  BOOT_JDK_SUFFIX=""
27692  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27693  if test "x$ALL_JDKS_FOUND" != x; then
27694    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27695
27696  if test "x$BOOT_JDK_FOUND" = xno; then
27697    # Now execute the test
27698
27699        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27700        if test -d "$BOOT_JDK"; then
27701          BOOT_JDK_FOUND=maybe
27702          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27703$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27704        fi
27705
27706
27707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27709      # Do we have a bin/java?
27710      if test ! -x "$BOOT_JDK/bin/java"; then
27711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27713        BOOT_JDK_FOUND=no
27714      else
27715        # Do we have a bin/javac?
27716        if test ! -x "$BOOT_JDK/bin/javac"; then
27717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27721          BOOT_JDK_FOUND=no
27722        else
27723          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27724          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27725
27726          # Extra M4 quote needed to protect [] in grep expression.
27727          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27728          if test "x$FOUND_CORRECT_VERSION" = x; then
27729            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27731            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27732$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27733            BOOT_JDK_FOUND=no
27734          else
27735            # We're done! :-)
27736            BOOT_JDK_FOUND=yes
27737
27738  # Only process if variable expands to non-empty
27739
27740  if test "x$BOOT_JDK" != x; then
27741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27742
27743  # Input might be given as Windows format, start by converting to
27744  # unix format.
27745  path="$BOOT_JDK"
27746  new_path=`$CYGPATH -u "$path"`
27747
27748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27751  # "foo.exe" is OK but "foo" is an error.
27752  #
27753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27754  # It is also a way to make sure we got the proper file name for the real test later on.
27755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27756  if test "x$test_shortpath" = x; then
27757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27760  fi
27761
27762  # Call helper function which possibly converts this using DOS-style short mode.
27763  # If so, the updated path is stored in $new_path.
27764
27765  input_path="$new_path"
27766  # Check if we need to convert this using DOS-style short mode. If the path
27767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27768  # take no chances and rewrite it.
27769  # Note: m4 eats our [], so we need to use [ and ] instead.
27770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27771  if test "x$has_forbidden_chars" != x; then
27772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27776      # Going to short mode and back again did indeed matter. Since short mode is
27777      # case insensitive, let's make it lowercase to improve readability.
27778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27779      # Now convert it back to Unix-style (cygpath)
27780      input_path=`$CYGPATH -u "$shortmode_path"`
27781      new_path="$input_path"
27782    fi
27783  fi
27784
27785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27786  if test "x$test_cygdrive_prefix" = x; then
27787    # As a simple fix, exclude /usr/bin since it's not a real path.
27788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27790      # a path prefixed by /cygdrive for fixpath to work.
27791      new_path="$CYGWIN_ROOT_PATH$input_path"
27792    fi
27793  fi
27794
27795
27796  if test "x$path" != "x$new_path"; then
27797    BOOT_JDK="$new_path"
27798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27800  fi
27801
27802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27803
27804  path="$BOOT_JDK"
27805  has_colon=`$ECHO $path | $GREP ^.:`
27806  new_path="$path"
27807  if test "x$has_colon" = x; then
27808    # Not in mixed or Windows style, start by that.
27809    new_path=`cmd //c echo $path`
27810  fi
27811
27812
27813  input_path="$new_path"
27814  # Check if we need to convert this using DOS-style short mode. If the path
27815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27816  # take no chances and rewrite it.
27817  # Note: m4 eats our [], so we need to use [ and ] instead.
27818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27819  if test "x$has_forbidden_chars" != x; then
27820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27822  fi
27823
27824
27825  windows_path="$new_path"
27826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27827    unix_path=`$CYGPATH -u "$windows_path"`
27828    new_path="$unix_path"
27829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27831    new_path="$unix_path"
27832  fi
27833
27834  if test "x$path" != "x$new_path"; then
27835    BOOT_JDK="$new_path"
27836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27838  fi
27839
27840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27842
27843    else
27844      # We're on a unix platform. Hooray! :)
27845      path="$BOOT_JDK"
27846      has_space=`$ECHO "$path" | $GREP " "`
27847      if test "x$has_space" != x; then
27848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27851      fi
27852
27853      # Use eval to expand a potential ~
27854      eval path="$path"
27855      if test ! -f "$path" && test ! -d "$path"; then
27856        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27857      fi
27858
27859      if test -d "$path"; then
27860        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27861      else
27862        dir="`$DIRNAME "$path"`"
27863        base="`$BASENAME "$path"`"
27864        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27865      fi
27866    fi
27867  fi
27868
27869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27870$as_echo_n "checking for Boot JDK... " >&6; }
27871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27872$as_echo "$BOOT_JDK" >&6; }
27873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27874$as_echo_n "checking Boot JDK version... " >&6; }
27875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27877$as_echo "$BOOT_JDK_VERSION" >&6; }
27878          fi # end check jdk version
27879        fi # end check javac
27880      fi # end check java
27881    fi # end check boot jdk found
27882  fi
27883
27884    done
27885  fi
27886
27887
27888    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27889    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27890      # Do we have a bin/java?
27891      if test ! -x "$BOOT_JDK/bin/java"; then
27892        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27894        BOOT_JDK_FOUND=no
27895      else
27896        # Do we have a bin/javac?
27897        if test ! -x "$BOOT_JDK/bin/javac"; then
27898          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27900          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27901$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27902          BOOT_JDK_FOUND=no
27903        else
27904          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27905          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27906
27907          # Extra M4 quote needed to protect [] in grep expression.
27908          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27909          if test "x$FOUND_CORRECT_VERSION" = x; then
27910            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27911$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27912            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27913$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27914            BOOT_JDK_FOUND=no
27915          else
27916            # We're done! :-)
27917            BOOT_JDK_FOUND=yes
27918
27919  # Only process if variable expands to non-empty
27920
27921  if test "x$BOOT_JDK" != x; then
27922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27923
27924  # Input might be given as Windows format, start by converting to
27925  # unix format.
27926  path="$BOOT_JDK"
27927  new_path=`$CYGPATH -u "$path"`
27928
27929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27932  # "foo.exe" is OK but "foo" is an error.
27933  #
27934  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27935  # It is also a way to make sure we got the proper file name for the real test later on.
27936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27937  if test "x$test_shortpath" = x; then
27938    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27939$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27940    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27941  fi
27942
27943  # Call helper function which possibly converts this using DOS-style short mode.
27944  # If so, the updated path is stored in $new_path.
27945
27946  input_path="$new_path"
27947  # Check if we need to convert this using DOS-style short mode. If the path
27948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27949  # take no chances and rewrite it.
27950  # Note: m4 eats our [], so we need to use [ and ] instead.
27951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27952  if test "x$has_forbidden_chars" != x; then
27953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27957      # Going to short mode and back again did indeed matter. Since short mode is
27958      # case insensitive, let's make it lowercase to improve readability.
27959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27960      # Now convert it back to Unix-style (cygpath)
27961      input_path=`$CYGPATH -u "$shortmode_path"`
27962      new_path="$input_path"
27963    fi
27964  fi
27965
27966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27967  if test "x$test_cygdrive_prefix" = x; then
27968    # As a simple fix, exclude /usr/bin since it's not a real path.
27969    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27971      # a path prefixed by /cygdrive for fixpath to work.
27972      new_path="$CYGWIN_ROOT_PATH$input_path"
27973    fi
27974  fi
27975
27976
27977  if test "x$path" != "x$new_path"; then
27978    BOOT_JDK="$new_path"
27979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27980$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27981  fi
27982
27983    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27984
27985  path="$BOOT_JDK"
27986  has_colon=`$ECHO $path | $GREP ^.:`
27987  new_path="$path"
27988  if test "x$has_colon" = x; then
27989    # Not in mixed or Windows style, start by that.
27990    new_path=`cmd //c echo $path`
27991  fi
27992
27993
27994  input_path="$new_path"
27995  # Check if we need to convert this using DOS-style short mode. If the path
27996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27997  # take no chances and rewrite it.
27998  # Note: m4 eats our [], so we need to use [ and ] instead.
27999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28000  if test "x$has_forbidden_chars" != x; then
28001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28003  fi
28004
28005
28006  windows_path="$new_path"
28007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28008    unix_path=`$CYGPATH -u "$windows_path"`
28009    new_path="$unix_path"
28010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28012    new_path="$unix_path"
28013  fi
28014
28015  if test "x$path" != "x$new_path"; then
28016    BOOT_JDK="$new_path"
28017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28018$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28019  fi
28020
28021  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28022  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28023
28024    else
28025      # We're on a unix platform. Hooray! :)
28026      path="$BOOT_JDK"
28027      has_space=`$ECHO "$path" | $GREP " "`
28028      if test "x$has_space" != x; then
28029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28031        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28032      fi
28033
28034      # Use eval to expand a potential ~
28035      eval path="$path"
28036      if test ! -f "$path" && test ! -d "$path"; then
28037        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28038      fi
28039
28040      if test -d "$path"; then
28041        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28042      else
28043        dir="`$DIRNAME "$path"`"
28044        base="`$BASENAME "$path"`"
28045        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28046      fi
28047    fi
28048  fi
28049
28050            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28051$as_echo_n "checking for Boot JDK... " >&6; }
28052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28053$as_echo "$BOOT_JDK" >&6; }
28054            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28055$as_echo_n "checking Boot JDK version... " >&6; }
28056            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28057            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28058$as_echo "$BOOT_JDK_VERSION" >&6; }
28059          fi # end check jdk version
28060        fi # end check javac
28061      fi # end check java
28062    fi # end check boot jdk found
28063  fi
28064
28065  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28066
28067  if test "x$BOOT_JDK_FOUND" = xno; then
28068    # Now execute the test
28069
28070  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28071  BOOT_JDK_SUFFIX="/Contents/Home"
28072  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28073  if test "x$ALL_JDKS_FOUND" != x; then
28074    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28075
28076  if test "x$BOOT_JDK_FOUND" = xno; then
28077    # Now execute the test
28078
28079        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28080        if test -d "$BOOT_JDK"; then
28081          BOOT_JDK_FOUND=maybe
28082          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28083$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28084        fi
28085
28086
28087    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28088    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28089      # Do we have a bin/java?
28090      if test ! -x "$BOOT_JDK/bin/java"; then
28091        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28092$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28093        BOOT_JDK_FOUND=no
28094      else
28095        # Do we have a bin/javac?
28096        if test ! -x "$BOOT_JDK/bin/javac"; then
28097          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28099          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28100$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28101          BOOT_JDK_FOUND=no
28102        else
28103          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28104          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28105
28106          # Extra M4 quote needed to protect [] in grep expression.
28107          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28108          if test "x$FOUND_CORRECT_VERSION" = x; then
28109            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28111            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28112$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28113            BOOT_JDK_FOUND=no
28114          else
28115            # We're done! :-)
28116            BOOT_JDK_FOUND=yes
28117
28118  # Only process if variable expands to non-empty
28119
28120  if test "x$BOOT_JDK" != x; then
28121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122
28123  # Input might be given as Windows format, start by converting to
28124  # unix format.
28125  path="$BOOT_JDK"
28126  new_path=`$CYGPATH -u "$path"`
28127
28128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28131  # "foo.exe" is OK but "foo" is an error.
28132  #
28133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28134  # It is also a way to make sure we got the proper file name for the real test later on.
28135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28136  if test "x$test_shortpath" = x; then
28137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28138$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28139    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28140  fi
28141
28142  # Call helper function which possibly converts this using DOS-style short mode.
28143  # If so, the updated path is stored in $new_path.
28144
28145  input_path="$new_path"
28146  # Check if we need to convert this using DOS-style short mode. If the path
28147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148  # take no chances and rewrite it.
28149  # Note: m4 eats our [], so we need to use [ and ] instead.
28150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28151  if test "x$has_forbidden_chars" != x; then
28152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28156      # Going to short mode and back again did indeed matter. Since short mode is
28157      # case insensitive, let's make it lowercase to improve readability.
28158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28159      # Now convert it back to Unix-style (cygpath)
28160      input_path=`$CYGPATH -u "$shortmode_path"`
28161      new_path="$input_path"
28162    fi
28163  fi
28164
28165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28166  if test "x$test_cygdrive_prefix" = x; then
28167    # As a simple fix, exclude /usr/bin since it's not a real path.
28168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28170      # a path prefixed by /cygdrive for fixpath to work.
28171      new_path="$CYGWIN_ROOT_PATH$input_path"
28172    fi
28173  fi
28174
28175
28176  if test "x$path" != "x$new_path"; then
28177    BOOT_JDK="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28180  fi
28181
28182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28183
28184  path="$BOOT_JDK"
28185  has_colon=`$ECHO $path | $GREP ^.:`
28186  new_path="$path"
28187  if test "x$has_colon" = x; then
28188    # Not in mixed or Windows style, start by that.
28189    new_path=`cmd //c echo $path`
28190  fi
28191
28192
28193  input_path="$new_path"
28194  # Check if we need to convert this using DOS-style short mode. If the path
28195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28196  # take no chances and rewrite it.
28197  # Note: m4 eats our [], so we need to use [ and ] instead.
28198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28199  if test "x$has_forbidden_chars" != x; then
28200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28202  fi
28203
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214  if test "x$path" != "x$new_path"; then
28215    BOOT_JDK="$new_path"
28216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28218  fi
28219
28220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28222
28223    else
28224      # We're on a unix platform. Hooray! :)
28225      path="$BOOT_JDK"
28226      has_space=`$ECHO "$path" | $GREP " "`
28227      if test "x$has_space" != x; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28231      fi
28232
28233      # Use eval to expand a potential ~
28234      eval path="$path"
28235      if test ! -f "$path" && test ! -d "$path"; then
28236        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28237      fi
28238
28239      if test -d "$path"; then
28240        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28241      else
28242        dir="`$DIRNAME "$path"`"
28243        base="`$BASENAME "$path"`"
28244        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28245      fi
28246    fi
28247  fi
28248
28249            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28250$as_echo_n "checking for Boot JDK... " >&6; }
28251            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28252$as_echo "$BOOT_JDK" >&6; }
28253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28254$as_echo_n "checking Boot JDK version... " >&6; }
28255            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28257$as_echo "$BOOT_JDK_VERSION" >&6; }
28258          fi # end check jdk version
28259        fi # end check javac
28260      fi # end check java
28261    fi # end check boot jdk found
28262  fi
28263
28264    done
28265  fi
28266
28267
28268    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28269    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28270      # Do we have a bin/java?
28271      if test ! -x "$BOOT_JDK/bin/java"; then
28272        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28273$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28274        BOOT_JDK_FOUND=no
28275      else
28276        # Do we have a bin/javac?
28277        if test ! -x "$BOOT_JDK/bin/javac"; then
28278          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28280          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28281$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28282          BOOT_JDK_FOUND=no
28283        else
28284          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28285          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28286
28287          # Extra M4 quote needed to protect [] in grep expression.
28288          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28289          if test "x$FOUND_CORRECT_VERSION" = x; then
28290            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28292            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28293$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28294            BOOT_JDK_FOUND=no
28295          else
28296            # We're done! :-)
28297            BOOT_JDK_FOUND=yes
28298
28299  # Only process if variable expands to non-empty
28300
28301  if test "x$BOOT_JDK" != x; then
28302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28303
28304  # Input might be given as Windows format, start by converting to
28305  # unix format.
28306  path="$BOOT_JDK"
28307  new_path=`$CYGPATH -u "$path"`
28308
28309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28312  # "foo.exe" is OK but "foo" is an error.
28313  #
28314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28315  # It is also a way to make sure we got the proper file name for the real test later on.
28316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28317  if test "x$test_shortpath" = x; then
28318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28319$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28320    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28321  fi
28322
28323  # Call helper function which possibly converts this using DOS-style short mode.
28324  # If so, the updated path is stored in $new_path.
28325
28326  input_path="$new_path"
28327  # Check if we need to convert this using DOS-style short mode. If the path
28328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28329  # take no chances and rewrite it.
28330  # Note: m4 eats our [], so we need to use [ and ] instead.
28331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28332  if test "x$has_forbidden_chars" != x; then
28333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28337      # Going to short mode and back again did indeed matter. Since short mode is
28338      # case insensitive, let's make it lowercase to improve readability.
28339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28340      # Now convert it back to Unix-style (cygpath)
28341      input_path=`$CYGPATH -u "$shortmode_path"`
28342      new_path="$input_path"
28343    fi
28344  fi
28345
28346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28347  if test "x$test_cygdrive_prefix" = x; then
28348    # As a simple fix, exclude /usr/bin since it's not a real path.
28349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28351      # a path prefixed by /cygdrive for fixpath to work.
28352      new_path="$CYGWIN_ROOT_PATH$input_path"
28353    fi
28354  fi
28355
28356
28357  if test "x$path" != "x$new_path"; then
28358    BOOT_JDK="$new_path"
28359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28360$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28361  fi
28362
28363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28364
28365  path="$BOOT_JDK"
28366  has_colon=`$ECHO $path | $GREP ^.:`
28367  new_path="$path"
28368  if test "x$has_colon" = x; then
28369    # Not in mixed or Windows style, start by that.
28370    new_path=`cmd //c echo $path`
28371  fi
28372
28373
28374  input_path="$new_path"
28375  # Check if we need to convert this using DOS-style short mode. If the path
28376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28377  # take no chances and rewrite it.
28378  # Note: m4 eats our [], so we need to use [ and ] instead.
28379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28380  if test "x$has_forbidden_chars" != x; then
28381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28383  fi
28384
28385
28386  windows_path="$new_path"
28387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28388    unix_path=`$CYGPATH -u "$windows_path"`
28389    new_path="$unix_path"
28390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28392    new_path="$unix_path"
28393  fi
28394
28395  if test "x$path" != "x$new_path"; then
28396    BOOT_JDK="$new_path"
28397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28398$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28399  fi
28400
28401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28403
28404    else
28405      # We're on a unix platform. Hooray! :)
28406      path="$BOOT_JDK"
28407      has_space=`$ECHO "$path" | $GREP " "`
28408      if test "x$has_space" != x; then
28409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28412      fi
28413
28414      # Use eval to expand a potential ~
28415      eval path="$path"
28416      if test ! -f "$path" && test ! -d "$path"; then
28417        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28418      fi
28419
28420      if test -d "$path"; then
28421        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28422      else
28423        dir="`$DIRNAME "$path"`"
28424        base="`$BASENAME "$path"`"
28425        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28426      fi
28427    fi
28428  fi
28429
28430            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28431$as_echo_n "checking for Boot JDK... " >&6; }
28432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28433$as_echo "$BOOT_JDK" >&6; }
28434            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28435$as_echo_n "checking Boot JDK version... " >&6; }
28436            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28438$as_echo "$BOOT_JDK_VERSION" >&6; }
28439          fi # end check jdk version
28440        fi # end check javac
28441      fi # end check java
28442    fi # end check boot jdk found
28443  fi
28444
28445
28446  if test "x$BOOT_JDK_FOUND" = xno; then
28447    # Now execute the test
28448
28449  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28450  BOOT_JDK_SUFFIX="/Contents/Home"
28451  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28452  if test "x$ALL_JDKS_FOUND" != x; then
28453    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28454
28455  if test "x$BOOT_JDK_FOUND" = xno; then
28456    # Now execute the test
28457
28458        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28459        if test -d "$BOOT_JDK"; then
28460          BOOT_JDK_FOUND=maybe
28461          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28462$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28463        fi
28464
28465
28466    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28467    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28468      # Do we have a bin/java?
28469      if test ! -x "$BOOT_JDK/bin/java"; then
28470        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28472        BOOT_JDK_FOUND=no
28473      else
28474        # Do we have a bin/javac?
28475        if test ! -x "$BOOT_JDK/bin/javac"; then
28476          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28478          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28479$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28480          BOOT_JDK_FOUND=no
28481        else
28482          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28483          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28484
28485          # Extra M4 quote needed to protect [] in grep expression.
28486          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28487          if test "x$FOUND_CORRECT_VERSION" = x; then
28488            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28489$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28490            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28491$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28492            BOOT_JDK_FOUND=no
28493          else
28494            # We're done! :-)
28495            BOOT_JDK_FOUND=yes
28496
28497  # Only process if variable expands to non-empty
28498
28499  if test "x$BOOT_JDK" != x; then
28500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28501
28502  # Input might be given as Windows format, start by converting to
28503  # unix format.
28504  path="$BOOT_JDK"
28505  new_path=`$CYGPATH -u "$path"`
28506
28507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28510  # "foo.exe" is OK but "foo" is an error.
28511  #
28512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28513  # It is also a way to make sure we got the proper file name for the real test later on.
28514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28515  if test "x$test_shortpath" = x; then
28516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28518    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28519  fi
28520
28521  # Call helper function which possibly converts this using DOS-style short mode.
28522  # If so, the updated path is stored in $new_path.
28523
28524  input_path="$new_path"
28525  # Check if we need to convert this using DOS-style short mode. If the path
28526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28527  # take no chances and rewrite it.
28528  # Note: m4 eats our [], so we need to use [ and ] instead.
28529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28530  if test "x$has_forbidden_chars" != x; then
28531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28535      # Going to short mode and back again did indeed matter. Since short mode is
28536      # case insensitive, let's make it lowercase to improve readability.
28537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28538      # Now convert it back to Unix-style (cygpath)
28539      input_path=`$CYGPATH -u "$shortmode_path"`
28540      new_path="$input_path"
28541    fi
28542  fi
28543
28544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28545  if test "x$test_cygdrive_prefix" = x; then
28546    # As a simple fix, exclude /usr/bin since it's not a real path.
28547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28549      # a path prefixed by /cygdrive for fixpath to work.
28550      new_path="$CYGWIN_ROOT_PATH$input_path"
28551    fi
28552  fi
28553
28554
28555  if test "x$path" != "x$new_path"; then
28556    BOOT_JDK="$new_path"
28557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28558$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28559  fi
28560
28561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28562
28563  path="$BOOT_JDK"
28564  has_colon=`$ECHO $path | $GREP ^.:`
28565  new_path="$path"
28566  if test "x$has_colon" = x; then
28567    # Not in mixed or Windows style, start by that.
28568    new_path=`cmd //c echo $path`
28569  fi
28570
28571
28572  input_path="$new_path"
28573  # Check if we need to convert this using DOS-style short mode. If the path
28574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28575  # take no chances and rewrite it.
28576  # Note: m4 eats our [], so we need to use [ and ] instead.
28577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28578  if test "x$has_forbidden_chars" != x; then
28579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28581  fi
28582
28583
28584  windows_path="$new_path"
28585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28586    unix_path=`$CYGPATH -u "$windows_path"`
28587    new_path="$unix_path"
28588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28590    new_path="$unix_path"
28591  fi
28592
28593  if test "x$path" != "x$new_path"; then
28594    BOOT_JDK="$new_path"
28595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28596$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28597  fi
28598
28599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28601
28602    else
28603      # We're on a unix platform. Hooray! :)
28604      path="$BOOT_JDK"
28605      has_space=`$ECHO "$path" | $GREP " "`
28606      if test "x$has_space" != x; then
28607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28610      fi
28611
28612      # Use eval to expand a potential ~
28613      eval path="$path"
28614      if test ! -f "$path" && test ! -d "$path"; then
28615        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28616      fi
28617
28618      if test -d "$path"; then
28619        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28620      else
28621        dir="`$DIRNAME "$path"`"
28622        base="`$BASENAME "$path"`"
28623        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28624      fi
28625    fi
28626  fi
28627
28628            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28629$as_echo_n "checking for Boot JDK... " >&6; }
28630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28631$as_echo "$BOOT_JDK" >&6; }
28632            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28633$as_echo_n "checking Boot JDK version... " >&6; }
28634            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28635            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28636$as_echo "$BOOT_JDK_VERSION" >&6; }
28637          fi # end check jdk version
28638        fi # end check javac
28639      fi # end check java
28640    fi # end check boot jdk found
28641  fi
28642
28643    done
28644  fi
28645
28646
28647    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28648    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28649      # Do we have a bin/java?
28650      if test ! -x "$BOOT_JDK/bin/java"; then
28651        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28653        BOOT_JDK_FOUND=no
28654      else
28655        # Do we have a bin/javac?
28656        if test ! -x "$BOOT_JDK/bin/javac"; then
28657          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28659          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28660$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28661          BOOT_JDK_FOUND=no
28662        else
28663          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28664          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28665
28666          # Extra M4 quote needed to protect [] in grep expression.
28667          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28668          if test "x$FOUND_CORRECT_VERSION" = x; then
28669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28671            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28672$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28673            BOOT_JDK_FOUND=no
28674          else
28675            # We're done! :-)
28676            BOOT_JDK_FOUND=yes
28677
28678  # Only process if variable expands to non-empty
28679
28680  if test "x$BOOT_JDK" != x; then
28681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682
28683  # Input might be given as Windows format, start by converting to
28684  # unix format.
28685  path="$BOOT_JDK"
28686  new_path=`$CYGPATH -u "$path"`
28687
28688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28691  # "foo.exe" is OK but "foo" is an error.
28692  #
28693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28694  # It is also a way to make sure we got the proper file name for the real test later on.
28695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28696  if test "x$test_shortpath" = x; then
28697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28700  fi
28701
28702  # Call helper function which possibly converts this using DOS-style short mode.
28703  # If so, the updated path is stored in $new_path.
28704
28705  input_path="$new_path"
28706  # Check if we need to convert this using DOS-style short mode. If the path
28707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28708  # take no chances and rewrite it.
28709  # Note: m4 eats our [], so we need to use [ and ] instead.
28710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28711  if test "x$has_forbidden_chars" != x; then
28712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28716      # Going to short mode and back again did indeed matter. Since short mode is
28717      # case insensitive, let's make it lowercase to improve readability.
28718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28719      # Now convert it back to Unix-style (cygpath)
28720      input_path=`$CYGPATH -u "$shortmode_path"`
28721      new_path="$input_path"
28722    fi
28723  fi
28724
28725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28726  if test "x$test_cygdrive_prefix" = x; then
28727    # As a simple fix, exclude /usr/bin since it's not a real path.
28728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28730      # a path prefixed by /cygdrive for fixpath to work.
28731      new_path="$CYGWIN_ROOT_PATH$input_path"
28732    fi
28733  fi
28734
28735
28736  if test "x$path" != "x$new_path"; then
28737    BOOT_JDK="$new_path"
28738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740  fi
28741
28742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28743
28744  path="$BOOT_JDK"
28745  has_colon=`$ECHO $path | $GREP ^.:`
28746  new_path="$path"
28747  if test "x$has_colon" = x; then
28748    # Not in mixed or Windows style, start by that.
28749    new_path=`cmd //c echo $path`
28750  fi
28751
28752
28753  input_path="$new_path"
28754  # Check if we need to convert this using DOS-style short mode. If the path
28755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28756  # take no chances and rewrite it.
28757  # Note: m4 eats our [], so we need to use [ and ] instead.
28758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28759  if test "x$has_forbidden_chars" != x; then
28760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28762  fi
28763
28764
28765  windows_path="$new_path"
28766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767    unix_path=`$CYGPATH -u "$windows_path"`
28768    new_path="$unix_path"
28769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28771    new_path="$unix_path"
28772  fi
28773
28774  if test "x$path" != "x$new_path"; then
28775    BOOT_JDK="$new_path"
28776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28778  fi
28779
28780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28782
28783    else
28784      # We're on a unix platform. Hooray! :)
28785      path="$BOOT_JDK"
28786      has_space=`$ECHO "$path" | $GREP " "`
28787      if test "x$has_space" != x; then
28788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28791      fi
28792
28793      # Use eval to expand a potential ~
28794      eval path="$path"
28795      if test ! -f "$path" && test ! -d "$path"; then
28796        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28797      fi
28798
28799      if test -d "$path"; then
28800        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28801      else
28802        dir="`$DIRNAME "$path"`"
28803        base="`$BASENAME "$path"`"
28804        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28805      fi
28806    fi
28807  fi
28808
28809            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28810$as_echo_n "checking for Boot JDK... " >&6; }
28811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28812$as_echo "$BOOT_JDK" >&6; }
28813            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28814$as_echo_n "checking Boot JDK version... " >&6; }
28815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28817$as_echo "$BOOT_JDK_VERSION" >&6; }
28818          fi # end check jdk version
28819        fi # end check javac
28820      fi # end check java
28821    fi # end check boot jdk found
28822  fi
28823
28824  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28825
28826  if test "x$BOOT_JDK_FOUND" = xno; then
28827    # Now execute the test
28828
28829  BOOT_JDK_PREFIX="/usr/lib/jvm"
28830  BOOT_JDK_SUFFIX=""
28831  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28832  if test "x$ALL_JDKS_FOUND" != x; then
28833    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28834
28835  if test "x$BOOT_JDK_FOUND" = xno; then
28836    # Now execute the test
28837
28838        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28839        if test -d "$BOOT_JDK"; then
28840          BOOT_JDK_FOUND=maybe
28841          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28842$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28843        fi
28844
28845
28846    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28847    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28848      # Do we have a bin/java?
28849      if test ! -x "$BOOT_JDK/bin/java"; then
28850        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28852        BOOT_JDK_FOUND=no
28853      else
28854        # Do we have a bin/javac?
28855        if test ! -x "$BOOT_JDK/bin/javac"; then
28856          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28858          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28859$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28860          BOOT_JDK_FOUND=no
28861        else
28862          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28863          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28864
28865          # Extra M4 quote needed to protect [] in grep expression.
28866          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28867          if test "x$FOUND_CORRECT_VERSION" = x; then
28868            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28870            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28871$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28872            BOOT_JDK_FOUND=no
28873          else
28874            # We're done! :-)
28875            BOOT_JDK_FOUND=yes
28876
28877  # Only process if variable expands to non-empty
28878
28879  if test "x$BOOT_JDK" != x; then
28880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28881
28882  # Input might be given as Windows format, start by converting to
28883  # unix format.
28884  path="$BOOT_JDK"
28885  new_path=`$CYGPATH -u "$path"`
28886
28887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28890  # "foo.exe" is OK but "foo" is an error.
28891  #
28892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28893  # It is also a way to make sure we got the proper file name for the real test later on.
28894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28895  if test "x$test_shortpath" = x; then
28896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28897$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28898    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28899  fi
28900
28901  # Call helper function which possibly converts this using DOS-style short mode.
28902  # If so, the updated path is stored in $new_path.
28903
28904  input_path="$new_path"
28905  # Check if we need to convert this using DOS-style short mode. If the path
28906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28907  # take no chances and rewrite it.
28908  # Note: m4 eats our [], so we need to use [ and ] instead.
28909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28910  if test "x$has_forbidden_chars" != x; then
28911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28915      # Going to short mode and back again did indeed matter. Since short mode is
28916      # case insensitive, let's make it lowercase to improve readability.
28917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28918      # Now convert it back to Unix-style (cygpath)
28919      input_path=`$CYGPATH -u "$shortmode_path"`
28920      new_path="$input_path"
28921    fi
28922  fi
28923
28924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28925  if test "x$test_cygdrive_prefix" = x; then
28926    # As a simple fix, exclude /usr/bin since it's not a real path.
28927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28929      # a path prefixed by /cygdrive for fixpath to work.
28930      new_path="$CYGWIN_ROOT_PATH$input_path"
28931    fi
28932  fi
28933
28934
28935  if test "x$path" != "x$new_path"; then
28936    BOOT_JDK="$new_path"
28937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28939  fi
28940
28941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28942
28943  path="$BOOT_JDK"
28944  has_colon=`$ECHO $path | $GREP ^.:`
28945  new_path="$path"
28946  if test "x$has_colon" = x; then
28947    # Not in mixed or Windows style, start by that.
28948    new_path=`cmd //c echo $path`
28949  fi
28950
28951
28952  input_path="$new_path"
28953  # Check if we need to convert this using DOS-style short mode. If the path
28954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28955  # take no chances and rewrite it.
28956  # Note: m4 eats our [], so we need to use [ and ] instead.
28957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28958  if test "x$has_forbidden_chars" != x; then
28959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28961  fi
28962
28963
28964  windows_path="$new_path"
28965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28966    unix_path=`$CYGPATH -u "$windows_path"`
28967    new_path="$unix_path"
28968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28970    new_path="$unix_path"
28971  fi
28972
28973  if test "x$path" != "x$new_path"; then
28974    BOOT_JDK="$new_path"
28975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28977  fi
28978
28979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28981
28982    else
28983      # We're on a unix platform. Hooray! :)
28984      path="$BOOT_JDK"
28985      has_space=`$ECHO "$path" | $GREP " "`
28986      if test "x$has_space" != x; then
28987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28988$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28990      fi
28991
28992      # Use eval to expand a potential ~
28993      eval path="$path"
28994      if test ! -f "$path" && test ! -d "$path"; then
28995        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28996      fi
28997
28998      if test -d "$path"; then
28999        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29000      else
29001        dir="`$DIRNAME "$path"`"
29002        base="`$BASENAME "$path"`"
29003        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29004      fi
29005    fi
29006  fi
29007
29008            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29009$as_echo_n "checking for Boot JDK... " >&6; }
29010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29011$as_echo "$BOOT_JDK" >&6; }
29012            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29013$as_echo_n "checking Boot JDK version... " >&6; }
29014            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29016$as_echo "$BOOT_JDK_VERSION" >&6; }
29017          fi # end check jdk version
29018        fi # end check javac
29019      fi # end check java
29020    fi # end check boot jdk found
29021  fi
29022
29023    done
29024  fi
29025
29026
29027    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29028    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29029      # Do we have a bin/java?
29030      if test ! -x "$BOOT_JDK/bin/java"; then
29031        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29032$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29033        BOOT_JDK_FOUND=no
29034      else
29035        # Do we have a bin/javac?
29036        if test ! -x "$BOOT_JDK/bin/javac"; then
29037          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29039          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29040$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29041          BOOT_JDK_FOUND=no
29042        else
29043          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29044          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29045
29046          # Extra M4 quote needed to protect [] in grep expression.
29047          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29048          if test "x$FOUND_CORRECT_VERSION" = x; then
29049            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29051            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29052$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29053            BOOT_JDK_FOUND=no
29054          else
29055            # We're done! :-)
29056            BOOT_JDK_FOUND=yes
29057
29058  # Only process if variable expands to non-empty
29059
29060  if test "x$BOOT_JDK" != x; then
29061    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29062
29063  # Input might be given as Windows format, start by converting to
29064  # unix format.
29065  path="$BOOT_JDK"
29066  new_path=`$CYGPATH -u "$path"`
29067
29068  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29069  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29070  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29071  # "foo.exe" is OK but "foo" is an error.
29072  #
29073  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29074  # It is also a way to make sure we got the proper file name for the real test later on.
29075  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29076  if test "x$test_shortpath" = x; then
29077    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29079    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29080  fi
29081
29082  # Call helper function which possibly converts this using DOS-style short mode.
29083  # If so, the updated path is stored in $new_path.
29084
29085  input_path="$new_path"
29086  # Check if we need to convert this using DOS-style short mode. If the path
29087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29088  # take no chances and rewrite it.
29089  # Note: m4 eats our [], so we need to use [ and ] instead.
29090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29091  if test "x$has_forbidden_chars" != x; then
29092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29093    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29094    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29095    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29096      # Going to short mode and back again did indeed matter. Since short mode is
29097      # case insensitive, let's make it lowercase to improve readability.
29098      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29099      # Now convert it back to Unix-style (cygpath)
29100      input_path=`$CYGPATH -u "$shortmode_path"`
29101      new_path="$input_path"
29102    fi
29103  fi
29104
29105  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29106  if test "x$test_cygdrive_prefix" = x; then
29107    # As a simple fix, exclude /usr/bin since it's not a real path.
29108    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29109      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29110      # a path prefixed by /cygdrive for fixpath to work.
29111      new_path="$CYGWIN_ROOT_PATH$input_path"
29112    fi
29113  fi
29114
29115
29116  if test "x$path" != "x$new_path"; then
29117    BOOT_JDK="$new_path"
29118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29120  fi
29121
29122    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29123
29124  path="$BOOT_JDK"
29125  has_colon=`$ECHO $path | $GREP ^.:`
29126  new_path="$path"
29127  if test "x$has_colon" = x; then
29128    # Not in mixed or Windows style, start by that.
29129    new_path=`cmd //c echo $path`
29130  fi
29131
29132
29133  input_path="$new_path"
29134  # Check if we need to convert this using DOS-style short mode. If the path
29135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29136  # take no chances and rewrite it.
29137  # Note: m4 eats our [], so we need to use [ and ] instead.
29138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29139  if test "x$has_forbidden_chars" != x; then
29140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29141    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29142  fi
29143
29144
29145  windows_path="$new_path"
29146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29147    unix_path=`$CYGPATH -u "$windows_path"`
29148    new_path="$unix_path"
29149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29150    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29151    new_path="$unix_path"
29152  fi
29153
29154  if test "x$path" != "x$new_path"; then
29155    BOOT_JDK="$new_path"
29156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29157$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29158  fi
29159
29160  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29161  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29162
29163    else
29164      # We're on a unix platform. Hooray! :)
29165      path="$BOOT_JDK"
29166      has_space=`$ECHO "$path" | $GREP " "`
29167      if test "x$has_space" != x; then
29168        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29169$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29170        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29171      fi
29172
29173      # Use eval to expand a potential ~
29174      eval path="$path"
29175      if test ! -f "$path" && test ! -d "$path"; then
29176        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29177      fi
29178
29179      if test -d "$path"; then
29180        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29181      else
29182        dir="`$DIRNAME "$path"`"
29183        base="`$BASENAME "$path"`"
29184        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29185      fi
29186    fi
29187  fi
29188
29189            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29190$as_echo_n "checking for Boot JDK... " >&6; }
29191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29192$as_echo "$BOOT_JDK" >&6; }
29193            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29194$as_echo_n "checking Boot JDK version... " >&6; }
29195            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29197$as_echo "$BOOT_JDK_VERSION" >&6; }
29198          fi # end check jdk version
29199        fi # end check javac
29200      fi # end check java
29201    fi # end check boot jdk found
29202  fi
29203
29204  fi
29205
29206
29207    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29208    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29209      # Do we have a bin/java?
29210      if test ! -x "$BOOT_JDK/bin/java"; then
29211        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29213        BOOT_JDK_FOUND=no
29214      else
29215        # Do we have a bin/javac?
29216        if test ! -x "$BOOT_JDK/bin/javac"; then
29217          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29219          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29220$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29221          BOOT_JDK_FOUND=no
29222        else
29223          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29224          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29225
29226          # Extra M4 quote needed to protect [] in grep expression.
29227          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29228          if test "x$FOUND_CORRECT_VERSION" = x; then
29229            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29231            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29232$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29233            BOOT_JDK_FOUND=no
29234          else
29235            # We're done! :-)
29236            BOOT_JDK_FOUND=yes
29237
29238  # Only process if variable expands to non-empty
29239
29240  if test "x$BOOT_JDK" != x; then
29241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29242
29243  # Input might be given as Windows format, start by converting to
29244  # unix format.
29245  path="$BOOT_JDK"
29246  new_path=`$CYGPATH -u "$path"`
29247
29248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29251  # "foo.exe" is OK but "foo" is an error.
29252  #
29253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29254  # It is also a way to make sure we got the proper file name for the real test later on.
29255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29256  if test "x$test_shortpath" = x; then
29257    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29259    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29260  fi
29261
29262  # Call helper function which possibly converts this using DOS-style short mode.
29263  # If so, the updated path is stored in $new_path.
29264
29265  input_path="$new_path"
29266  # Check if we need to convert this using DOS-style short mode. If the path
29267  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29268  # take no chances and rewrite it.
29269  # Note: m4 eats our [], so we need to use [ and ] instead.
29270  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29271  if test "x$has_forbidden_chars" != x; then
29272    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29273    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29274    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29275    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29276      # Going to short mode and back again did indeed matter. Since short mode is
29277      # case insensitive, let's make it lowercase to improve readability.
29278      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29279      # Now convert it back to Unix-style (cygpath)
29280      input_path=`$CYGPATH -u "$shortmode_path"`
29281      new_path="$input_path"
29282    fi
29283  fi
29284
29285  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29286  if test "x$test_cygdrive_prefix" = x; then
29287    # As a simple fix, exclude /usr/bin since it's not a real path.
29288    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29289      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29290      # a path prefixed by /cygdrive for fixpath to work.
29291      new_path="$CYGWIN_ROOT_PATH$input_path"
29292    fi
29293  fi
29294
29295
29296  if test "x$path" != "x$new_path"; then
29297    BOOT_JDK="$new_path"
29298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29299$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29300  fi
29301
29302    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29303
29304  path="$BOOT_JDK"
29305  has_colon=`$ECHO $path | $GREP ^.:`
29306  new_path="$path"
29307  if test "x$has_colon" = x; then
29308    # Not in mixed or Windows style, start by that.
29309    new_path=`cmd //c echo $path`
29310  fi
29311
29312
29313  input_path="$new_path"
29314  # Check if we need to convert this using DOS-style short mode. If the path
29315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29316  # take no chances and rewrite it.
29317  # Note: m4 eats our [], so we need to use [ and ] instead.
29318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29319  if test "x$has_forbidden_chars" != x; then
29320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29321    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29322  fi
29323
29324
29325  windows_path="$new_path"
29326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29327    unix_path=`$CYGPATH -u "$windows_path"`
29328    new_path="$unix_path"
29329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29331    new_path="$unix_path"
29332  fi
29333
29334  if test "x$path" != "x$new_path"; then
29335    BOOT_JDK="$new_path"
29336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29338  fi
29339
29340  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29341  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29342
29343    else
29344      # We're on a unix platform. Hooray! :)
29345      path="$BOOT_JDK"
29346      has_space=`$ECHO "$path" | $GREP " "`
29347      if test "x$has_space" != x; then
29348        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29349$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29350        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29351      fi
29352
29353      # Use eval to expand a potential ~
29354      eval path="$path"
29355      if test ! -f "$path" && test ! -d "$path"; then
29356        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29357      fi
29358
29359      if test -d "$path"; then
29360        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29361      else
29362        dir="`$DIRNAME "$path"`"
29363        base="`$BASENAME "$path"`"
29364        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29365      fi
29366    fi
29367  fi
29368
29369            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29370$as_echo_n "checking for Boot JDK... " >&6; }
29371            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29372$as_echo "$BOOT_JDK" >&6; }
29373            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29374$as_echo_n "checking Boot JDK version... " >&6; }
29375            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29376            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29377$as_echo "$BOOT_JDK_VERSION" >&6; }
29378          fi # end check jdk version
29379        fi # end check javac
29380      fi # end check java
29381    fi # end check boot jdk found
29382  fi
29383
29384
29385  # If we haven't found anything yet, we've truly lost. Give up.
29386  if test "x$BOOT_JDK_FOUND" = xno; then
29387
29388  # Print a helpful message on how to acquire the necessary build dependency.
29389  # openjdk is the help tag: freetype, cups, alsa etc
29390  MISSING_DEPENDENCY=openjdk
29391
29392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29393    cygwin_help $MISSING_DEPENDENCY
29394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29395    msys_help $MISSING_DEPENDENCY
29396  else
29397    PKGHANDLER_COMMAND=
29398
29399    case $PKGHANDLER in
29400      apt-get)
29401        apt_help     $MISSING_DEPENDENCY ;;
29402      yum)
29403        yum_help     $MISSING_DEPENDENCY ;;
29404      port)
29405        port_help    $MISSING_DEPENDENCY ;;
29406      pkgutil)
29407        pkgutil_help $MISSING_DEPENDENCY ;;
29408      pkgadd)
29409        pkgadd_help  $MISSING_DEPENDENCY ;;
29410    esac
29411
29412    if test "x$PKGHANDLER_COMMAND" != x; then
29413      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29414    fi
29415  fi
29416
29417    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29418$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29419    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29420$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29421    as_fn_error $? "Cannot continue" "$LINENO" 5
29422  fi
29423
29424
29425
29426  # Setup tools from the Boot JDK.
29427
29428  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29429
29430  # Publish this variable in the help.
29431
29432
29433  if [ -z "${JAVA+x}" ]; then
29434    # The variable is not set by user, try to locate tool using the code snippet
29435
29436      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29437$as_echo_n "checking for java in Boot JDK... " >&6; }
29438      JAVA=$BOOT_JDK/bin/java
29439      if test ! -x $JAVA; then
29440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29441$as_echo "not found" >&6; }
29442        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29443$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29444        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29445      fi
29446      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29447$as_echo "ok" >&6; }
29448
29449
29450  else
29451    # The variable is set, but is it from the command line or the environment?
29452
29453    # Try to remove the string !JAVA! from our list.
29454    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29455    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29456      # If it failed, the variable was not from the command line. Ignore it,
29457      # but warn the user (except for BASH, which is always set by the calling BASH).
29458      if test "xJAVA" != xBASH; then
29459        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29460$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29461      fi
29462      # Try to locate tool using the code snippet
29463
29464      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29465$as_echo_n "checking for java in Boot JDK... " >&6; }
29466      JAVA=$BOOT_JDK/bin/java
29467      if test ! -x $JAVA; then
29468        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29469$as_echo "not found" >&6; }
29470        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29471$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29472        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29473      fi
29474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29475$as_echo "ok" >&6; }
29476
29477
29478    else
29479      # If it succeeded, then it was overridden by the user. We will use it
29480      # for the tool.
29481
29482      # First remove it from the list of overridden variables, so we can test
29483      # for unknown variables in the end.
29484      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29485
29486      # Check if we try to supply an empty value
29487      if test "x$JAVA" = x; then
29488        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29489$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29491$as_echo_n "checking for JAVA... " >&6; }
29492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29493$as_echo "disabled" >&6; }
29494      else
29495        # Check if the provided tool contains a complete path.
29496        tool_specified="$JAVA"
29497        tool_basename="${tool_specified##*/}"
29498        if test "x$tool_basename" = "x$tool_specified"; then
29499          # A command without a complete path is provided, search $PATH.
29500          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29501$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29502          # Extract the first word of "$tool_basename", so it can be a program name with args.
29503set dummy $tool_basename; ac_word=$2
29504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29505$as_echo_n "checking for $ac_word... " >&6; }
29506if ${ac_cv_path_JAVA+:} false; then :
29507  $as_echo_n "(cached) " >&6
29508else
29509  case $JAVA in
29510  [\\/]* | ?:[\\/]*)
29511  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29512  ;;
29513  *)
29514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29515for as_dir in $PATH
29516do
29517  IFS=$as_save_IFS
29518  test -z "$as_dir" && as_dir=.
29519    for ac_exec_ext in '' $ac_executable_extensions; do
29520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29521    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29523    break 2
29524  fi
29525done
29526  done
29527IFS=$as_save_IFS
29528
29529  ;;
29530esac
29531fi
29532JAVA=$ac_cv_path_JAVA
29533if test -n "$JAVA"; then
29534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29535$as_echo "$JAVA" >&6; }
29536else
29537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29538$as_echo "no" >&6; }
29539fi
29540
29541
29542          if test "x$JAVA" = x; then
29543            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29544          fi
29545        else
29546          # Otherwise we believe it is a complete path. Use it as it is.
29547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29548$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29549          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29550$as_echo_n "checking for JAVA... " >&6; }
29551          if test ! -x "$tool_specified"; then
29552            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29553$as_echo "not found" >&6; }
29554            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29555          fi
29556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29557$as_echo "$tool_specified" >&6; }
29558        fi
29559      fi
29560    fi
29561
29562  fi
29563
29564
29565
29566  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29567
29568  # Publish this variable in the help.
29569
29570
29571  if [ -z "${JAVAC+x}" ]; then
29572    # The variable is not set by user, try to locate tool using the code snippet
29573
29574      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29575$as_echo_n "checking for javac in Boot JDK... " >&6; }
29576      JAVAC=$BOOT_JDK/bin/javac
29577      if test ! -x $JAVAC; then
29578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29579$as_echo "not found" >&6; }
29580        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29581$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29582        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29583      fi
29584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29585$as_echo "ok" >&6; }
29586
29587
29588  else
29589    # The variable is set, but is it from the command line or the environment?
29590
29591    # Try to remove the string !JAVAC! from our list.
29592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29594      # If it failed, the variable was not from the command line. Ignore it,
29595      # but warn the user (except for BASH, which is always set by the calling BASH).
29596      if test "xJAVAC" != xBASH; then
29597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29598$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29599      fi
29600      # Try to locate tool using the code snippet
29601
29602      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29603$as_echo_n "checking for javac in Boot JDK... " >&6; }
29604      JAVAC=$BOOT_JDK/bin/javac
29605      if test ! -x $JAVAC; then
29606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29607$as_echo "not found" >&6; }
29608        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29609$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29610        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29611      fi
29612      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29613$as_echo "ok" >&6; }
29614
29615
29616    else
29617      # If it succeeded, then it was overridden by the user. We will use it
29618      # for the tool.
29619
29620      # First remove it from the list of overridden variables, so we can test
29621      # for unknown variables in the end.
29622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29623
29624      # Check if we try to supply an empty value
29625      if test "x$JAVAC" = x; then
29626        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29627$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29628        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29629$as_echo_n "checking for JAVAC... " >&6; }
29630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29631$as_echo "disabled" >&6; }
29632      else
29633        # Check if the provided tool contains a complete path.
29634        tool_specified="$JAVAC"
29635        tool_basename="${tool_specified##*/}"
29636        if test "x$tool_basename" = "x$tool_specified"; then
29637          # A command without a complete path is provided, search $PATH.
29638          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29639$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29640          # Extract the first word of "$tool_basename", so it can be a program name with args.
29641set dummy $tool_basename; ac_word=$2
29642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29643$as_echo_n "checking for $ac_word... " >&6; }
29644if ${ac_cv_path_JAVAC+:} false; then :
29645  $as_echo_n "(cached) " >&6
29646else
29647  case $JAVAC in
29648  [\\/]* | ?:[\\/]*)
29649  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29650  ;;
29651  *)
29652  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29653for as_dir in $PATH
29654do
29655  IFS=$as_save_IFS
29656  test -z "$as_dir" && as_dir=.
29657    for ac_exec_ext in '' $ac_executable_extensions; do
29658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29659    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29661    break 2
29662  fi
29663done
29664  done
29665IFS=$as_save_IFS
29666
29667  ;;
29668esac
29669fi
29670JAVAC=$ac_cv_path_JAVAC
29671if test -n "$JAVAC"; then
29672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29673$as_echo "$JAVAC" >&6; }
29674else
29675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29676$as_echo "no" >&6; }
29677fi
29678
29679
29680          if test "x$JAVAC" = x; then
29681            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29682          fi
29683        else
29684          # Otherwise we believe it is a complete path. Use it as it is.
29685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29686$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29687          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29688$as_echo_n "checking for JAVAC... " >&6; }
29689          if test ! -x "$tool_specified"; then
29690            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29691$as_echo "not found" >&6; }
29692            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29693          fi
29694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29695$as_echo "$tool_specified" >&6; }
29696        fi
29697      fi
29698    fi
29699
29700  fi
29701
29702
29703
29704  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29705
29706  # Publish this variable in the help.
29707
29708
29709  if [ -z "${JAVAH+x}" ]; then
29710    # The variable is not set by user, try to locate tool using the code snippet
29711
29712      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29713$as_echo_n "checking for javah in Boot JDK... " >&6; }
29714      JAVAH=$BOOT_JDK/bin/javah
29715      if test ! -x $JAVAH; then
29716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29717$as_echo "not found" >&6; }
29718        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29719$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29720        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29721      fi
29722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29723$as_echo "ok" >&6; }
29724
29725
29726  else
29727    # The variable is set, but is it from the command line or the environment?
29728
29729    # Try to remove the string !JAVAH! from our list.
29730    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29731    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29732      # If it failed, the variable was not from the command line. Ignore it,
29733      # but warn the user (except for BASH, which is always set by the calling BASH).
29734      if test "xJAVAH" != xBASH; then
29735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29736$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29737      fi
29738      # Try to locate tool using the code snippet
29739
29740      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29741$as_echo_n "checking for javah in Boot JDK... " >&6; }
29742      JAVAH=$BOOT_JDK/bin/javah
29743      if test ! -x $JAVAH; then
29744        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29745$as_echo "not found" >&6; }
29746        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29747$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29748        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29749      fi
29750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29751$as_echo "ok" >&6; }
29752
29753
29754    else
29755      # If it succeeded, then it was overridden by the user. We will use it
29756      # for the tool.
29757
29758      # First remove it from the list of overridden variables, so we can test
29759      # for unknown variables in the end.
29760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29761
29762      # Check if we try to supply an empty value
29763      if test "x$JAVAH" = x; then
29764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29765$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29767$as_echo_n "checking for JAVAH... " >&6; }
29768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29769$as_echo "disabled" >&6; }
29770      else
29771        # Check if the provided tool contains a complete path.
29772        tool_specified="$JAVAH"
29773        tool_basename="${tool_specified##*/}"
29774        if test "x$tool_basename" = "x$tool_specified"; then
29775          # A command without a complete path is provided, search $PATH.
29776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29777$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29778          # Extract the first word of "$tool_basename", so it can be a program name with args.
29779set dummy $tool_basename; ac_word=$2
29780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29781$as_echo_n "checking for $ac_word... " >&6; }
29782if ${ac_cv_path_JAVAH+:} false; then :
29783  $as_echo_n "(cached) " >&6
29784else
29785  case $JAVAH in
29786  [\\/]* | ?:[\\/]*)
29787  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29788  ;;
29789  *)
29790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29791for as_dir in $PATH
29792do
29793  IFS=$as_save_IFS
29794  test -z "$as_dir" && as_dir=.
29795    for ac_exec_ext in '' $ac_executable_extensions; do
29796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29797    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29799    break 2
29800  fi
29801done
29802  done
29803IFS=$as_save_IFS
29804
29805  ;;
29806esac
29807fi
29808JAVAH=$ac_cv_path_JAVAH
29809if test -n "$JAVAH"; then
29810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29811$as_echo "$JAVAH" >&6; }
29812else
29813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29814$as_echo "no" >&6; }
29815fi
29816
29817
29818          if test "x$JAVAH" = x; then
29819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29820          fi
29821        else
29822          # Otherwise we believe it is a complete path. Use it as it is.
29823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29824$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29826$as_echo_n "checking for JAVAH... " >&6; }
29827          if test ! -x "$tool_specified"; then
29828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29829$as_echo "not found" >&6; }
29830            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29831          fi
29832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29833$as_echo "$tool_specified" >&6; }
29834        fi
29835      fi
29836    fi
29837
29838  fi
29839
29840
29841
29842  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29843
29844  # Publish this variable in the help.
29845
29846
29847  if [ -z "${JAR+x}" ]; then
29848    # The variable is not set by user, try to locate tool using the code snippet
29849
29850      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29851$as_echo_n "checking for jar in Boot JDK... " >&6; }
29852      JAR=$BOOT_JDK/bin/jar
29853      if test ! -x $JAR; then
29854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29855$as_echo "not found" >&6; }
29856        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29857$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29858        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29859      fi
29860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29861$as_echo "ok" >&6; }
29862
29863
29864  else
29865    # The variable is set, but is it from the command line or the environment?
29866
29867    # Try to remove the string !JAR! from our list.
29868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29870      # If it failed, the variable was not from the command line. Ignore it,
29871      # but warn the user (except for BASH, which is always set by the calling BASH).
29872      if test "xJAR" != xBASH; then
29873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29874$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29875      fi
29876      # Try to locate tool using the code snippet
29877
29878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29879$as_echo_n "checking for jar in Boot JDK... " >&6; }
29880      JAR=$BOOT_JDK/bin/jar
29881      if test ! -x $JAR; then
29882        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29883$as_echo "not found" >&6; }
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29885$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29886        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29887      fi
29888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29889$as_echo "ok" >&6; }
29890
29891
29892    else
29893      # If it succeeded, then it was overridden by the user. We will use it
29894      # for the tool.
29895
29896      # First remove it from the list of overridden variables, so we can test
29897      # for unknown variables in the end.
29898      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29899
29900      # Check if we try to supply an empty value
29901      if test "x$JAR" = x; then
29902        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29903$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29905$as_echo_n "checking for JAR... " >&6; }
29906        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29907$as_echo "disabled" >&6; }
29908      else
29909        # Check if the provided tool contains a complete path.
29910        tool_specified="$JAR"
29911        tool_basename="${tool_specified##*/}"
29912        if test "x$tool_basename" = "x$tool_specified"; then
29913          # A command without a complete path is provided, search $PATH.
29914          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29915$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29916          # Extract the first word of "$tool_basename", so it can be a program name with args.
29917set dummy $tool_basename; ac_word=$2
29918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29919$as_echo_n "checking for $ac_word... " >&6; }
29920if ${ac_cv_path_JAR+:} false; then :
29921  $as_echo_n "(cached) " >&6
29922else
29923  case $JAR in
29924  [\\/]* | ?:[\\/]*)
29925  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29926  ;;
29927  *)
29928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29929for as_dir in $PATH
29930do
29931  IFS=$as_save_IFS
29932  test -z "$as_dir" && as_dir=.
29933    for ac_exec_ext in '' $ac_executable_extensions; do
29934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29935    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29937    break 2
29938  fi
29939done
29940  done
29941IFS=$as_save_IFS
29942
29943  ;;
29944esac
29945fi
29946JAR=$ac_cv_path_JAR
29947if test -n "$JAR"; then
29948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29949$as_echo "$JAR" >&6; }
29950else
29951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29952$as_echo "no" >&6; }
29953fi
29954
29955
29956          if test "x$JAR" = x; then
29957            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29958          fi
29959        else
29960          # Otherwise we believe it is a complete path. Use it as it is.
29961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29962$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29963          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29964$as_echo_n "checking for JAR... " >&6; }
29965          if test ! -x "$tool_specified"; then
29966            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29967$as_echo "not found" >&6; }
29968            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29969          fi
29970          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29971$as_echo "$tool_specified" >&6; }
29972        fi
29973      fi
29974    fi
29975
29976  fi
29977
29978
29979
29980  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29981
29982  # Publish this variable in the help.
29983
29984
29985  if [ -z "${JARSIGNER+x}" ]; then
29986    # The variable is not set by user, try to locate tool using the code snippet
29987
29988      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29989$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29990      JARSIGNER=$BOOT_JDK/bin/jarsigner
29991      if test ! -x $JARSIGNER; then
29992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29993$as_echo "not found" >&6; }
29994        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29995$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29996        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29997      fi
29998      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29999$as_echo "ok" >&6; }
30000
30001
30002  else
30003    # The variable is set, but is it from the command line or the environment?
30004
30005    # Try to remove the string !JARSIGNER! from our list.
30006    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30007    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30008      # If it failed, the variable was not from the command line. Ignore it,
30009      # but warn the user (except for BASH, which is always set by the calling BASH).
30010      if test "xJARSIGNER" != xBASH; then
30011        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30012$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30013      fi
30014      # Try to locate tool using the code snippet
30015
30016      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30017$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30018      JARSIGNER=$BOOT_JDK/bin/jarsigner
30019      if test ! -x $JARSIGNER; then
30020        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30021$as_echo "not found" >&6; }
30022        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30023$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30024        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30025      fi
30026      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30027$as_echo "ok" >&6; }
30028
30029
30030    else
30031      # If it succeeded, then it was overridden by the user. We will use it
30032      # for the tool.
30033
30034      # First remove it from the list of overridden variables, so we can test
30035      # for unknown variables in the end.
30036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30037
30038      # Check if we try to supply an empty value
30039      if test "x$JARSIGNER" = x; then
30040        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30041$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30043$as_echo_n "checking for JARSIGNER... " >&6; }
30044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30045$as_echo "disabled" >&6; }
30046      else
30047        # Check if the provided tool contains a complete path.
30048        tool_specified="$JARSIGNER"
30049        tool_basename="${tool_specified##*/}"
30050        if test "x$tool_basename" = "x$tool_specified"; then
30051          # A command without a complete path is provided, search $PATH.
30052          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30053$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30054          # Extract the first word of "$tool_basename", so it can be a program name with args.
30055set dummy $tool_basename; ac_word=$2
30056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30057$as_echo_n "checking for $ac_word... " >&6; }
30058if ${ac_cv_path_JARSIGNER+:} false; then :
30059  $as_echo_n "(cached) " >&6
30060else
30061  case $JARSIGNER in
30062  [\\/]* | ?:[\\/]*)
30063  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30064  ;;
30065  *)
30066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30067for as_dir in $PATH
30068do
30069  IFS=$as_save_IFS
30070  test -z "$as_dir" && as_dir=.
30071    for ac_exec_ext in '' $ac_executable_extensions; do
30072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30073    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30075    break 2
30076  fi
30077done
30078  done
30079IFS=$as_save_IFS
30080
30081  ;;
30082esac
30083fi
30084JARSIGNER=$ac_cv_path_JARSIGNER
30085if test -n "$JARSIGNER"; then
30086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30087$as_echo "$JARSIGNER" >&6; }
30088else
30089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30090$as_echo "no" >&6; }
30091fi
30092
30093
30094          if test "x$JARSIGNER" = x; then
30095            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30096          fi
30097        else
30098          # Otherwise we believe it is a complete path. Use it as it is.
30099          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30100$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30101          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30102$as_echo_n "checking for JARSIGNER... " >&6; }
30103          if test ! -x "$tool_specified"; then
30104            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30105$as_echo "not found" >&6; }
30106            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30107          fi
30108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30109$as_echo "$tool_specified" >&6; }
30110        fi
30111      fi
30112    fi
30113
30114  fi
30115
30116
30117
30118  # Finally, set some other options...
30119
30120  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30121  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30122
30123
30124
30125  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30126  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30127  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30128  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30129  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30130  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30131    dummy="$dummy -Xpatch:foo=bar"
30132    JVM_ARG_OK=true
30133  else
30134    $ECHO "Arg failed:" >&5
30135    $ECHO "$OUTPUT" >&5
30136    JVM_ARG_OK=false
30137  fi
30138
30139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30140$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30141  if test "x$JVM_ARG_OK" = "xtrue"; then
30142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30143$as_echo "yes" >&6; }
30144    BOOT_JDK_MODULAR="true"
30145  else
30146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30147$as_echo "no" >&6; }
30148    BOOT_JDK_MODULAR="false"
30149  fi
30150
30151
30152
30153
30154  # Check if the boot jdk is 32 or 64 bit
30155  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30156    BOOT_JDK_BITS="64"
30157  else
30158    BOOT_JDK_BITS="32"
30159  fi
30160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30161$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30163$as_echo "$BOOT_JDK_BITS" >&6; }
30164
30165
30166
30167
30168# Check whether --with-build-jdk was given.
30169if test "${with_build_jdk+set}" = set; then :
30170  withval=$with_build_jdk;
30171fi
30172
30173
30174  CREATE_BUILDJDK_FOR_HOST=false
30175  BUILD_JDK_FOUND="no"
30176  if test "x$with_build_jdk" != "x"; then
30177
30178  if test "x$BUILD_JDK_FOUND" = xno; then
30179    # Execute the test
30180
30181       if test "x$with_build_jdk" != x; then
30182         BUILD_JDK=$with_build_jdk
30183         BUILD_JDK_FOUND=maybe
30184         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30185$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30186       fi
30187
30188    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30189    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30190      # Do we have a bin/java?
30191      if test ! -x "$BUILD_JDK/bin/java"; then
30192        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30193$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30194        BUILD_JDK_FOUND=no
30195      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30196        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30197$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30198        BUILD_JDK_FOUND=no
30199      elif test ! -x "$BUILD_JDK/bin/javac"; then
30200        # Do we have a bin/javac?
30201        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30202$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30204$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30205        BUILD_JDK_FOUND=no
30206      else
30207        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30208        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30209
30210        # Extra M4 quote needed to protect [] in grep expression.
30211        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30212        if test "x$FOUND_CORRECT_VERSION" = x; then
30213          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30214$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30215          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30216$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30217          BUILD_JDK_FOUND=no
30218        else
30219          # We're done!
30220          BUILD_JDK_FOUND=yes
30221
30222  # Only process if variable expands to non-empty
30223
30224  if test "x$BUILD_JDK" != x; then
30225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30226
30227  # Input might be given as Windows format, start by converting to
30228  # unix format.
30229  path="$BUILD_JDK"
30230  new_path=`$CYGPATH -u "$path"`
30231
30232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30235  # "foo.exe" is OK but "foo" is an error.
30236  #
30237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30238  # It is also a way to make sure we got the proper file name for the real test later on.
30239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30240  if test "x$test_shortpath" = x; then
30241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30242$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30243    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30244  fi
30245
30246  # Call helper function which possibly converts this using DOS-style short mode.
30247  # If so, the updated path is stored in $new_path.
30248
30249  input_path="$new_path"
30250  # Check if we need to convert this using DOS-style short mode. If the path
30251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30252  # take no chances and rewrite it.
30253  # Note: m4 eats our [], so we need to use [ and ] instead.
30254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30255  if test "x$has_forbidden_chars" != x; then
30256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30260      # Going to short mode and back again did indeed matter. Since short mode is
30261      # case insensitive, let's make it lowercase to improve readability.
30262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30263      # Now convert it back to Unix-style (cygpath)
30264      input_path=`$CYGPATH -u "$shortmode_path"`
30265      new_path="$input_path"
30266    fi
30267  fi
30268
30269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30270  if test "x$test_cygdrive_prefix" = x; then
30271    # As a simple fix, exclude /usr/bin since it's not a real path.
30272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30274      # a path prefixed by /cygdrive for fixpath to work.
30275      new_path="$CYGWIN_ROOT_PATH$input_path"
30276    fi
30277  fi
30278
30279
30280  if test "x$path" != "x$new_path"; then
30281    BUILD_JDK="$new_path"
30282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30283$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30284  fi
30285
30286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30287
30288  path="$BUILD_JDK"
30289  has_colon=`$ECHO $path | $GREP ^.:`
30290  new_path="$path"
30291  if test "x$has_colon" = x; then
30292    # Not in mixed or Windows style, start by that.
30293    new_path=`cmd //c echo $path`
30294  fi
30295
30296
30297  input_path="$new_path"
30298  # Check if we need to convert this using DOS-style short mode. If the path
30299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30300  # take no chances and rewrite it.
30301  # Note: m4 eats our [], so we need to use [ and ] instead.
30302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30303  if test "x$has_forbidden_chars" != x; then
30304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30306  fi
30307
30308
30309  windows_path="$new_path"
30310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30311    unix_path=`$CYGPATH -u "$windows_path"`
30312    new_path="$unix_path"
30313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30315    new_path="$unix_path"
30316  fi
30317
30318  if test "x$path" != "x$new_path"; then
30319    BUILD_JDK="$new_path"
30320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30321$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30322  fi
30323
30324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30326
30327    else
30328      # We're on a unix platform. Hooray! :)
30329      path="$BUILD_JDK"
30330      has_space=`$ECHO "$path" | $GREP " "`
30331      if test "x$has_space" != x; then
30332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30333$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30335      fi
30336
30337      # Use eval to expand a potential ~
30338      eval path="$path"
30339      if test ! -f "$path" && test ! -d "$path"; then
30340        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30341      fi
30342
30343      if test -d "$path"; then
30344        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30345      else
30346        dir="`$DIRNAME "$path"`"
30347        base="`$BASENAME "$path"`"
30348        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30349      fi
30350    fi
30351  fi
30352
30353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30354$as_echo_n "checking for Build JDK... " >&6; }
30355          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30356$as_echo "$BUILD_JDK" >&6; }
30357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30358$as_echo_n "checking Build JDK version... " >&6; }
30359          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30361$as_echo "$BUILD_JDK_VERSION" >&6; }
30362        fi # end check jdk version
30363      fi # end check java
30364    fi # end check build jdk found
30365  fi
30366
30367  else
30368    if test "x$COMPILE_TYPE" = "xcross"; then
30369      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30370      BUILD_JDK_FOUND=yes
30371      CREATE_BUILDJDK=true
30372      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30373$as_echo_n "checking for Build JDK... " >&6; }
30374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30375$as_echo "yes, will build it for the host platform" >&6; }
30376    else
30377      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30378      BUILD_JDK_FOUND=yes
30379      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30380$as_echo_n "checking for Build JDK... " >&6; }
30381      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30382$as_echo "yes, will use output dir" >&6; }
30383    fi
30384  fi
30385
30386  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30388$as_echo_n "checking for Build JDK... " >&6; }
30389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30390$as_echo "no" >&6; }
30391    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30392  fi
30393
30394
30395
30396
30397
30398###############################################################################
30399#
30400# Configure the sources to use. We can add or override individual directories.
30401#
30402###############################################################################
30403
30404
30405  # Where are the sources.
30406  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30407  CORBA_TOPDIR="$SRC_ROOT/corba"
30408  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30409  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30410  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30411  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30412  JDK_TOPDIR="$SRC_ROOT/jdk"
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422  # This feature is no longer supported.
30423
30424
30425
30426# Check whether --with-add-source-root was given.
30427if test "${with_add_source_root+set}" = set; then :
30428  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
30429$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30430fi
30431
30432
30433
30434
30435# Check whether --with-override-source-root was given.
30436if test "${with_override_source_root+set}" = set; then :
30437  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
30438$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30439fi
30440
30441
30442
30443
30444# Check whether --with-adds-and-overrides was given.
30445if test "${with_adds_and_overrides+set}" = set; then :
30446  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
30447$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30448fi
30449
30450
30451
30452
30453# Check whether --with-override-langtools was given.
30454if test "${with_override_langtools+set}" = set; then :
30455  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30456$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30457fi
30458
30459
30460
30461
30462# Check whether --with-override-corba was given.
30463if test "${with_override_corba+set}" = set; then :
30464  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30465$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30466fi
30467
30468
30469
30470
30471# Check whether --with-override-jaxp was given.
30472if test "${with_override_jaxp+set}" = set; then :
30473  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30474$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30475fi
30476
30477
30478
30479
30480# Check whether --with-override-jaxws was given.
30481if test "${with_override_jaxws+set}" = set; then :
30482  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30483$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30484fi
30485
30486
30487
30488
30489# Check whether --with-override-hotspot was given.
30490if test "${with_override_hotspot+set}" = set; then :
30491  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30492$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30493fi
30494
30495
30496
30497
30498# Check whether --with-override-nashorn was given.
30499if test "${with_override_nashorn+set}" = set; then :
30500  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30501$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30502fi
30503
30504
30505
30506
30507# Check whether --with-override-jdk was given.
30508if test "${with_override_jdk+set}" = set; then :
30509  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30510$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30511fi
30512
30513
30514
30515
30516  BUILD_OUTPUT="$OUTPUT_ROOT"
30517
30518
30519  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30520  BUILD_HOTSPOT=true
30521
30522
30523
30524# Check whether --with-import-hotspot was given.
30525if test "${with_import_hotspot+set}" = set; then :
30526  withval=$with_import_hotspot;
30527fi
30528
30529  if test "x$with_import_hotspot" != x; then
30530    CURDIR="$PWD"
30531    cd "$with_import_hotspot"
30532    HOTSPOT_DIST="`pwd`"
30533    cd "$CURDIR"
30534    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30535      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30536    fi
30537    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30538$as_echo_n "checking if hotspot should be imported... " >&6; }
30539    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30540$as_echo "yes from $HOTSPOT_DIST" >&6; }
30541    BUILD_HOTSPOT=false
30542  fi
30543
30544  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30545
30546
30547
30548
30549# Check whether --with-import-modules was given.
30550if test "${with_import_modules+set}" = set; then :
30551  withval=$with_import_modules;
30552fi
30553
30554
30555  if test "x$with_import_modules" != x \
30556      && test "x$with_import_modules" != "xno"; then
30557    if test -d "$with_import_modules"; then
30558      IMPORT_MODULES_TOPDIR="$with_import_modules"
30559
30560  # Only process if variable expands to non-empty
30561
30562  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30563    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30564
30565  # Input might be given as Windows format, start by converting to
30566  # unix format.
30567  path="$IMPORT_MODULES_TOPDIR"
30568  new_path=`$CYGPATH -u "$path"`
30569
30570  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30571  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30572  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30573  # "foo.exe" is OK but "foo" is an error.
30574  #
30575  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30576  # It is also a way to make sure we got the proper file name for the real test later on.
30577  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30578  if test "x$test_shortpath" = x; then
30579    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30580$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30581    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30582  fi
30583
30584  # Call helper function which possibly converts this using DOS-style short mode.
30585  # If so, the updated path is stored in $new_path.
30586
30587  input_path="$new_path"
30588  # Check if we need to convert this using DOS-style short mode. If the path
30589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30590  # take no chances and rewrite it.
30591  # Note: m4 eats our [], so we need to use [ and ] instead.
30592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30593  if test "x$has_forbidden_chars" != x; then
30594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30598      # Going to short mode and back again did indeed matter. Since short mode is
30599      # case insensitive, let's make it lowercase to improve readability.
30600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30601      # Now convert it back to Unix-style (cygpath)
30602      input_path=`$CYGPATH -u "$shortmode_path"`
30603      new_path="$input_path"
30604    fi
30605  fi
30606
30607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30608  if test "x$test_cygdrive_prefix" = x; then
30609    # As a simple fix, exclude /usr/bin since it's not a real path.
30610    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30612      # a path prefixed by /cygdrive for fixpath to work.
30613      new_path="$CYGWIN_ROOT_PATH$input_path"
30614    fi
30615  fi
30616
30617
30618  if test "x$path" != "x$new_path"; then
30619    IMPORT_MODULES_TOPDIR="$new_path"
30620    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30621$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30622  fi
30623
30624    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30625
30626  path="$IMPORT_MODULES_TOPDIR"
30627  has_colon=`$ECHO $path | $GREP ^.:`
30628  new_path="$path"
30629  if test "x$has_colon" = x; then
30630    # Not in mixed or Windows style, start by that.
30631    new_path=`cmd //c echo $path`
30632  fi
30633
30634
30635  input_path="$new_path"
30636  # Check if we need to convert this using DOS-style short mode. If the path
30637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30638  # take no chances and rewrite it.
30639  # Note: m4 eats our [], so we need to use [ and ] instead.
30640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30641  if test "x$has_forbidden_chars" != x; then
30642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30643    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30644  fi
30645
30646
30647  windows_path="$new_path"
30648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30649    unix_path=`$CYGPATH -u "$windows_path"`
30650    new_path="$unix_path"
30651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30653    new_path="$unix_path"
30654  fi
30655
30656  if test "x$path" != "x$new_path"; then
30657    IMPORT_MODULES_TOPDIR="$new_path"
30658    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30659$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30660  fi
30661
30662  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30663  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30664
30665    else
30666      # We're on a unix platform. Hooray! :)
30667      path="$IMPORT_MODULES_TOPDIR"
30668      has_space=`$ECHO "$path" | $GREP " "`
30669      if test "x$has_space" != x; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30671$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30672        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30673      fi
30674
30675      # Use eval to expand a potential ~
30676      eval path="$path"
30677      if test ! -f "$path" && test ! -d "$path"; then
30678        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30679      fi
30680
30681      if test -d "$path"; then
30682        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30683      else
30684        dir="`$DIRNAME "$path"`"
30685        base="`$BASENAME "$path"`"
30686        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30687      fi
30688    fi
30689  fi
30690
30691    elif test -e "$with_import_modules"; then
30692      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30693      $RM -rf "$IMPORT_MODULES_TOPDIR"
30694      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30695      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30696        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30697      fi
30698    else
30699      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30700    fi
30701  fi
30702
30703  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30704    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30705  fi
30706  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30707    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30708  fi
30709  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30710    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30711  fi
30712  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30713    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30714  fi
30715  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30716    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30717  fi
30718  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30719    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30720  fi
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730###############################################################################
30731#
30732# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30733# native code.
30734#
30735###############################################################################
30736
30737# See if we are doing a complete static build or not
30738
30739  # Check whether --enable-static-build was given.
30740if test "${enable_static_build+set}" = set; then :
30741  enableval=$enable_static_build;
30742fi
30743
30744  STATIC_BUILD=false
30745  if test "x$enable_static_build" = "xyes"; then
30746    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30747$as_echo_n "checking if static build is enabled... " >&6; }
30748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30749$as_echo "yes" >&6; }
30750    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30751      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30752    fi
30753    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30754    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30755    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30756    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30757    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30758    STATIC_BUILD=true
30759  elif test "x$enable_static_build" = "xno"; then
30760    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30761$as_echo_n "checking if static build is enabled... " >&6; }
30762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30763$as_echo "no" >&6; }
30764  elif test "x$enable_static_build" != "x"; then
30765    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30766  fi
30767
30768
30769
30770
30771# First determine the toolchain type (compiler family)
30772
30773
30774# Check whether --with-toolchain-type was given.
30775if test "${with_toolchain_type+set}" = set; then :
30776  withval=$with_toolchain_type;
30777fi
30778
30779
30780  # Use indirect variable referencing
30781  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30782  VALID_TOOLCHAINS=${!toolchain_var_name}
30783
30784  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30785    if test -n "$XCODEBUILD"; then
30786      # On Mac OS X, default toolchain to clang after Xcode 5
30787      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30788      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30789      if test $? -ne 0; then
30790        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30791      fi
30792      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30793          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30794          $CUT -f 1 -d .`
30795      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30796$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30797      if test $XCODE_MAJOR_VERSION -ge 5; then
30798          DEFAULT_TOOLCHAIN="clang"
30799      else
30800          DEFAULT_TOOLCHAIN="gcc"
30801      fi
30802    else
30803      # If Xcode is not installed, but the command line tools are
30804      # then we can't run xcodebuild. On these systems we should
30805      # default to clang
30806      DEFAULT_TOOLCHAIN="clang"
30807    fi
30808  else
30809    # First toolchain type in the list is the default
30810    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30811  fi
30812
30813  if test "x$with_toolchain_type" = xlist; then
30814    # List all toolchains
30815    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30816$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30817    for toolchain in $VALID_TOOLCHAINS; do
30818      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30819      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30820      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30821    done
30822
30823    exit 0
30824  elif test "x$with_toolchain_type" != x; then
30825    # User override; check that it is valid
30826    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30827      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30828$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30829      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30830$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30831      as_fn_error $? "Cannot continue." "$LINENO" 5
30832    fi
30833    TOOLCHAIN_TYPE=$with_toolchain_type
30834  else
30835    # No flag given, use default
30836    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30837  fi
30838
30839
30840  TOOLCHAIN_CC_BINARY_clang="clang"
30841  TOOLCHAIN_CC_BINARY_gcc="gcc"
30842  TOOLCHAIN_CC_BINARY_microsoft="cl"
30843  TOOLCHAIN_CC_BINARY_solstudio="cc"
30844  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30845
30846  TOOLCHAIN_CXX_BINARY_clang="clang++"
30847  TOOLCHAIN_CXX_BINARY_gcc="g++"
30848  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30849  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30850  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30851
30852  # Use indirect variable referencing
30853  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30854  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30855  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30856  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30857  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30858  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30859  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30860  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30861
30862
30863  # Define filename patterns
30864  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30865    LIBRARY_PREFIX=
30866    SHARED_LIBRARY_SUFFIX='.dll'
30867    STATIC_LIBRARY_SUFFIX='.lib'
30868    SHARED_LIBRARY='$1.dll'
30869    STATIC_LIBRARY='$1.lib'
30870    OBJ_SUFFIX='.obj'
30871    EXE_SUFFIX='.exe'
30872  else
30873    LIBRARY_PREFIX=lib
30874    SHARED_LIBRARY_SUFFIX='.so'
30875    STATIC_LIBRARY_SUFFIX='.a'
30876    SHARED_LIBRARY='lib$1.so'
30877    STATIC_LIBRARY='lib$1.a'
30878    OBJ_SUFFIX='.o'
30879    EXE_SUFFIX=''
30880    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30881      # For full static builds, we're overloading the SHARED_LIBRARY
30882      # variables in order to limit the amount of changes required.
30883      # It would be better to remove SHARED and just use LIBRARY and
30884      # LIBRARY_SUFFIX for libraries that can be built either
30885      # shared or static and use STATIC_* for libraries that are
30886      # always built statically.
30887      if test "x$STATIC_BUILD" = xtrue; then
30888        SHARED_LIBRARY='lib$1.a'
30889        SHARED_LIBRARY_SUFFIX='.a'
30890      else
30891        SHARED_LIBRARY='lib$1.dylib'
30892        SHARED_LIBRARY_SUFFIX='.dylib'
30893      fi
30894    fi
30895  fi
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30907    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30908$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30909  else
30910    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30911$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30912  fi
30913
30914
30915# User supplied flags should be used when configure detects compilers
30916
30917  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30918    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30919$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30920  fi
30921
30922  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30923    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30924$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30925  fi
30926
30927  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30928    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30929$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30930  fi
30931
30932
30933# Check whether --with-extra-cflags was given.
30934if test "${with_extra_cflags+set}" = set; then :
30935  withval=$with_extra_cflags;
30936fi
30937
30938
30939
30940# Check whether --with-extra-cxxflags was given.
30941if test "${with_extra_cxxflags+set}" = set; then :
30942  withval=$with_extra_cxxflags;
30943fi
30944
30945
30946
30947# Check whether --with-extra-ldflags was given.
30948if test "${with_extra_ldflags+set}" = set; then :
30949  withval=$with_extra_ldflags;
30950fi
30951
30952
30953  EXTRA_CFLAGS="$with_extra_cflags"
30954  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30955  EXTRA_LDFLAGS="$with_extra_ldflags"
30956
30957  # Hotspot needs these set in their legacy form
30958  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30959  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30960  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970  # The global CFLAGS and LDLAGS variables are used by configure tests and
30971  # should include the extra parameters
30972  CFLAGS="$EXTRA_CFLAGS"
30973  CXXFLAGS="$EXTRA_CXXFLAGS"
30974  LDFLAGS="$EXTRA_LDFLAGS"
30975  CPPFLAGS=""
30976
30977# The sysroot cflags are needed for configure to be able to run the compilers
30978
30979  if test "x$SYSROOT" != "x"; then
30980    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30981      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30982        # Solaris Studio does not have a concept of sysroot. Instead we must
30983        # make sure the default include and lib dirs are appended to each
30984        # compile and link command line. Must also add -I-xbuiltin to enable
30985        # inlining of system functions and intrinsics.
30986        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30987        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30988            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30989            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30990      fi
30991    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30992      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30993      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30994    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30995      SYSROOT_CFLAGS="-isysroot $SYSROOT"
30996      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
30997    fi
30998    # Propagate the sysroot args to hotspot
30999    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31000    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31001    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31002    # The global CFLAGS and LDFLAGS variables need these for configure to function
31003    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31004    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31005    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31006    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31007  fi
31008
31009  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31010    # We also need -iframework<path>/System/Library/Frameworks
31011    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31012    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31013    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31014    # set this here so it doesn't have to be peppered throughout the forest
31015    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31016    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31017  fi
31018
31019
31020
31021
31022
31023# Then detect the actual binaries needed
31024
31025  # FIXME: Is this needed?
31026  ac_ext=cpp
31027ac_cpp='$CXXCPP $CPPFLAGS'
31028ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31029ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31030ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31031
31032
31033  # Store the CFLAGS etc passed to the configure script.
31034  ORG_CFLAGS="$CFLAGS"
31035  ORG_CXXFLAGS="$CXXFLAGS"
31036
31037  # autoconf magic only relies on PATH, so update it if tools dir is specified
31038  OLD_PATH="$PATH"
31039
31040  # On Windows, we need to detect the visual studio installation first.
31041  # This will change the PATH, but we need to keep that new PATH even
31042  # after toolchain detection is done, since the compiler (on x86) uses
31043  # it for DLL resolution in runtime.
31044  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31045      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31046
31047  # Store path to cygwin link.exe to help excluding it when searching for
31048  # VS linker. This must be done before changing the PATH when looking for VS.
31049  # Extract the first word of "link", so it can be a program name with args.
31050set dummy link; ac_word=$2
31051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31052$as_echo_n "checking for $ac_word... " >&6; }
31053if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31054  $as_echo_n "(cached) " >&6
31055else
31056  case $CYGWIN_LINK in
31057  [\\/]* | ?:[\\/]*)
31058  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31059  ;;
31060  *)
31061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31062for as_dir in $PATH
31063do
31064  IFS=$as_save_IFS
31065  test -z "$as_dir" && as_dir=.
31066    for ac_exec_ext in '' $ac_executable_extensions; do
31067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31068    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31070    break 2
31071  fi
31072done
31073  done
31074IFS=$as_save_IFS
31075
31076  ;;
31077esac
31078fi
31079CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31080if test -n "$CYGWIN_LINK"; then
31081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31082$as_echo "$CYGWIN_LINK" >&6; }
31083else
31084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31085$as_echo "no" >&6; }
31086fi
31087
31088
31089  if test "x$CYGWIN_LINK" != x; then
31090    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31091$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31092    "$CYGWIN_LINK" --version > /dev/null
31093    if test $? -eq 0 ; then
31094      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31095$as_echo "yes" >&6; }
31096    else
31097      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31098$as_echo "no" >&6; }
31099      # This might be the VS linker. Don't exclude it later on.
31100      CYGWIN_LINK=""
31101    fi
31102  fi
31103
31104  # First-hand choice is to locate and run the vsvars bat file.
31105
31106
31107# Check whether --with-toolchain-version was given.
31108if test "${with_toolchain_version+set}" = set; then :
31109  withval=$with_toolchain_version;
31110fi
31111
31112
31113  if test "x$with_toolchain_version" = xlist; then
31114    # List all toolchains
31115    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31116$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31117    for version in $VALID_VS_VERSIONS; do
31118      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31119      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31120    done
31121
31122    exit 0
31123  elif test "x$DEVKIT_VS_VERSION" != x; then
31124    VS_VERSION=$DEVKIT_VS_VERSION
31125    TOOLCHAIN_VERSION=$VS_VERSION
31126    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31127    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31128    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31129    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31130    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31131    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31132
31133    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31134    # can still be exported as INCLUDE for compiler invocations without
31135    # SYSROOT_CFLAGS
31136    OLDIFS="$IFS"
31137    IFS=";"
31138    for i in $DEVKIT_VS_INCLUDE; do
31139      ipath=$i
31140
31141  unix_path="$ipath"
31142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31143    windows_path=`$CYGPATH -m "$unix_path"`
31144    ipath="$windows_path"
31145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31146    windows_path=`cmd //c echo $unix_path`
31147    ipath="$windows_path"
31148  fi
31149
31150      VS_INCLUDE="$VS_INCLUDE;$ipath"
31151    done
31152    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31153    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31154    for i in $DEVKIT_VS_LIB; do
31155      libpath=$i
31156
31157  unix_path="$libpath"
31158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31159    windows_path=`$CYGPATH -m "$unix_path"`
31160    libpath="$windows_path"
31161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31162    windows_path=`cmd //c echo $unix_path`
31163    libpath="$windows_path"
31164  fi
31165
31166      VS_LIB="$VS_LIB;$libpath"
31167    done
31168    IFS="$OLDIFS"
31169
31170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31171$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31172
31173  elif test "x$with_toolchain_version" != x; then
31174    # User override; check that it is valid
31175    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31176      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31177$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31178      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31179$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31180      as_fn_error $? "Cannot continue." "$LINENO" 5
31181    fi
31182    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31183  else
31184    # No flag given, use default
31185    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31186  fi
31187
31188  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31189
31190  VS_VERSION="$VS_VERSION"
31191  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31192  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31193  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31194  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31195
31196  # When using --with-tools-dir, assume it points to the correct and default
31197  # version of Visual Studio or that --with-toolchain-version was also set.
31198  if test "x$with_tools_dir" != x; then
31199
31200  if test "x$VS_ENV_CMD" = x; then
31201    VS_VERSION="${VS_VERSION}"
31202    VS_BASE="$with_tools_dir/../.."
31203    METHOD="--with-tools-dir"
31204
31205    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31206      VCVARSFILE="vc/bin/vcvars32.bat"
31207    else
31208      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31209    fi
31210
31211
31212  windows_path="$VS_BASE"
31213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31214    unix_path=`$CYGPATH -u "$windows_path"`
31215    VS_BASE="$unix_path"
31216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31218    VS_BASE="$unix_path"
31219  fi
31220
31221    if test -d "$VS_BASE"; then
31222      if test -f "$VS_BASE/$VCVARSFILE"; then
31223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31224$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31225        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31226        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31227        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31228        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31229      else
31230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31231$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31233$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31234      fi
31235    fi
31236  fi
31237
31238
31239  if test "x$VS_ENV_CMD" = x; then
31240    VS_VERSION="${VS_VERSION}"
31241    VS_BASE="$with_tools_dir/../../.."
31242    METHOD="--with-tools-dir"
31243
31244    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31245      VCVARSFILE="vc/bin/vcvars32.bat"
31246    else
31247      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31248    fi
31249
31250
31251  windows_path="$VS_BASE"
31252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31253    unix_path=`$CYGPATH -u "$windows_path"`
31254    VS_BASE="$unix_path"
31255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31257    VS_BASE="$unix_path"
31258  fi
31259
31260    if test -d "$VS_BASE"; then
31261      if test -f "$VS_BASE/$VCVARSFILE"; then
31262        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31263$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31264        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31265        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31266        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31267        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31268      else
31269        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31270$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31271        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31272$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31273      fi
31274    fi
31275  fi
31276
31277    if test "x$VS_ENV_CMD" = x; then
31278      # Having specified an argument which is incorrect will produce an instant failure;
31279      # we should not go on looking
31280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31281$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31282      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31283$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31284      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31285$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31286      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31287    fi
31288  fi
31289
31290  VS_ENV_CMD=""
31291  VS_ENV_ARGS=""
31292
31293  if test "x$VS_COMNTOOLS" != x; then
31294
31295  if test "x$VS_ENV_CMD" = x; then
31296    VS_VERSION="${VS_VERSION}"
31297    VS_BASE="$VS_COMNTOOLS/../.."
31298    METHOD="$VS_COMNTOOLS_VAR variable"
31299
31300    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31301      VCVARSFILE="vc/bin/vcvars32.bat"
31302    else
31303      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31304    fi
31305
31306
31307  windows_path="$VS_BASE"
31308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31309    unix_path=`$CYGPATH -u "$windows_path"`
31310    VS_BASE="$unix_path"
31311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31313    VS_BASE="$unix_path"
31314  fi
31315
31316    if test -d "$VS_BASE"; then
31317      if test -f "$VS_BASE/$VCVARSFILE"; then
31318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31319$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31320        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31321        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31322        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31323        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31324      else
31325        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31326$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31327        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31328$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31329      fi
31330    fi
31331  fi
31332
31333  fi
31334  if test "x$PROGRAMFILES" != x; then
31335
31336  if test "x$VS_ENV_CMD" = x; then
31337    VS_VERSION="${VS_VERSION}"
31338    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31339    METHOD="well-known name"
31340
31341    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31342      VCVARSFILE="vc/bin/vcvars32.bat"
31343    else
31344      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31345    fi
31346
31347
31348  windows_path="$VS_BASE"
31349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31350    unix_path=`$CYGPATH -u "$windows_path"`
31351    VS_BASE="$unix_path"
31352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31354    VS_BASE="$unix_path"
31355  fi
31356
31357    if test -d "$VS_BASE"; then
31358      if test -f "$VS_BASE/$VCVARSFILE"; then
31359        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31360$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31361        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31362        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31363        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31364        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31365      else
31366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31367$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31368        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31369$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31370      fi
31371    fi
31372  fi
31373
31374  fi
31375  # Work around the insanely named ProgramFiles(x86) env variable
31376  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31377  if test "x$PROGRAMFILES_X86" != x; then
31378
31379  if test "x$VS_ENV_CMD" = x; then
31380    VS_VERSION="${VS_VERSION}"
31381    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31382    METHOD="well-known name"
31383
31384    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31385      VCVARSFILE="vc/bin/vcvars32.bat"
31386    else
31387      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31388    fi
31389
31390
31391  windows_path="$VS_BASE"
31392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31393    unix_path=`$CYGPATH -u "$windows_path"`
31394    VS_BASE="$unix_path"
31395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31397    VS_BASE="$unix_path"
31398  fi
31399
31400    if test -d "$VS_BASE"; then
31401      if test -f "$VS_BASE/$VCVARSFILE"; then
31402        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31403$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31404        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31405        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31406        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31407        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31408      else
31409        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31410$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31411        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31412$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31413      fi
31414    fi
31415  fi
31416
31417  fi
31418
31419  if test "x$VS_ENV_CMD" = x; then
31420    VS_VERSION="${VS_VERSION}"
31421    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31422    METHOD="well-known name"
31423
31424    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31425      VCVARSFILE="vc/bin/vcvars32.bat"
31426    else
31427      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31428    fi
31429
31430
31431  windows_path="$VS_BASE"
31432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31433    unix_path=`$CYGPATH -u "$windows_path"`
31434    VS_BASE="$unix_path"
31435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31437    VS_BASE="$unix_path"
31438  fi
31439
31440    if test -d "$VS_BASE"; then
31441      if test -f "$VS_BASE/$VCVARSFILE"; then
31442        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31443$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31444        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31445        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31446        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31447        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31448      else
31449        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31450$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31451        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31452$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31453      fi
31454    fi
31455  fi
31456
31457
31458  if test "x$VS_ENV_CMD" = x; then
31459    VS_VERSION="${VS_VERSION}"
31460    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31461    METHOD="well-known name"
31462
31463    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31464      VCVARSFILE="vc/bin/vcvars32.bat"
31465    else
31466      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31467    fi
31468
31469
31470  windows_path="$VS_BASE"
31471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31472    unix_path=`$CYGPATH -u "$windows_path"`
31473    VS_BASE="$unix_path"
31474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31476    VS_BASE="$unix_path"
31477  fi
31478
31479    if test -d "$VS_BASE"; then
31480      if test -f "$VS_BASE/$VCVARSFILE"; then
31481        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31482$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31483        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31484        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31485        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31486        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31487      else
31488        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31489$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31490        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31491$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31492      fi
31493    fi
31494  fi
31495
31496
31497  if test "x$SDK_INSTALL_DIR" != x; then
31498    if test "x$ProgramW6432" != x; then
31499
31500  if test "x$VS_ENV_CMD" = x; then
31501    VS_VERSION="${VS_VERSION}"
31502    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31503    METHOD="well-known name"
31504
31505  windows_path="$WIN_SDK_BASE"
31506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31507    unix_path=`$CYGPATH -u "$windows_path"`
31508    WIN_SDK_BASE="$unix_path"
31509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31511    WIN_SDK_BASE="$unix_path"
31512  fi
31513
31514    if test -d "$WIN_SDK_BASE"; then
31515      # There have been cases of partial or broken SDK installations. A missing
31516      # lib dir is not going to work.
31517      if test ! -d "$WIN_SDK_BASE/lib"; then
31518        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31519$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31520        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31521$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31522      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31523        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31524$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31525        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31526        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31527          VS_ENV_ARGS="/x86"
31528        else
31529          VS_ENV_ARGS="/x64"
31530        fi
31531        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31532        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31533        # TODO: improve detection for other versions of SDK
31534        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31535      else
31536        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31537$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31538        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31539$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31540      fi
31541    fi
31542  fi
31543
31544    fi
31545    if test "x$PROGRAMW6432" != x; then
31546
31547  if test "x$VS_ENV_CMD" = x; then
31548    VS_VERSION="${VS_VERSION}"
31549    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31550    METHOD="well-known name"
31551
31552  windows_path="$WIN_SDK_BASE"
31553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31554    unix_path=`$CYGPATH -u "$windows_path"`
31555    WIN_SDK_BASE="$unix_path"
31556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31558    WIN_SDK_BASE="$unix_path"
31559  fi
31560
31561    if test -d "$WIN_SDK_BASE"; then
31562      # There have been cases of partial or broken SDK installations. A missing
31563      # lib dir is not going to work.
31564      if test ! -d "$WIN_SDK_BASE/lib"; then
31565        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31566$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31567        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31568$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31569      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31570        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31571$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31572        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31573        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31574          VS_ENV_ARGS="/x86"
31575        else
31576          VS_ENV_ARGS="/x64"
31577        fi
31578        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31579        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31580        # TODO: improve detection for other versions of SDK
31581        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31582      else
31583        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31584$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31585        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31586$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31587      fi
31588    fi
31589  fi
31590
31591    fi
31592    if test "x$PROGRAMFILES" != x; then
31593
31594  if test "x$VS_ENV_CMD" = x; then
31595    VS_VERSION="${VS_VERSION}"
31596    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31597    METHOD="well-known name"
31598
31599  windows_path="$WIN_SDK_BASE"
31600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31601    unix_path=`$CYGPATH -u "$windows_path"`
31602    WIN_SDK_BASE="$unix_path"
31603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31605    WIN_SDK_BASE="$unix_path"
31606  fi
31607
31608    if test -d "$WIN_SDK_BASE"; then
31609      # There have been cases of partial or broken SDK installations. A missing
31610      # lib dir is not going to work.
31611      if test ! -d "$WIN_SDK_BASE/lib"; then
31612        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31613$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31614        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31615$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31616      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31617        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31618$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31619        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31620        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31621          VS_ENV_ARGS="/x86"
31622        else
31623          VS_ENV_ARGS="/x64"
31624        fi
31625        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31626        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31627        # TODO: improve detection for other versions of SDK
31628        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31629      else
31630        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31631$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31632        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31633$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31634      fi
31635    fi
31636  fi
31637
31638    fi
31639
31640  if test "x$VS_ENV_CMD" = x; then
31641    VS_VERSION="${VS_VERSION}"
31642    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31643    METHOD="well-known name"
31644
31645  windows_path="$WIN_SDK_BASE"
31646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31647    unix_path=`$CYGPATH -u "$windows_path"`
31648    WIN_SDK_BASE="$unix_path"
31649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31651    WIN_SDK_BASE="$unix_path"
31652  fi
31653
31654    if test -d "$WIN_SDK_BASE"; then
31655      # There have been cases of partial or broken SDK installations. A missing
31656      # lib dir is not going to work.
31657      if test ! -d "$WIN_SDK_BASE/lib"; then
31658        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31659$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31660        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31661$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31662      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31663        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31664$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31665        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31666        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31667          VS_ENV_ARGS="/x86"
31668        else
31669          VS_ENV_ARGS="/x64"
31670        fi
31671        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31672        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31673        # TODO: improve detection for other versions of SDK
31674        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31675      else
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31677$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31678        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31679$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31680      fi
31681    fi
31682  fi
31683
31684
31685  if test "x$VS_ENV_CMD" = x; then
31686    VS_VERSION="${VS_VERSION}"
31687    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31688    METHOD="well-known name"
31689
31690  windows_path="$WIN_SDK_BASE"
31691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31692    unix_path=`$CYGPATH -u "$windows_path"`
31693    WIN_SDK_BASE="$unix_path"
31694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31696    WIN_SDK_BASE="$unix_path"
31697  fi
31698
31699    if test -d "$WIN_SDK_BASE"; then
31700      # There have been cases of partial or broken SDK installations. A missing
31701      # lib dir is not going to work.
31702      if test ! -d "$WIN_SDK_BASE/lib"; then
31703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31706$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31707      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31709$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31710        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31711        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31712          VS_ENV_ARGS="/x86"
31713        else
31714          VS_ENV_ARGS="/x64"
31715        fi
31716        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31717        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31718        # TODO: improve detection for other versions of SDK
31719        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31720      else
31721        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31722$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31723        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31724$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31725      fi
31726    fi
31727  fi
31728
31729  fi
31730
31731    if test "x$VS_ENV_CMD" != x; then
31732      TOOLCHAIN_VERSION=$VS_VERSION
31733      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31734      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31735      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31736      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31737      # The rest of the variables are already evaled while probing
31738      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31739$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31740      break
31741    fi
31742  done
31743
31744
31745  # If we have a devkit, skip all of the below.
31746  if test "x$DEVKIT_VS_VERSION" = x; then
31747    if test "x$VS_ENV_CMD" != x; then
31748      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31749
31750  # Only process if variable expands to non-empty
31751
31752  if test "x$VS_ENV_CMD" != x; then
31753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31754
31755  # First separate the path from the arguments. This will split at the first
31756  # space.
31757  complete="$VS_ENV_CMD"
31758  path="${complete%% *}"
31759  tmp="$complete EOL"
31760  arguments="${tmp#* }"
31761
31762  # Input might be given as Windows format, start by converting to
31763  # unix format.
31764  new_path=`$CYGPATH -u "$path"`
31765
31766  # Now try to locate executable using which
31767  new_path=`$WHICH "$new_path" 2> /dev/null`
31768  # bat and cmd files are not always considered executable in cygwin causing which
31769  # to not find them
31770  if test "x$new_path" = x \
31771      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31772      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31773    new_path=`$CYGPATH -u "$path"`
31774  fi
31775  if test "x$new_path" = x; then
31776    # Oops. Which didn't find the executable.
31777    # The splitting of arguments from the executable at a space might have been incorrect,
31778    # since paths with space are more likely in Windows. Give it another try with the whole
31779    # argument.
31780    path="$complete"
31781    arguments="EOL"
31782    new_path=`$CYGPATH -u "$path"`
31783    new_path=`$WHICH "$new_path" 2> /dev/null`
31784    # bat and cmd files are not always considered executable in cygwin causing which
31785    # to not find them
31786    if test "x$new_path" = x \
31787        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31788        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31789      new_path=`$CYGPATH -u "$path"`
31790    fi
31791    if test "x$new_path" = x; then
31792      # It's still not found. Now this is an unrecoverable error.
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31794$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31795      has_space=`$ECHO "$complete" | $GREP " "`
31796      if test "x$has_space" != x; then
31797        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31798$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31799      fi
31800      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31801    fi
31802  fi
31803
31804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31807  # "foo.exe" is OK but "foo" is an error.
31808  #
31809  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31810  # It is also a way to make sure we got the proper file name for the real test later on.
31811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31812  if test "x$test_shortpath" = x; then
31813    # Short path failed, file does not exist as specified.
31814    # Try adding .exe or .cmd
31815    if test -f "${new_path}.exe"; then
31816      input_to_shortpath="${new_path}.exe"
31817    elif test -f "${new_path}.cmd"; then
31818      input_to_shortpath="${new_path}.cmd"
31819    else
31820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31821$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31822      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31823$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31824      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31825    fi
31826  else
31827    input_to_shortpath="$new_path"
31828  fi
31829
31830  # Call helper function which possibly converts this using DOS-style short mode.
31831  # If so, the updated path is stored in $new_path.
31832  new_path="$input_to_shortpath"
31833
31834  input_path="$input_to_shortpath"
31835  # Check if we need to convert this using DOS-style short mode. If the path
31836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31837  # take no chances and rewrite it.
31838  # Note: m4 eats our [], so we need to use [ and ] instead.
31839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31840  if test "x$has_forbidden_chars" != x; then
31841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31845      # Going to short mode and back again did indeed matter. Since short mode is
31846      # case insensitive, let's make it lowercase to improve readability.
31847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31848      # Now convert it back to Unix-style (cygpath)
31849      input_path=`$CYGPATH -u "$shortmode_path"`
31850      new_path="$input_path"
31851    fi
31852  fi
31853
31854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31855  if test "x$test_cygdrive_prefix" = x; then
31856    # As a simple fix, exclude /usr/bin since it's not a real path.
31857    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31859      # a path prefixed by /cygdrive for fixpath to work.
31860      new_path="$CYGWIN_ROOT_PATH$input_path"
31861    fi
31862  fi
31863
31864  # remove trailing .exe if any
31865  new_path="${new_path/%.exe/}"
31866
31867    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31868
31869  # First separate the path from the arguments. This will split at the first
31870  # space.
31871  complete="$VS_ENV_CMD"
31872  path="${complete%% *}"
31873  tmp="$complete EOL"
31874  arguments="${tmp#* }"
31875
31876  # Input might be given as Windows format, start by converting to
31877  # unix format.
31878  new_path="$path"
31879
31880  windows_path="$new_path"
31881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31882    unix_path=`$CYGPATH -u "$windows_path"`
31883    new_path="$unix_path"
31884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31886    new_path="$unix_path"
31887  fi
31888
31889
31890  # Now try to locate executable using which
31891  new_path=`$WHICH "$new_path" 2> /dev/null`
31892
31893  if test "x$new_path" = x; then
31894    # Oops. Which didn't find the executable.
31895    # The splitting of arguments from the executable at a space might have been incorrect,
31896    # since paths with space are more likely in Windows. Give it another try with the whole
31897    # argument.
31898    path="$complete"
31899    arguments="EOL"
31900    new_path="$path"
31901
31902  windows_path="$new_path"
31903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31904    unix_path=`$CYGPATH -u "$windows_path"`
31905    new_path="$unix_path"
31906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31908    new_path="$unix_path"
31909  fi
31910
31911
31912    new_path=`$WHICH "$new_path" 2> /dev/null`
31913    # bat and cmd files are not always considered executable in MSYS causing which
31914    # to not find them
31915    if test "x$new_path" = x \
31916        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31917        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31918      new_path="$path"
31919
31920  windows_path="$new_path"
31921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31922    unix_path=`$CYGPATH -u "$windows_path"`
31923    new_path="$unix_path"
31924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31926    new_path="$unix_path"
31927  fi
31928
31929    fi
31930
31931    if test "x$new_path" = x; then
31932      # It's still not found. Now this is an unrecoverable error.
31933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31934$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31935      has_space=`$ECHO "$complete" | $GREP " "`
31936      if test "x$has_space" != x; then
31937        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31938$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31939      fi
31940      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31941    fi
31942  fi
31943
31944  # Now new_path has a complete unix path to the binary
31945  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31946    # Keep paths in /bin as-is, but remove trailing .exe if any
31947    new_path="${new_path/%.exe/}"
31948    # Do not save /bin paths to all_fixpath_prefixes!
31949  else
31950    # Not in mixed or Windows style, start by that.
31951    new_path=`cmd //c echo $new_path`
31952
31953  input_path="$new_path"
31954  # Check if we need to convert this using DOS-style short mode. If the path
31955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31956  # take no chances and rewrite it.
31957  # Note: m4 eats our [], so we need to use [ and ] instead.
31958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31959  if test "x$has_forbidden_chars" != x; then
31960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31962  fi
31963
31964    # Output is in $new_path
31965
31966  windows_path="$new_path"
31967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31968    unix_path=`$CYGPATH -u "$windows_path"`
31969    new_path="$unix_path"
31970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31972    new_path="$unix_path"
31973  fi
31974
31975    # remove trailing .exe if any
31976    new_path="${new_path/%.exe/}"
31977
31978    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31979    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31980  fi
31981
31982    else
31983      # We're on a unix platform. Hooray! :)
31984      # First separate the path from the arguments. This will split at the first
31985      # space.
31986      complete="$VS_ENV_CMD"
31987      path="${complete%% *}"
31988      tmp="$complete EOL"
31989      arguments="${tmp#* }"
31990
31991      # Cannot rely on the command "which" here since it doesn't always work.
31992      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31993      if test -z "$is_absolute_path"; then
31994        # Path to executable is not absolute. Find it.
31995        IFS_save="$IFS"
31996        IFS=:
31997        for p in $PATH; do
31998          if test -f "$p/$path" && test -x "$p/$path"; then
31999            new_path="$p/$path"
32000            break
32001          fi
32002        done
32003        IFS="$IFS_save"
32004      else
32005        # This is an absolute path, we can use it without further modifications.
32006        new_path="$path"
32007      fi
32008
32009      if test "x$new_path" = x; then
32010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32011$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32012        has_space=`$ECHO "$complete" | $GREP " "`
32013        if test "x$has_space" != x; then
32014          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32015$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32016        fi
32017        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32018      fi
32019    fi
32020
32021    # Now join together the path and the arguments once again
32022    if test "x$arguments" != xEOL; then
32023      new_complete="$new_path ${arguments% *}"
32024    else
32025      new_complete="$new_path"
32026    fi
32027
32028    if test "x$complete" != "x$new_complete"; then
32029      VS_ENV_CMD="$new_complete"
32030      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32031$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32032    fi
32033  fi
32034
32035
32036      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32037      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32038$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32039
32040      # We need to create a couple of temporary files.
32041      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32042      $MKDIR -p $VS_ENV_TMP_DIR
32043
32044      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32045      # Instead create a shell script which will set the relevant variables when run.
32046      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32047
32048  unix_path="$WINPATH_VS_ENV_CMD"
32049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32050    windows_path=`$CYGPATH -m "$unix_path"`
32051    WINPATH_VS_ENV_CMD="$windows_path"
32052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32053    windows_path=`cmd //c echo $unix_path`
32054    WINPATH_VS_ENV_CMD="$windows_path"
32055  fi
32056
32057      WINPATH_BASH="$BASH"
32058
32059  unix_path="$WINPATH_BASH"
32060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32061    windows_path=`$CYGPATH -m "$unix_path"`
32062    WINPATH_BASH="$windows_path"
32063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32064    windows_path=`cmd //c echo $unix_path`
32065    WINPATH_BASH="$windows_path"
32066  fi
32067
32068
32069      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32070      # script (executable by bash) that will setup the important variables.
32071      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32072      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32073      # This will end up something like:
32074      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32075      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32076      # These will end up something like:
32077      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32078      # The trailing space for everyone except PATH is no typo, but is needed due
32079      # to trailing \ in the Windows paths. These will be stripped later.
32080      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32081          >> $EXTRACT_VC_ENV_BAT_FILE
32082      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32083          >> $EXTRACT_VC_ENV_BAT_FILE
32084      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32085          >> $EXTRACT_VC_ENV_BAT_FILE
32086      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32087          >> $EXTRACT_VC_ENV_BAT_FILE
32088      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32089          >> $EXTRACT_VC_ENV_BAT_FILE
32090      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32091          >> $EXTRACT_VC_ENV_BAT_FILE
32092
32093      # Now execute the newly created bat file.
32094      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32095      # Change directory so we don't need to mess with Windows paths in redirects.
32096      cd $VS_ENV_TMP_DIR
32097      cmd /c extract-vs-env.bat | $CAT
32098      cd $CURDIR
32099
32100      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32101        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32102$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
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      # Now set all paths and other env variables. This will allow the rest of
32111      # the configure script to find and run the compiler in the proper way.
32112      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32113$as_echo "$as_me: Setting extracted environment variables" >&6;}
32114      . $VS_ENV_TMP_DIR/set-vs-env.sh
32115      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32116      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32117    else
32118      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32119      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32120$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32121    fi
32122  fi
32123
32124  # At this point, we should have correct variables in the environment, or we can't continue.
32125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32126$as_echo_n "checking for Visual Studio variables... " >&6; }
32127
32128  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32129      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32130    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32132$as_echo "present but broken" >&6; }
32133      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32134    else
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32136$as_echo "ok" >&6; }
32137      # Remove any trailing "\" ";" and " " from the variables.
32138      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32139      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32140      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32141      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32142      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32143      # Remove any paths containing # (typically F#) as that messes up make. This
32144      # is needed if visual studio was installed with F# support.
32145      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32146
32147
32148
32149
32150
32151      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32152      OLDIFS="$IFS"
32153      IFS=";"
32154      for i in $VS_INCLUDE; do
32155        ipath=$i
32156        # Only process non-empty elements
32157        if test "x$ipath" != x; then
32158          IFS="$OLDIFS"
32159          # Check that directory exists before calling fixup_path
32160          testpath=$ipath
32161
32162  windows_path="$testpath"
32163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32164    unix_path=`$CYGPATH -u "$windows_path"`
32165    testpath="$unix_path"
32166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32168    testpath="$unix_path"
32169  fi
32170
32171          if test -d "$testpath"; then
32172
32173  # Only process if variable expands to non-empty
32174
32175  if test "x$ipath" != x; then
32176    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32177
32178  # Input might be given as Windows format, start by converting to
32179  # unix format.
32180  path="$ipath"
32181  new_path=`$CYGPATH -u "$path"`
32182
32183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32186  # "foo.exe" is OK but "foo" is an error.
32187  #
32188  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32189  # It is also a way to make sure we got the proper file name for the real test later on.
32190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32191  if test "x$test_shortpath" = x; then
32192    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32193$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32194    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32195  fi
32196
32197  # Call helper function which possibly converts this using DOS-style short mode.
32198  # If so, the updated path is stored in $new_path.
32199
32200  input_path="$new_path"
32201  # Check if we need to convert this using DOS-style short mode. If the path
32202  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32203  # take no chances and rewrite it.
32204  # Note: m4 eats our [], so we need to use [ and ] instead.
32205  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32206  if test "x$has_forbidden_chars" != x; then
32207    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32208    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32209    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32210    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32211      # Going to short mode and back again did indeed matter. Since short mode is
32212      # case insensitive, let's make it lowercase to improve readability.
32213      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32214      # Now convert it back to Unix-style (cygpath)
32215      input_path=`$CYGPATH -u "$shortmode_path"`
32216      new_path="$input_path"
32217    fi
32218  fi
32219
32220  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32221  if test "x$test_cygdrive_prefix" = x; then
32222    # As a simple fix, exclude /usr/bin since it's not a real path.
32223    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32224      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32225      # a path prefixed by /cygdrive for fixpath to work.
32226      new_path="$CYGWIN_ROOT_PATH$input_path"
32227    fi
32228  fi
32229
32230
32231  if test "x$path" != "x$new_path"; then
32232    ipath="$new_path"
32233    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32234$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32235  fi
32236
32237    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32238
32239  path="$ipath"
32240  has_colon=`$ECHO $path | $GREP ^.:`
32241  new_path="$path"
32242  if test "x$has_colon" = x; then
32243    # Not in mixed or Windows style, start by that.
32244    new_path=`cmd //c echo $path`
32245  fi
32246
32247
32248  input_path="$new_path"
32249  # Check if we need to convert this using DOS-style short mode. If the path
32250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32251  # take no chances and rewrite it.
32252  # Note: m4 eats our [], so we need to use [ and ] instead.
32253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32254  if test "x$has_forbidden_chars" != x; then
32255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32256    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32257  fi
32258
32259
32260  windows_path="$new_path"
32261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32262    unix_path=`$CYGPATH -u "$windows_path"`
32263    new_path="$unix_path"
32264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32266    new_path="$unix_path"
32267  fi
32268
32269  if test "x$path" != "x$new_path"; then
32270    ipath="$new_path"
32271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32272$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32273  fi
32274
32275  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32276  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32277
32278    else
32279      # We're on a unix platform. Hooray! :)
32280      path="$ipath"
32281      has_space=`$ECHO "$path" | $GREP " "`
32282      if test "x$has_space" != x; then
32283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32284$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32285        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32286      fi
32287
32288      # Use eval to expand a potential ~
32289      eval path="$path"
32290      if test ! -f "$path" && test ! -d "$path"; then
32291        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32292      fi
32293
32294      if test -d "$path"; then
32295        ipath="`cd "$path"; $THEPWDCMD -L`"
32296      else
32297        dir="`$DIRNAME "$path"`"
32298        base="`$BASENAME "$path"`"
32299        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32300      fi
32301    fi
32302  fi
32303
32304            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32305          fi
32306          IFS=";"
32307        fi
32308      done
32309      # Convert VS_LIB into SYSROOT_LDFLAGS
32310      for i in $VS_LIB; do
32311        libpath=$i
32312        # Only process non-empty elements
32313        if test "x$libpath" != x; then
32314          IFS="$OLDIFS"
32315          # Check that directory exists before calling fixup_path
32316          testpath=$libpath
32317
32318  windows_path="$testpath"
32319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32320    unix_path=`$CYGPATH -u "$windows_path"`
32321    testpath="$unix_path"
32322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32324    testpath="$unix_path"
32325  fi
32326
32327          if test -d "$testpath"; then
32328
32329  # Only process if variable expands to non-empty
32330
32331  if test "x$libpath" != x; then
32332    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32333
32334  # Input might be given as Windows format, start by converting to
32335  # unix format.
32336  path="$libpath"
32337  new_path=`$CYGPATH -u "$path"`
32338
32339  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32340  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32341  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32342  # "foo.exe" is OK but "foo" is an error.
32343  #
32344  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32345  # It is also a way to make sure we got the proper file name for the real test later on.
32346  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32347  if test "x$test_shortpath" = x; then
32348    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32349$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32350    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32351  fi
32352
32353  # Call helper function which possibly converts this using DOS-style short mode.
32354  # If so, the updated path is stored in $new_path.
32355
32356  input_path="$new_path"
32357  # Check if we need to convert this using DOS-style short mode. If the path
32358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32359  # take no chances and rewrite it.
32360  # Note: m4 eats our [], so we need to use [ and ] instead.
32361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32362  if test "x$has_forbidden_chars" != x; then
32363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32367      # Going to short mode and back again did indeed matter. Since short mode is
32368      # case insensitive, let's make it lowercase to improve readability.
32369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32370      # Now convert it back to Unix-style (cygpath)
32371      input_path=`$CYGPATH -u "$shortmode_path"`
32372      new_path="$input_path"
32373    fi
32374  fi
32375
32376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32377  if test "x$test_cygdrive_prefix" = x; then
32378    # As a simple fix, exclude /usr/bin since it's not a real path.
32379    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32381      # a path prefixed by /cygdrive for fixpath to work.
32382      new_path="$CYGWIN_ROOT_PATH$input_path"
32383    fi
32384  fi
32385
32386
32387  if test "x$path" != "x$new_path"; then
32388    libpath="$new_path"
32389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32390$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32391  fi
32392
32393    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32394
32395  path="$libpath"
32396  has_colon=`$ECHO $path | $GREP ^.:`
32397  new_path="$path"
32398  if test "x$has_colon" = x; then
32399    # Not in mixed or Windows style, start by that.
32400    new_path=`cmd //c echo $path`
32401  fi
32402
32403
32404  input_path="$new_path"
32405  # Check if we need to convert this using DOS-style short mode. If the path
32406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32407  # take no chances and rewrite it.
32408  # Note: m4 eats our [], so we need to use [ and ] instead.
32409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32410  if test "x$has_forbidden_chars" != x; then
32411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32413  fi
32414
32415
32416  windows_path="$new_path"
32417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32418    unix_path=`$CYGPATH -u "$windows_path"`
32419    new_path="$unix_path"
32420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32422    new_path="$unix_path"
32423  fi
32424
32425  if test "x$path" != "x$new_path"; then
32426    libpath="$new_path"
32427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32428$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32429  fi
32430
32431  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32432  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32433
32434    else
32435      # We're on a unix platform. Hooray! :)
32436      path="$libpath"
32437      has_space=`$ECHO "$path" | $GREP " "`
32438      if test "x$has_space" != x; then
32439        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32440$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32441        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32442      fi
32443
32444      # Use eval to expand a potential ~
32445      eval path="$path"
32446      if test ! -f "$path" && test ! -d "$path"; then
32447        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32448      fi
32449
32450      if test -d "$path"; then
32451        libpath="`cd "$path"; $THEPWDCMD -L`"
32452      else
32453        dir="`$DIRNAME "$path"`"
32454        base="`$BASENAME "$path"`"
32455        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32456      fi
32457    fi
32458  fi
32459
32460            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32461          fi
32462          IFS=";"
32463        fi
32464      done
32465      IFS="$OLDIFS"
32466    fi
32467  else
32468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32469$as_echo "not found" >&6; }
32470
32471    if test "x$VS_ENV_CMD" = x; then
32472      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32473$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32474      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32475$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32476    else
32477      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32478$as_echo "$as_me: Running the extraction script failed." >&6;}
32479    fi
32480    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32481$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32482    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32483$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32484    as_fn_error $? "Cannot continue" "$LINENO" 5
32485  fi
32486
32487    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32488    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32489    PATH="$VS_PATH"
32490    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32491    export INCLUDE="$VS_INCLUDE"
32492    export LIB="$VS_LIB"
32493  else
32494    if test "x$XCODE_VERSION_OUTPUT" != x; then
32495      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32496      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32497      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32498    else
32499      # Currently we do not define this for other toolchains. This might change as the need arise.
32500      TOOLCHAIN_VERSION=
32501    fi
32502  fi
32503
32504
32505  # For solaris we really need solaris tools, and not the GNU equivalent.
32506  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32507  # so add that to path before starting to probe.
32508  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32509  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32510    PATH="/usr/ccs/bin:$PATH"
32511  fi
32512
32513  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32514  # override all other locations.
32515  if test "x$TOOLCHAIN_PATH" != x; then
32516    PATH=$TOOLCHAIN_PATH:$PATH
32517  fi
32518
32519
32520  #
32521  # Setup the compilers (CC and CXX)
32522  #
32523
32524  COMPILER_NAME=C
32525  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32526
32527  if test "x$CC" != x; then
32528    # User has supplied compiler name already, always let that override.
32529    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32530$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32531    if test "x`basename $CC`" = "x$CC"; then
32532      # A command without a complete path is provided, search $PATH.
32533
32534      for ac_prog in $CC
32535do
32536  # Extract the first word of "$ac_prog", so it can be a program name with args.
32537set dummy $ac_prog; ac_word=$2
32538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32539$as_echo_n "checking for $ac_word... " >&6; }
32540if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32541  $as_echo_n "(cached) " >&6
32542else
32543  case $POTENTIAL_CC in
32544  [\\/]* | ?:[\\/]*)
32545  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32546  ;;
32547  *)
32548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32549for as_dir in $PATH
32550do
32551  IFS=$as_save_IFS
32552  test -z "$as_dir" && as_dir=.
32553    for ac_exec_ext in '' $ac_executable_extensions; do
32554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32555    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32557    break 2
32558  fi
32559done
32560  done
32561IFS=$as_save_IFS
32562
32563  ;;
32564esac
32565fi
32566POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32567if test -n "$POTENTIAL_CC"; then
32568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32569$as_echo "$POTENTIAL_CC" >&6; }
32570else
32571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32572$as_echo "no" >&6; }
32573fi
32574
32575
32576  test -n "$POTENTIAL_CC" && break
32577done
32578
32579      if test "x$POTENTIAL_CC" != x; then
32580        CC=$POTENTIAL_CC
32581      else
32582        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32583      fi
32584    else
32585      # Otherwise it might already be a complete path
32586      if test ! -x "$CC"; then
32587        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32588      fi
32589    fi
32590  else
32591    # No user supplied value. Locate compiler ourselves.
32592
32593    # If we are cross compiling, assume cross compilation tools follows the
32594    # cross compilation standard where they are prefixed with the autoconf
32595    # standard name for the target. For example the binary
32596    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32597    # If we are not cross compiling, then the default compiler name will be
32598    # used.
32599
32600    CC=
32601    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32602    # before checking the rest of the PATH.
32603    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32604    # step, this should not be necessary.
32605    if test -n "$TOOLCHAIN_PATH"; then
32606      PATH_save="$PATH"
32607      PATH="$TOOLCHAIN_PATH"
32608      for ac_prog in $SEARCH_LIST
32609do
32610  # Extract the first word of "$ac_prog", so it can be a program name with args.
32611set dummy $ac_prog; ac_word=$2
32612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32613$as_echo_n "checking for $ac_word... " >&6; }
32614if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32615  $as_echo_n "(cached) " >&6
32616else
32617  case $TOOLCHAIN_PATH_CC in
32618  [\\/]* | ?:[\\/]*)
32619  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32620  ;;
32621  *)
32622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32623for as_dir in $PATH
32624do
32625  IFS=$as_save_IFS
32626  test -z "$as_dir" && as_dir=.
32627    for ac_exec_ext in '' $ac_executable_extensions; do
32628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32629    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32631    break 2
32632  fi
32633done
32634  done
32635IFS=$as_save_IFS
32636
32637  ;;
32638esac
32639fi
32640TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32641if test -n "$TOOLCHAIN_PATH_CC"; then
32642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32643$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32644else
32645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32646$as_echo "no" >&6; }
32647fi
32648
32649
32650  test -n "$TOOLCHAIN_PATH_CC" && break
32651done
32652
32653      CC=$TOOLCHAIN_PATH_CC
32654      PATH="$PATH_save"
32655    fi
32656
32657    # AC_PATH_PROGS can't be run multiple times with the same variable,
32658    # so create a new name for this run.
32659    if test "x$CC" = x; then
32660      for ac_prog in $SEARCH_LIST
32661do
32662  # Extract the first word of "$ac_prog", so it can be a program name with args.
32663set dummy $ac_prog; ac_word=$2
32664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32665$as_echo_n "checking for $ac_word... " >&6; }
32666if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32667  $as_echo_n "(cached) " >&6
32668else
32669  case $POTENTIAL_CC in
32670  [\\/]* | ?:[\\/]*)
32671  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32672  ;;
32673  *)
32674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32675for as_dir in $PATH
32676do
32677  IFS=$as_save_IFS
32678  test -z "$as_dir" && as_dir=.
32679    for ac_exec_ext in '' $ac_executable_extensions; do
32680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32681    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32683    break 2
32684  fi
32685done
32686  done
32687IFS=$as_save_IFS
32688
32689  ;;
32690esac
32691fi
32692POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32693if test -n "$POTENTIAL_CC"; then
32694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32695$as_echo "$POTENTIAL_CC" >&6; }
32696else
32697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32698$as_echo "no" >&6; }
32699fi
32700
32701
32702  test -n "$POTENTIAL_CC" && break
32703done
32704
32705      CC=$POTENTIAL_CC
32706    fi
32707
32708    if test "x$CC" = x; then
32709
32710  # Print a helpful message on how to acquire the necessary build dependency.
32711  # devkit is the help tag: freetype, cups, alsa etc
32712  MISSING_DEPENDENCY=devkit
32713
32714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32715    cygwin_help $MISSING_DEPENDENCY
32716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32717    msys_help $MISSING_DEPENDENCY
32718  else
32719    PKGHANDLER_COMMAND=
32720
32721    case $PKGHANDLER in
32722      apt-get)
32723        apt_help     $MISSING_DEPENDENCY ;;
32724      yum)
32725        yum_help     $MISSING_DEPENDENCY ;;
32726      port)
32727        port_help    $MISSING_DEPENDENCY ;;
32728      pkgutil)
32729        pkgutil_help $MISSING_DEPENDENCY ;;
32730      pkgadd)
32731        pkgadd_help  $MISSING_DEPENDENCY ;;
32732    esac
32733
32734    if test "x$PKGHANDLER_COMMAND" != x; then
32735      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32736    fi
32737  fi
32738
32739      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32740    fi
32741  fi
32742
32743  # Now we have a compiler binary in CC. Make sure it's okay.
32744
32745  # Only process if variable expands to non-empty
32746
32747  if test "x$CC" != x; then
32748    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32749
32750  # First separate the path from the arguments. This will split at the first
32751  # space.
32752  complete="$CC"
32753  path="${complete%% *}"
32754  tmp="$complete EOL"
32755  arguments="${tmp#* }"
32756
32757  # Input might be given as Windows format, start by converting to
32758  # unix format.
32759  new_path=`$CYGPATH -u "$path"`
32760
32761  # Now try to locate executable using which
32762  new_path=`$WHICH "$new_path" 2> /dev/null`
32763  # bat and cmd files are not always considered executable in cygwin causing which
32764  # to not find them
32765  if test "x$new_path" = x \
32766      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32767      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32768    new_path=`$CYGPATH -u "$path"`
32769  fi
32770  if test "x$new_path" = x; then
32771    # Oops. Which didn't find the executable.
32772    # The splitting of arguments from the executable at a space might have been incorrect,
32773    # since paths with space are more likely in Windows. Give it another try with the whole
32774    # argument.
32775    path="$complete"
32776    arguments="EOL"
32777    new_path=`$CYGPATH -u "$path"`
32778    new_path=`$WHICH "$new_path" 2> /dev/null`
32779    # bat and cmd files are not always considered executable in cygwin causing which
32780    # to not find them
32781    if test "x$new_path" = x \
32782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32784      new_path=`$CYGPATH -u "$path"`
32785    fi
32786    if test "x$new_path" = x; then
32787      # It's still not found. Now this is an unrecoverable error.
32788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32789$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32790      has_space=`$ECHO "$complete" | $GREP " "`
32791      if test "x$has_space" != x; then
32792        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32793$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32794      fi
32795      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32796    fi
32797  fi
32798
32799  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32800  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32801  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32802  # "foo.exe" is OK but "foo" is an error.
32803  #
32804  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32805  # It is also a way to make sure we got the proper file name for the real test later on.
32806  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32807  if test "x$test_shortpath" = x; then
32808    # Short path failed, file does not exist as specified.
32809    # Try adding .exe or .cmd
32810    if test -f "${new_path}.exe"; then
32811      input_to_shortpath="${new_path}.exe"
32812    elif test -f "${new_path}.cmd"; then
32813      input_to_shortpath="${new_path}.cmd"
32814    else
32815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32816$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32817      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32818$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32819      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32820    fi
32821  else
32822    input_to_shortpath="$new_path"
32823  fi
32824
32825  # Call helper function which possibly converts this using DOS-style short mode.
32826  # If so, the updated path is stored in $new_path.
32827  new_path="$input_to_shortpath"
32828
32829  input_path="$input_to_shortpath"
32830  # Check if we need to convert this using DOS-style short mode. If the path
32831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32832  # take no chances and rewrite it.
32833  # Note: m4 eats our [], so we need to use [ and ] instead.
32834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32835  if test "x$has_forbidden_chars" != x; then
32836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32837    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32838    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32839    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32840      # Going to short mode and back again did indeed matter. Since short mode is
32841      # case insensitive, let's make it lowercase to improve readability.
32842      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32843      # Now convert it back to Unix-style (cygpath)
32844      input_path=`$CYGPATH -u "$shortmode_path"`
32845      new_path="$input_path"
32846    fi
32847  fi
32848
32849  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32850  if test "x$test_cygdrive_prefix" = x; then
32851    # As a simple fix, exclude /usr/bin since it's not a real path.
32852    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32853      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32854      # a path prefixed by /cygdrive for fixpath to work.
32855      new_path="$CYGWIN_ROOT_PATH$input_path"
32856    fi
32857  fi
32858
32859  # remove trailing .exe if any
32860  new_path="${new_path/%.exe/}"
32861
32862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32863
32864  # First separate the path from the arguments. This will split at the first
32865  # space.
32866  complete="$CC"
32867  path="${complete%% *}"
32868  tmp="$complete EOL"
32869  arguments="${tmp#* }"
32870
32871  # Input might be given as Windows format, start by converting to
32872  # unix format.
32873  new_path="$path"
32874
32875  windows_path="$new_path"
32876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32877    unix_path=`$CYGPATH -u "$windows_path"`
32878    new_path="$unix_path"
32879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32881    new_path="$unix_path"
32882  fi
32883
32884
32885  # Now try to locate executable using which
32886  new_path=`$WHICH "$new_path" 2> /dev/null`
32887
32888  if test "x$new_path" = x; then
32889    # Oops. Which didn't find the executable.
32890    # The splitting of arguments from the executable at a space might have been incorrect,
32891    # since paths with space are more likely in Windows. Give it another try with the whole
32892    # argument.
32893    path="$complete"
32894    arguments="EOL"
32895    new_path="$path"
32896
32897  windows_path="$new_path"
32898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32899    unix_path=`$CYGPATH -u "$windows_path"`
32900    new_path="$unix_path"
32901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32903    new_path="$unix_path"
32904  fi
32905
32906
32907    new_path=`$WHICH "$new_path" 2> /dev/null`
32908    # bat and cmd files are not always considered executable in MSYS causing which
32909    # to not find them
32910    if test "x$new_path" = x \
32911        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32912        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32913      new_path="$path"
32914
32915  windows_path="$new_path"
32916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32917    unix_path=`$CYGPATH -u "$windows_path"`
32918    new_path="$unix_path"
32919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32921    new_path="$unix_path"
32922  fi
32923
32924    fi
32925
32926    if test "x$new_path" = x; then
32927      # It's still not found. Now this is an unrecoverable error.
32928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32929$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32930      has_space=`$ECHO "$complete" | $GREP " "`
32931      if test "x$has_space" != x; then
32932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32934      fi
32935      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32936    fi
32937  fi
32938
32939  # Now new_path has a complete unix path to the binary
32940  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32941    # Keep paths in /bin as-is, but remove trailing .exe if any
32942    new_path="${new_path/%.exe/}"
32943    # Do not save /bin paths to all_fixpath_prefixes!
32944  else
32945    # Not in mixed or Windows style, start by that.
32946    new_path=`cmd //c echo $new_path`
32947
32948  input_path="$new_path"
32949  # Check if we need to convert this using DOS-style short mode. If the path
32950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32951  # take no chances and rewrite it.
32952  # Note: m4 eats our [], so we need to use [ and ] instead.
32953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32954  if test "x$has_forbidden_chars" != x; then
32955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32957  fi
32958
32959    # Output is in $new_path
32960
32961  windows_path="$new_path"
32962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32963    unix_path=`$CYGPATH -u "$windows_path"`
32964    new_path="$unix_path"
32965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32967    new_path="$unix_path"
32968  fi
32969
32970    # remove trailing .exe if any
32971    new_path="${new_path/%.exe/}"
32972
32973    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32974    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32975  fi
32976
32977    else
32978      # We're on a unix platform. Hooray! :)
32979      # First separate the path from the arguments. This will split at the first
32980      # space.
32981      complete="$CC"
32982      path="${complete%% *}"
32983      tmp="$complete EOL"
32984      arguments="${tmp#* }"
32985
32986      # Cannot rely on the command "which" here since it doesn't always work.
32987      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32988      if test -z "$is_absolute_path"; then
32989        # Path to executable is not absolute. Find it.
32990        IFS_save="$IFS"
32991        IFS=:
32992        for p in $PATH; do
32993          if test -f "$p/$path" && test -x "$p/$path"; then
32994            new_path="$p/$path"
32995            break
32996          fi
32997        done
32998        IFS="$IFS_save"
32999      else
33000        # This is an absolute path, we can use it without further modifications.
33001        new_path="$path"
33002      fi
33003
33004      if test "x$new_path" = x; then
33005        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33006$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33007        has_space=`$ECHO "$complete" | $GREP " "`
33008        if test "x$has_space" != x; then
33009          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33010$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33011        fi
33012        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33013      fi
33014    fi
33015
33016    # Now join together the path and the arguments once again
33017    if test "x$arguments" != xEOL; then
33018      new_complete="$new_path ${arguments% *}"
33019    else
33020      new_complete="$new_path"
33021    fi
33022
33023    if test "x$complete" != "x$new_complete"; then
33024      CC="$new_complete"
33025      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33026$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33027    fi
33028  fi
33029
33030  TEST_COMPILER="$CC"
33031
33032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33033$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33034  SYMLINK_ORIGINAL="$TEST_COMPILER"
33035
33036  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33037    # Follow a chain of symbolic links. Use readlink
33038    # where it exists, else fall back to horribly
33039    # complicated shell code.
33040    if test "x$READLINK_TESTED" != yes; then
33041      # On MacOSX there is a readlink tool with a different
33042      # purpose than the GNU readlink tool. Check the found readlink.
33043      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33044      if test "x$ISGNU" = x; then
33045        # A readlink that we do not know how to use.
33046        # Are there other non-GNU readlinks out there?
33047        READLINK_TESTED=yes
33048        READLINK=
33049      fi
33050    fi
33051
33052    if test "x$READLINK" != x; then
33053      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33054    else
33055      # Save the current directory for restoring afterwards
33056      STARTDIR=$PWD
33057      COUNTER=0
33058      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33059      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33060      cd $sym_link_dir
33061      # Use -P flag to resolve symlinks in directories.
33062      cd `$THEPWDCMD -P`
33063      sym_link_dir=`$THEPWDCMD -P`
33064      # Resolve file symlinks
33065      while test $COUNTER -lt 20; do
33066        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33067        if test "x$ISLINK" == x; then
33068          # This is not a symbolic link! We are done!
33069          break
33070        fi
33071        # Again resolve directory symlinks since the target of the just found
33072        # link could be in a different directory
33073        cd `$DIRNAME $ISLINK`
33074        sym_link_dir=`$THEPWDCMD -P`
33075        sym_link_file=`$BASENAME $ISLINK`
33076        let COUNTER=COUNTER+1
33077      done
33078      cd $STARTDIR
33079      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33080    fi
33081  fi
33082
33083  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33085$as_echo "no symlink" >&6; }
33086  else
33087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33088$as_echo "$SYMLINK_ORIGINAL" >&6; }
33089
33090    # We can't handle ccache by gcc wrappers, since we need to know if we're
33091    # using ccache. Instead ccache usage must be controlled by a configure option.
33092    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33093    if test "x$COMPILER_BASENAME" = "xccache"; then
33094      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33095$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33096      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33097    fi
33098  fi
33099
33100
33101  COMPILER=$CC
33102  COMPILER_NAME=$COMPILER_NAME
33103
33104  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33105    # cc -V output typically looks like
33106    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33107    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33108    # Check that this is likely to be the Solaris Studio cc.
33109    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33110    if test $? -ne 0; then
33111      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33112      { $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
33113$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33114      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33115$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33116      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33117$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33118      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33119    fi
33120    # Remove usage instructions (if present), and
33121    # collapse compiler output into a single line
33122    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33123        $SED -e 's/ *[Uu]sage:.*//'`
33124    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33125        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33126  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33127    # xlc -qversion output typically looks like
33128    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33129    #     Version: 11.01.0000.0015
33130    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33131    # Check that this is likely to be the IBM XL C compiler.
33132    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33133    if test $? -ne 0; then
33134      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33135      { $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
33136$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33137      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33138$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33140$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33141      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33142    fi
33143    # Collapse compiler output into a single line
33144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33146        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33147  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33148    # There is no specific version flag, but all output starts with a version string.
33149    # First line typically looks something like:
33150    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33151    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33152    # Check that this is likely to be Microsoft CL.EXE.
33153    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33154    if test $? -ne 0; then
33155      { $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
33156$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33157      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33158$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33159      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33160    fi
33161    # Collapse compiler output into a single line
33162    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33164        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33165  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33166    # gcc --version output typically looks like
33167    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33168    #     Copyright (C) 2013 Free Software Foundation, Inc.
33169    #     This is free software; see the source for copying conditions.  There is NO
33170    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33171    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33172    # Check that this is likely to be GCC.
33173    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33174    if test $? -ne 0; then
33175      { $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
33176$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33177      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33178$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33179      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33180    fi
33181    # Remove Copyright and legalese from version string, and
33182    # collapse into a single line
33183    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33184        $SED -e 's/ *Copyright .*//'`
33185    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33186        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33187  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33188    # clang --version output typically looks like
33189    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33190    #    clang version 3.3 (tags/RELEASE_33/final)
33191    # or
33192    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33193    #    Target: x86_64-pc-linux-gnu
33194    #    Thread model: posix
33195    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33196    # Check that this is likely to be clang
33197    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33198    if test $? -ne 0; then
33199      { $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
33200$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33201      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33202$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33203      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33204    fi
33205    # Collapse compiler output into a single line
33206    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33207    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33208        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33209  else
33210      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33211  fi
33212  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33213  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33214  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33215  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33216
33217  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33218$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33219
33220
33221  # Now that we have resolved CC ourself, let autoconf have its go at it
33222  ac_ext=c
33223ac_cpp='$CPP $CPPFLAGS'
33224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33226ac_compiler_gnu=$ac_cv_c_compiler_gnu
33227if test -n "$ac_tool_prefix"; then
33228  for ac_prog in $CC
33229  do
33230    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33233$as_echo_n "checking for $ac_word... " >&6; }
33234if ${ac_cv_prog_CC+:} false; then :
33235  $as_echo_n "(cached) " >&6
33236else
33237  if test -n "$CC"; then
33238  ac_cv_prog_CC="$CC" # Let the user override the test.
33239else
33240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33241for as_dir in $PATH
33242do
33243  IFS=$as_save_IFS
33244  test -z "$as_dir" && as_dir=.
33245    for ac_exec_ext in '' $ac_executable_extensions; do
33246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33247    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33249    break 2
33250  fi
33251done
33252  done
33253IFS=$as_save_IFS
33254
33255fi
33256fi
33257CC=$ac_cv_prog_CC
33258if test -n "$CC"; then
33259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33260$as_echo "$CC" >&6; }
33261else
33262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33263$as_echo "no" >&6; }
33264fi
33265
33266
33267    test -n "$CC" && break
33268  done
33269fi
33270if test -z "$CC"; then
33271  ac_ct_CC=$CC
33272  for ac_prog in $CC
33273do
33274  # Extract the first word of "$ac_prog", so it can be a program name with args.
33275set dummy $ac_prog; ac_word=$2
33276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33277$as_echo_n "checking for $ac_word... " >&6; }
33278if ${ac_cv_prog_ac_ct_CC+:} false; then :
33279  $as_echo_n "(cached) " >&6
33280else
33281  if test -n "$ac_ct_CC"; then
33282  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33283else
33284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33285for as_dir in $PATH
33286do
33287  IFS=$as_save_IFS
33288  test -z "$as_dir" && as_dir=.
33289    for ac_exec_ext in '' $ac_executable_extensions; do
33290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33291    ac_cv_prog_ac_ct_CC="$ac_prog"
33292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33293    break 2
33294  fi
33295done
33296  done
33297IFS=$as_save_IFS
33298
33299fi
33300fi
33301ac_ct_CC=$ac_cv_prog_ac_ct_CC
33302if test -n "$ac_ct_CC"; then
33303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33304$as_echo "$ac_ct_CC" >&6; }
33305else
33306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33307$as_echo "no" >&6; }
33308fi
33309
33310
33311  test -n "$ac_ct_CC" && break
33312done
33313
33314  if test "x$ac_ct_CC" = x; then
33315    CC=""
33316  else
33317    case $cross_compiling:$ac_tool_warned in
33318yes:)
33319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33321ac_tool_warned=yes ;;
33322esac
33323    CC=$ac_ct_CC
33324  fi
33325fi
33326
33327
33328test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33329$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33330as_fn_error $? "no acceptable C compiler found in \$PATH
33331See \`config.log' for more details" "$LINENO" 5; }
33332
33333# Provide some information about the compiler.
33334$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33335set X $ac_compile
33336ac_compiler=$2
33337for ac_option in --version -v -V -qversion; do
33338  { { ac_try="$ac_compiler $ac_option >&5"
33339case "(($ac_try" in
33340  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33341  *) ac_try_echo=$ac_try;;
33342esac
33343eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33344$as_echo "$ac_try_echo"; } >&5
33345  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33346  ac_status=$?
33347  if test -s conftest.err; then
33348    sed '10a\
33349... rest of stderr output deleted ...
33350         10q' conftest.err >conftest.er1
33351    cat conftest.er1 >&5
33352  fi
33353  rm -f conftest.er1 conftest.err
33354  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33355  test $ac_status = 0; }
33356done
33357
33358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33359/* end confdefs.h.  */
33360
33361int
33362main ()
33363{
33364
33365  ;
33366  return 0;
33367}
33368_ACEOF
33369ac_clean_files_save=$ac_clean_files
33370ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33371# Try to create an executable without -o first, disregard a.out.
33372# It will help us diagnose broken compilers, and finding out an intuition
33373# of exeext.
33374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33375$as_echo_n "checking whether the C compiler works... " >&6; }
33376ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33377
33378# The possible output files:
33379ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33380
33381ac_rmfiles=
33382for ac_file in $ac_files
33383do
33384  case $ac_file in
33385    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33386    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33387  esac
33388done
33389rm -f $ac_rmfiles
33390
33391if { { ac_try="$ac_link_default"
33392case "(($ac_try" in
33393  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33394  *) ac_try_echo=$ac_try;;
33395esac
33396eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33397$as_echo "$ac_try_echo"; } >&5
33398  (eval "$ac_link_default") 2>&5
33399  ac_status=$?
33400  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33401  test $ac_status = 0; }; then :
33402  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33403# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33404# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33405# so that the user can short-circuit this test for compilers unknown to
33406# Autoconf.
33407for ac_file in $ac_files ''
33408do
33409  test -f "$ac_file" || continue
33410  case $ac_file in
33411    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33412	;;
33413    [ab].out )
33414	# We found the default executable, but exeext='' is most
33415	# certainly right.
33416	break;;
33417    *.* )
33418	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33419	then :; else
33420	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33421	fi
33422	# We set ac_cv_exeext here because the later test for it is not
33423	# safe: cross compilers may not add the suffix if given an `-o'
33424	# argument, so we may need to know it at that point already.
33425	# Even if this section looks crufty: it has the advantage of
33426	# actually working.
33427	break;;
33428    * )
33429	break;;
33430  esac
33431done
33432test "$ac_cv_exeext" = no && ac_cv_exeext=
33433
33434else
33435  ac_file=''
33436fi
33437if test -z "$ac_file"; then :
33438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33439$as_echo "no" >&6; }
33440$as_echo "$as_me: failed program was:" >&5
33441sed 's/^/| /' conftest.$ac_ext >&5
33442
33443{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33445as_fn_error 77 "C compiler cannot create executables
33446See \`config.log' for more details" "$LINENO" 5; }
33447else
33448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33449$as_echo "yes" >&6; }
33450fi
33451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33452$as_echo_n "checking for C compiler default output file name... " >&6; }
33453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33454$as_echo "$ac_file" >&6; }
33455ac_exeext=$ac_cv_exeext
33456
33457rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33458ac_clean_files=$ac_clean_files_save
33459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33460$as_echo_n "checking for suffix of executables... " >&6; }
33461if { { ac_try="$ac_link"
33462case "(($ac_try" in
33463  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33464  *) ac_try_echo=$ac_try;;
33465esac
33466eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33467$as_echo "$ac_try_echo"; } >&5
33468  (eval "$ac_link") 2>&5
33469  ac_status=$?
33470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33471  test $ac_status = 0; }; then :
33472  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33473# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33474# work properly (i.e., refer to `conftest.exe'), while it won't with
33475# `rm'.
33476for ac_file in conftest.exe conftest conftest.*; do
33477  test -f "$ac_file" || continue
33478  case $ac_file in
33479    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33480    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33481	  break;;
33482    * ) break;;
33483  esac
33484done
33485else
33486  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33487$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33488as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33489See \`config.log' for more details" "$LINENO" 5; }
33490fi
33491rm -f conftest conftest$ac_cv_exeext
33492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33493$as_echo "$ac_cv_exeext" >&6; }
33494
33495rm -f conftest.$ac_ext
33496EXEEXT=$ac_cv_exeext
33497ac_exeext=$EXEEXT
33498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33499/* end confdefs.h.  */
33500#include <stdio.h>
33501int
33502main ()
33503{
33504FILE *f = fopen ("conftest.out", "w");
33505 return ferror (f) || fclose (f) != 0;
33506
33507  ;
33508  return 0;
33509}
33510_ACEOF
33511ac_clean_files="$ac_clean_files conftest.out"
33512# Check that the compiler produces executables we can run.  If not, either
33513# the compiler is broken, or we cross compile.
33514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33515$as_echo_n "checking whether we are cross compiling... " >&6; }
33516if test "$cross_compiling" != yes; then
33517  { { ac_try="$ac_link"
33518case "(($ac_try" in
33519  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33520  *) ac_try_echo=$ac_try;;
33521esac
33522eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33523$as_echo "$ac_try_echo"; } >&5
33524  (eval "$ac_link") 2>&5
33525  ac_status=$?
33526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33527  test $ac_status = 0; }
33528  if { ac_try='./conftest$ac_cv_exeext'
33529  { { case "(($ac_try" in
33530  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33531  *) ac_try_echo=$ac_try;;
33532esac
33533eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33534$as_echo "$ac_try_echo"; } >&5
33535  (eval "$ac_try") 2>&5
33536  ac_status=$?
33537  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33538  test $ac_status = 0; }; }; then
33539    cross_compiling=no
33540  else
33541    if test "$cross_compiling" = maybe; then
33542	cross_compiling=yes
33543    else
33544	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33546as_fn_error $? "cannot run C compiled programs.
33547If you meant to cross compile, use \`--host'.
33548See \`config.log' for more details" "$LINENO" 5; }
33549    fi
33550  fi
33551fi
33552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33553$as_echo "$cross_compiling" >&6; }
33554
33555rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33556ac_clean_files=$ac_clean_files_save
33557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33558$as_echo_n "checking for suffix of object files... " >&6; }
33559if ${ac_cv_objext+:} false; then :
33560  $as_echo_n "(cached) " >&6
33561else
33562  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33563/* end confdefs.h.  */
33564
33565int
33566main ()
33567{
33568
33569  ;
33570  return 0;
33571}
33572_ACEOF
33573rm -f conftest.o conftest.obj
33574if { { ac_try="$ac_compile"
33575case "(($ac_try" in
33576  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33577  *) ac_try_echo=$ac_try;;
33578esac
33579eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33580$as_echo "$ac_try_echo"; } >&5
33581  (eval "$ac_compile") 2>&5
33582  ac_status=$?
33583  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33584  test $ac_status = 0; }; then :
33585  for ac_file in conftest.o conftest.obj conftest.*; do
33586  test -f "$ac_file" || continue;
33587  case $ac_file in
33588    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33589    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33590       break;;
33591  esac
33592done
33593else
33594  $as_echo "$as_me: failed program was:" >&5
33595sed 's/^/| /' conftest.$ac_ext >&5
33596
33597{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33599as_fn_error $? "cannot compute suffix of object files: cannot compile
33600See \`config.log' for more details" "$LINENO" 5; }
33601fi
33602rm -f conftest.$ac_cv_objext conftest.$ac_ext
33603fi
33604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33605$as_echo "$ac_cv_objext" >&6; }
33606OBJEXT=$ac_cv_objext
33607ac_objext=$OBJEXT
33608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33609$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33610if ${ac_cv_c_compiler_gnu+:} false; then :
33611  $as_echo_n "(cached) " >&6
33612else
33613  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33614/* end confdefs.h.  */
33615
33616int
33617main ()
33618{
33619#ifndef __GNUC__
33620       choke me
33621#endif
33622
33623  ;
33624  return 0;
33625}
33626_ACEOF
33627if ac_fn_c_try_compile "$LINENO"; then :
33628  ac_compiler_gnu=yes
33629else
33630  ac_compiler_gnu=no
33631fi
33632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33633ac_cv_c_compiler_gnu=$ac_compiler_gnu
33634
33635fi
33636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33637$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33638if test $ac_compiler_gnu = yes; then
33639  GCC=yes
33640else
33641  GCC=
33642fi
33643ac_test_CFLAGS=${CFLAGS+set}
33644ac_save_CFLAGS=$CFLAGS
33645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33646$as_echo_n "checking whether $CC accepts -g... " >&6; }
33647if ${ac_cv_prog_cc_g+:} false; then :
33648  $as_echo_n "(cached) " >&6
33649else
33650  ac_save_c_werror_flag=$ac_c_werror_flag
33651   ac_c_werror_flag=yes
33652   ac_cv_prog_cc_g=no
33653   CFLAGS="-g"
33654   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33655/* end confdefs.h.  */
33656
33657int
33658main ()
33659{
33660
33661  ;
33662  return 0;
33663}
33664_ACEOF
33665if ac_fn_c_try_compile "$LINENO"; then :
33666  ac_cv_prog_cc_g=yes
33667else
33668  CFLAGS=""
33669      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33670/* end confdefs.h.  */
33671
33672int
33673main ()
33674{
33675
33676  ;
33677  return 0;
33678}
33679_ACEOF
33680if ac_fn_c_try_compile "$LINENO"; then :
33681
33682else
33683  ac_c_werror_flag=$ac_save_c_werror_flag
33684	 CFLAGS="-g"
33685	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33686/* end confdefs.h.  */
33687
33688int
33689main ()
33690{
33691
33692  ;
33693  return 0;
33694}
33695_ACEOF
33696if ac_fn_c_try_compile "$LINENO"; then :
33697  ac_cv_prog_cc_g=yes
33698fi
33699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33700fi
33701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33702fi
33703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33704   ac_c_werror_flag=$ac_save_c_werror_flag
33705fi
33706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33707$as_echo "$ac_cv_prog_cc_g" >&6; }
33708if test "$ac_test_CFLAGS" = set; then
33709  CFLAGS=$ac_save_CFLAGS
33710elif test $ac_cv_prog_cc_g = yes; then
33711  if test "$GCC" = yes; then
33712    CFLAGS="-g -O2"
33713  else
33714    CFLAGS="-g"
33715  fi
33716else
33717  if test "$GCC" = yes; then
33718    CFLAGS="-O2"
33719  else
33720    CFLAGS=
33721  fi
33722fi
33723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33724$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33725if ${ac_cv_prog_cc_c89+:} false; then :
33726  $as_echo_n "(cached) " >&6
33727else
33728  ac_cv_prog_cc_c89=no
33729ac_save_CC=$CC
33730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33731/* end confdefs.h.  */
33732#include <stdarg.h>
33733#include <stdio.h>
33734struct stat;
33735/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33736struct buf { int x; };
33737FILE * (*rcsopen) (struct buf *, struct stat *, int);
33738static char *e (p, i)
33739     char **p;
33740     int i;
33741{
33742  return p[i];
33743}
33744static char *f (char * (*g) (char **, int), char **p, ...)
33745{
33746  char *s;
33747  va_list v;
33748  va_start (v,p);
33749  s = g (p, va_arg (v,int));
33750  va_end (v);
33751  return s;
33752}
33753
33754/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33755   function prototypes and stuff, but not '\xHH' hex character constants.
33756   These don't provoke an error unfortunately, instead are silently treated
33757   as 'x'.  The following induces an error, until -std is added to get
33758   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33759   array size at least.  It's necessary to write '\x00'==0 to get something
33760   that's true only with -std.  */
33761int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33762
33763/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33764   inside strings and character constants.  */
33765#define FOO(x) 'x'
33766int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33767
33768int test (int i, double x);
33769struct s1 {int (*f) (int a);};
33770struct s2 {int (*f) (double a);};
33771int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33772int argc;
33773char **argv;
33774int
33775main ()
33776{
33777return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33778  ;
33779  return 0;
33780}
33781_ACEOF
33782for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33783	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33784do
33785  CC="$ac_save_CC $ac_arg"
33786  if ac_fn_c_try_compile "$LINENO"; then :
33787  ac_cv_prog_cc_c89=$ac_arg
33788fi
33789rm -f core conftest.err conftest.$ac_objext
33790  test "x$ac_cv_prog_cc_c89" != "xno" && break
33791done
33792rm -f conftest.$ac_ext
33793CC=$ac_save_CC
33794
33795fi
33796# AC_CACHE_VAL
33797case "x$ac_cv_prog_cc_c89" in
33798  x)
33799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33800$as_echo "none needed" >&6; } ;;
33801  xno)
33802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33803$as_echo "unsupported" >&6; } ;;
33804  *)
33805    CC="$CC $ac_cv_prog_cc_c89"
33806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33807$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33808esac
33809if test "x$ac_cv_prog_cc_c89" != xno; then :
33810
33811fi
33812
33813ac_ext=cpp
33814ac_cpp='$CXXCPP $CPPFLAGS'
33815ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33816ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33817ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33818
33819
33820
33821  COMPILER_NAME=C++
33822  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33823
33824  if test "x$CXX" != x; then
33825    # User has supplied compiler name already, always let that override.
33826    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33827$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33828    if test "x`basename $CXX`" = "x$CXX"; then
33829      # A command without a complete path is provided, search $PATH.
33830
33831      for ac_prog in $CXX
33832do
33833  # Extract the first word of "$ac_prog", so it can be a program name with args.
33834set dummy $ac_prog; ac_word=$2
33835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33836$as_echo_n "checking for $ac_word... " >&6; }
33837if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33838  $as_echo_n "(cached) " >&6
33839else
33840  case $POTENTIAL_CXX in
33841  [\\/]* | ?:[\\/]*)
33842  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33843  ;;
33844  *)
33845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33846for as_dir in $PATH
33847do
33848  IFS=$as_save_IFS
33849  test -z "$as_dir" && as_dir=.
33850    for ac_exec_ext in '' $ac_executable_extensions; do
33851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33852    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33854    break 2
33855  fi
33856done
33857  done
33858IFS=$as_save_IFS
33859
33860  ;;
33861esac
33862fi
33863POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33864if test -n "$POTENTIAL_CXX"; then
33865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33866$as_echo "$POTENTIAL_CXX" >&6; }
33867else
33868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33869$as_echo "no" >&6; }
33870fi
33871
33872
33873  test -n "$POTENTIAL_CXX" && break
33874done
33875
33876      if test "x$POTENTIAL_CXX" != x; then
33877        CXX=$POTENTIAL_CXX
33878      else
33879        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33880      fi
33881    else
33882      # Otherwise it might already be a complete path
33883      if test ! -x "$CXX"; then
33884        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33885      fi
33886    fi
33887  else
33888    # No user supplied value. Locate compiler ourselves.
33889
33890    # If we are cross compiling, assume cross compilation tools follows the
33891    # cross compilation standard where they are prefixed with the autoconf
33892    # standard name for the target. For example the binary
33893    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33894    # If we are not cross compiling, then the default compiler name will be
33895    # used.
33896
33897    CXX=
33898    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33899    # before checking the rest of the PATH.
33900    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33901    # step, this should not be necessary.
33902    if test -n "$TOOLCHAIN_PATH"; then
33903      PATH_save="$PATH"
33904      PATH="$TOOLCHAIN_PATH"
33905      for ac_prog in $SEARCH_LIST
33906do
33907  # Extract the first word of "$ac_prog", so it can be a program name with args.
33908set dummy $ac_prog; ac_word=$2
33909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33910$as_echo_n "checking for $ac_word... " >&6; }
33911if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33912  $as_echo_n "(cached) " >&6
33913else
33914  case $TOOLCHAIN_PATH_CXX in
33915  [\\/]* | ?:[\\/]*)
33916  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33917  ;;
33918  *)
33919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33920for as_dir in $PATH
33921do
33922  IFS=$as_save_IFS
33923  test -z "$as_dir" && as_dir=.
33924    for ac_exec_ext in '' $ac_executable_extensions; do
33925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33926    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33928    break 2
33929  fi
33930done
33931  done
33932IFS=$as_save_IFS
33933
33934  ;;
33935esac
33936fi
33937TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33938if test -n "$TOOLCHAIN_PATH_CXX"; then
33939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33940$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33941else
33942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33943$as_echo "no" >&6; }
33944fi
33945
33946
33947  test -n "$TOOLCHAIN_PATH_CXX" && break
33948done
33949
33950      CXX=$TOOLCHAIN_PATH_CXX
33951      PATH="$PATH_save"
33952    fi
33953
33954    # AC_PATH_PROGS can't be run multiple times with the same variable,
33955    # so create a new name for this run.
33956    if test "x$CXX" = x; then
33957      for ac_prog in $SEARCH_LIST
33958do
33959  # Extract the first word of "$ac_prog", so it can be a program name with args.
33960set dummy $ac_prog; ac_word=$2
33961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33962$as_echo_n "checking for $ac_word... " >&6; }
33963if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33964  $as_echo_n "(cached) " >&6
33965else
33966  case $POTENTIAL_CXX in
33967  [\\/]* | ?:[\\/]*)
33968  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33969  ;;
33970  *)
33971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33972for as_dir in $PATH
33973do
33974  IFS=$as_save_IFS
33975  test -z "$as_dir" && as_dir=.
33976    for ac_exec_ext in '' $ac_executable_extensions; do
33977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33978    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33980    break 2
33981  fi
33982done
33983  done
33984IFS=$as_save_IFS
33985
33986  ;;
33987esac
33988fi
33989POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33990if test -n "$POTENTIAL_CXX"; then
33991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33992$as_echo "$POTENTIAL_CXX" >&6; }
33993else
33994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33995$as_echo "no" >&6; }
33996fi
33997
33998
33999  test -n "$POTENTIAL_CXX" && break
34000done
34001
34002      CXX=$POTENTIAL_CXX
34003    fi
34004
34005    if test "x$CXX" = x; then
34006
34007  # Print a helpful message on how to acquire the necessary build dependency.
34008  # devkit is the help tag: freetype, cups, alsa etc
34009  MISSING_DEPENDENCY=devkit
34010
34011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34012    cygwin_help $MISSING_DEPENDENCY
34013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34014    msys_help $MISSING_DEPENDENCY
34015  else
34016    PKGHANDLER_COMMAND=
34017
34018    case $PKGHANDLER in
34019      apt-get)
34020        apt_help     $MISSING_DEPENDENCY ;;
34021      yum)
34022        yum_help     $MISSING_DEPENDENCY ;;
34023      port)
34024        port_help    $MISSING_DEPENDENCY ;;
34025      pkgutil)
34026        pkgutil_help $MISSING_DEPENDENCY ;;
34027      pkgadd)
34028        pkgadd_help  $MISSING_DEPENDENCY ;;
34029    esac
34030
34031    if test "x$PKGHANDLER_COMMAND" != x; then
34032      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34033    fi
34034  fi
34035
34036      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34037    fi
34038  fi
34039
34040  # Now we have a compiler binary in CXX. Make sure it's okay.
34041
34042  # Only process if variable expands to non-empty
34043
34044  if test "x$CXX" != x; then
34045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34046
34047  # First separate the path from the arguments. This will split at the first
34048  # space.
34049  complete="$CXX"
34050  path="${complete%% *}"
34051  tmp="$complete EOL"
34052  arguments="${tmp#* }"
34053
34054  # Input might be given as Windows format, start by converting to
34055  # unix format.
34056  new_path=`$CYGPATH -u "$path"`
34057
34058  # Now try to locate executable using which
34059  new_path=`$WHICH "$new_path" 2> /dev/null`
34060  # bat and cmd files are not always considered executable in cygwin causing which
34061  # to not find them
34062  if test "x$new_path" = x \
34063      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34064      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34065    new_path=`$CYGPATH -u "$path"`
34066  fi
34067  if test "x$new_path" = x; then
34068    # Oops. Which didn't find the executable.
34069    # The splitting of arguments from the executable at a space might have been incorrect,
34070    # since paths with space are more likely in Windows. Give it another try with the whole
34071    # argument.
34072    path="$complete"
34073    arguments="EOL"
34074    new_path=`$CYGPATH -u "$path"`
34075    new_path=`$WHICH "$new_path" 2> /dev/null`
34076    # bat and cmd files are not always considered executable in cygwin causing which
34077    # to not find them
34078    if test "x$new_path" = x \
34079        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34080        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34081      new_path=`$CYGPATH -u "$path"`
34082    fi
34083    if test "x$new_path" = x; then
34084      # It's still not found. Now this is an unrecoverable error.
34085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34086$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34087      has_space=`$ECHO "$complete" | $GREP " "`
34088      if test "x$has_space" != x; then
34089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34091      fi
34092      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34093    fi
34094  fi
34095
34096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34099  # "foo.exe" is OK but "foo" is an error.
34100  #
34101  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34102  # It is also a way to make sure we got the proper file name for the real test later on.
34103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34104  if test "x$test_shortpath" = x; then
34105    # Short path failed, file does not exist as specified.
34106    # Try adding .exe or .cmd
34107    if test -f "${new_path}.exe"; then
34108      input_to_shortpath="${new_path}.exe"
34109    elif test -f "${new_path}.cmd"; then
34110      input_to_shortpath="${new_path}.cmd"
34111    else
34112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34113$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34114      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34115$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34116      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34117    fi
34118  else
34119    input_to_shortpath="$new_path"
34120  fi
34121
34122  # Call helper function which possibly converts this using DOS-style short mode.
34123  # If so, the updated path is stored in $new_path.
34124  new_path="$input_to_shortpath"
34125
34126  input_path="$input_to_shortpath"
34127  # Check if we need to convert this using DOS-style short mode. If the path
34128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34129  # take no chances and rewrite it.
34130  # Note: m4 eats our [], so we need to use [ and ] instead.
34131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34132  if test "x$has_forbidden_chars" != x; then
34133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34137      # Going to short mode and back again did indeed matter. Since short mode is
34138      # case insensitive, let's make it lowercase to improve readability.
34139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34140      # Now convert it back to Unix-style (cygpath)
34141      input_path=`$CYGPATH -u "$shortmode_path"`
34142      new_path="$input_path"
34143    fi
34144  fi
34145
34146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34147  if test "x$test_cygdrive_prefix" = x; then
34148    # As a simple fix, exclude /usr/bin since it's not a real path.
34149    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34151      # a path prefixed by /cygdrive for fixpath to work.
34152      new_path="$CYGWIN_ROOT_PATH$input_path"
34153    fi
34154  fi
34155
34156  # remove trailing .exe if any
34157  new_path="${new_path/%.exe/}"
34158
34159    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34160
34161  # First separate the path from the arguments. This will split at the first
34162  # space.
34163  complete="$CXX"
34164  path="${complete%% *}"
34165  tmp="$complete EOL"
34166  arguments="${tmp#* }"
34167
34168  # Input might be given as Windows format, start by converting to
34169  # unix format.
34170  new_path="$path"
34171
34172  windows_path="$new_path"
34173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174    unix_path=`$CYGPATH -u "$windows_path"`
34175    new_path="$unix_path"
34176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178    new_path="$unix_path"
34179  fi
34180
34181
34182  # Now try to locate executable using which
34183  new_path=`$WHICH "$new_path" 2> /dev/null`
34184
34185  if test "x$new_path" = x; then
34186    # Oops. Which didn't find the executable.
34187    # The splitting of arguments from the executable at a space might have been incorrect,
34188    # since paths with space are more likely in Windows. Give it another try with the whole
34189    # argument.
34190    path="$complete"
34191    arguments="EOL"
34192    new_path="$path"
34193
34194  windows_path="$new_path"
34195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34196    unix_path=`$CYGPATH -u "$windows_path"`
34197    new_path="$unix_path"
34198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34200    new_path="$unix_path"
34201  fi
34202
34203
34204    new_path=`$WHICH "$new_path" 2> /dev/null`
34205    # bat and cmd files are not always considered executable in MSYS causing which
34206    # to not find them
34207    if test "x$new_path" = x \
34208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34210      new_path="$path"
34211
34212  windows_path="$new_path"
34213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34214    unix_path=`$CYGPATH -u "$windows_path"`
34215    new_path="$unix_path"
34216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34218    new_path="$unix_path"
34219  fi
34220
34221    fi
34222
34223    if test "x$new_path" = x; then
34224      # It's still not found. Now this is an unrecoverable error.
34225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34226$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34227      has_space=`$ECHO "$complete" | $GREP " "`
34228      if test "x$has_space" != x; then
34229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34231      fi
34232      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34233    fi
34234  fi
34235
34236  # Now new_path has a complete unix path to the binary
34237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34238    # Keep paths in /bin as-is, but remove trailing .exe if any
34239    new_path="${new_path/%.exe/}"
34240    # Do not save /bin paths to all_fixpath_prefixes!
34241  else
34242    # Not in mixed or Windows style, start by that.
34243    new_path=`cmd //c echo $new_path`
34244
34245  input_path="$new_path"
34246  # Check if we need to convert this using DOS-style short mode. If the path
34247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34248  # take no chances and rewrite it.
34249  # Note: m4 eats our [], so we need to use [ and ] instead.
34250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34251  if test "x$has_forbidden_chars" != x; then
34252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34254  fi
34255
34256    # Output is in $new_path
34257
34258  windows_path="$new_path"
34259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34260    unix_path=`$CYGPATH -u "$windows_path"`
34261    new_path="$unix_path"
34262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34264    new_path="$unix_path"
34265  fi
34266
34267    # remove trailing .exe if any
34268    new_path="${new_path/%.exe/}"
34269
34270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34272  fi
34273
34274    else
34275      # We're on a unix platform. Hooray! :)
34276      # First separate the path from the arguments. This will split at the first
34277      # space.
34278      complete="$CXX"
34279      path="${complete%% *}"
34280      tmp="$complete EOL"
34281      arguments="${tmp#* }"
34282
34283      # Cannot rely on the command "which" here since it doesn't always work.
34284      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34285      if test -z "$is_absolute_path"; then
34286        # Path to executable is not absolute. Find it.
34287        IFS_save="$IFS"
34288        IFS=:
34289        for p in $PATH; do
34290          if test -f "$p/$path" && test -x "$p/$path"; then
34291            new_path="$p/$path"
34292            break
34293          fi
34294        done
34295        IFS="$IFS_save"
34296      else
34297        # This is an absolute path, we can use it without further modifications.
34298        new_path="$path"
34299      fi
34300
34301      if test "x$new_path" = x; then
34302        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34303$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34304        has_space=`$ECHO "$complete" | $GREP " "`
34305        if test "x$has_space" != x; then
34306          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34308        fi
34309        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34310      fi
34311    fi
34312
34313    # Now join together the path and the arguments once again
34314    if test "x$arguments" != xEOL; then
34315      new_complete="$new_path ${arguments% *}"
34316    else
34317      new_complete="$new_path"
34318    fi
34319
34320    if test "x$complete" != "x$new_complete"; then
34321      CXX="$new_complete"
34322      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34323$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34324    fi
34325  fi
34326
34327  TEST_COMPILER="$CXX"
34328
34329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34330$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34331  SYMLINK_ORIGINAL="$TEST_COMPILER"
34332
34333  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34334    # Follow a chain of symbolic links. Use readlink
34335    # where it exists, else fall back to horribly
34336    # complicated shell code.
34337    if test "x$READLINK_TESTED" != yes; then
34338      # On MacOSX there is a readlink tool with a different
34339      # purpose than the GNU readlink tool. Check the found readlink.
34340      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34341      if test "x$ISGNU" = x; then
34342        # A readlink that we do not know how to use.
34343        # Are there other non-GNU readlinks out there?
34344        READLINK_TESTED=yes
34345        READLINK=
34346      fi
34347    fi
34348
34349    if test "x$READLINK" != x; then
34350      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34351    else
34352      # Save the current directory for restoring afterwards
34353      STARTDIR=$PWD
34354      COUNTER=0
34355      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34356      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34357      cd $sym_link_dir
34358      # Use -P flag to resolve symlinks in directories.
34359      cd `$THEPWDCMD -P`
34360      sym_link_dir=`$THEPWDCMD -P`
34361      # Resolve file symlinks
34362      while test $COUNTER -lt 20; do
34363        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34364        if test "x$ISLINK" == x; then
34365          # This is not a symbolic link! We are done!
34366          break
34367        fi
34368        # Again resolve directory symlinks since the target of the just found
34369        # link could be in a different directory
34370        cd `$DIRNAME $ISLINK`
34371        sym_link_dir=`$THEPWDCMD -P`
34372        sym_link_file=`$BASENAME $ISLINK`
34373        let COUNTER=COUNTER+1
34374      done
34375      cd $STARTDIR
34376      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34377    fi
34378  fi
34379
34380  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34382$as_echo "no symlink" >&6; }
34383  else
34384    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34385$as_echo "$SYMLINK_ORIGINAL" >&6; }
34386
34387    # We can't handle ccache by gcc wrappers, since we need to know if we're
34388    # using ccache. Instead ccache usage must be controlled by a configure option.
34389    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34390    if test "x$COMPILER_BASENAME" = "xccache"; then
34391      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34392$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34393      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34394    fi
34395  fi
34396
34397
34398  COMPILER=$CXX
34399  COMPILER_NAME=$COMPILER_NAME
34400
34401  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34402    # cc -V output typically looks like
34403    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34404    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34405    # Check that this is likely to be the Solaris Studio cc.
34406    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34407    if test $? -ne 0; then
34408      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34409      { $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
34410$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34411      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34412$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34414$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34415      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34416    fi
34417    # Remove usage instructions (if present), and
34418    # collapse compiler output into a single line
34419    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34420        $SED -e 's/ *[Uu]sage:.*//'`
34421    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34422        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34423  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34424    # xlc -qversion output typically looks like
34425    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34426    #     Version: 11.01.0000.0015
34427    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34428    # Check that this is likely to be the IBM XL C compiler.
34429    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34430    if test $? -ne 0; then
34431      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34432      { $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
34433$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34434      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34435$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34436      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34437$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34438      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34439    fi
34440    # Collapse compiler output into a single line
34441    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34442    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34443        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34444  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34445    # There is no specific version flag, but all output starts with a version string.
34446    # First line typically looks something like:
34447    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34448    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34449    # Check that this is likely to be Microsoft CL.EXE.
34450    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34451    if test $? -ne 0; then
34452      { $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
34453$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34455$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457    fi
34458    # Collapse compiler output into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34463    # gcc --version output typically looks like
34464    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34465    #     Copyright (C) 2013 Free Software Foundation, Inc.
34466    #     This is free software; see the source for copying conditions.  There is NO
34467    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34468    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34469    # Check that this is likely to be GCC.
34470    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34471    if test $? -ne 0; then
34472      { $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
34473$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34474      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34475$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34476      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34477    fi
34478    # Remove Copyright and legalese from version string, and
34479    # collapse into a single line
34480    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34481        $SED -e 's/ *Copyright .*//'`
34482    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34483        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34484  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34485    # clang --version output typically looks like
34486    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34487    #    clang version 3.3 (tags/RELEASE_33/final)
34488    # or
34489    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34490    #    Target: x86_64-pc-linux-gnu
34491    #    Thread model: posix
34492    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34493    # Check that this is likely to be clang
34494    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34495    if test $? -ne 0; then
34496      { $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
34497$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34498      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34499$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34500      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34501    fi
34502    # Collapse compiler output into a single line
34503    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34504    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34505        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34506  else
34507      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34508  fi
34509  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34510  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34511  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34512  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34513
34514  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34515$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34516
34517
34518  # Now that we have resolved CXX ourself, let autoconf have its go at it
34519  ac_ext=cpp
34520ac_cpp='$CXXCPP $CPPFLAGS'
34521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34524if test -z "$CXX"; then
34525  if test -n "$CCC"; then
34526    CXX=$CCC
34527  else
34528    if test -n "$ac_tool_prefix"; then
34529  for ac_prog in $CXX
34530  do
34531    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34534$as_echo_n "checking for $ac_word... " >&6; }
34535if ${ac_cv_prog_CXX+:} false; then :
34536  $as_echo_n "(cached) " >&6
34537else
34538  if test -n "$CXX"; then
34539  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34540else
34541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34542for as_dir in $PATH
34543do
34544  IFS=$as_save_IFS
34545  test -z "$as_dir" && as_dir=.
34546    for ac_exec_ext in '' $ac_executable_extensions; do
34547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34548    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34550    break 2
34551  fi
34552done
34553  done
34554IFS=$as_save_IFS
34555
34556fi
34557fi
34558CXX=$ac_cv_prog_CXX
34559if test -n "$CXX"; then
34560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34561$as_echo "$CXX" >&6; }
34562else
34563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34564$as_echo "no" >&6; }
34565fi
34566
34567
34568    test -n "$CXX" && break
34569  done
34570fi
34571if test -z "$CXX"; then
34572  ac_ct_CXX=$CXX
34573  for ac_prog in $CXX
34574do
34575  # Extract the first word of "$ac_prog", so it can be a program name with args.
34576set dummy $ac_prog; ac_word=$2
34577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34578$as_echo_n "checking for $ac_word... " >&6; }
34579if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34580  $as_echo_n "(cached) " >&6
34581else
34582  if test -n "$ac_ct_CXX"; then
34583  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34584else
34585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34586for as_dir in $PATH
34587do
34588  IFS=$as_save_IFS
34589  test -z "$as_dir" && as_dir=.
34590    for ac_exec_ext in '' $ac_executable_extensions; do
34591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34592    ac_cv_prog_ac_ct_CXX="$ac_prog"
34593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34594    break 2
34595  fi
34596done
34597  done
34598IFS=$as_save_IFS
34599
34600fi
34601fi
34602ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34603if test -n "$ac_ct_CXX"; then
34604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34605$as_echo "$ac_ct_CXX" >&6; }
34606else
34607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34608$as_echo "no" >&6; }
34609fi
34610
34611
34612  test -n "$ac_ct_CXX" && break
34613done
34614
34615  if test "x$ac_ct_CXX" = x; then
34616    CXX="g++"
34617  else
34618    case $cross_compiling:$ac_tool_warned in
34619yes:)
34620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34622ac_tool_warned=yes ;;
34623esac
34624    CXX=$ac_ct_CXX
34625  fi
34626fi
34627
34628  fi
34629fi
34630# Provide some information about the compiler.
34631$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34632set X $ac_compile
34633ac_compiler=$2
34634for ac_option in --version -v -V -qversion; do
34635  { { ac_try="$ac_compiler $ac_option >&5"
34636case "(($ac_try" in
34637  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34638  *) ac_try_echo=$ac_try;;
34639esac
34640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34641$as_echo "$ac_try_echo"; } >&5
34642  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34643  ac_status=$?
34644  if test -s conftest.err; then
34645    sed '10a\
34646... rest of stderr output deleted ...
34647         10q' conftest.err >conftest.er1
34648    cat conftest.er1 >&5
34649  fi
34650  rm -f conftest.er1 conftest.err
34651  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34652  test $ac_status = 0; }
34653done
34654
34655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34656$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34657if ${ac_cv_cxx_compiler_gnu+:} false; then :
34658  $as_echo_n "(cached) " >&6
34659else
34660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34661/* end confdefs.h.  */
34662
34663int
34664main ()
34665{
34666#ifndef __GNUC__
34667       choke me
34668#endif
34669
34670  ;
34671  return 0;
34672}
34673_ACEOF
34674if ac_fn_cxx_try_compile "$LINENO"; then :
34675  ac_compiler_gnu=yes
34676else
34677  ac_compiler_gnu=no
34678fi
34679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34680ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34681
34682fi
34683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34684$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34685if test $ac_compiler_gnu = yes; then
34686  GXX=yes
34687else
34688  GXX=
34689fi
34690ac_test_CXXFLAGS=${CXXFLAGS+set}
34691ac_save_CXXFLAGS=$CXXFLAGS
34692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34693$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34694if ${ac_cv_prog_cxx_g+:} false; then :
34695  $as_echo_n "(cached) " >&6
34696else
34697  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34698   ac_cxx_werror_flag=yes
34699   ac_cv_prog_cxx_g=no
34700   CXXFLAGS="-g"
34701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34702/* end confdefs.h.  */
34703
34704int
34705main ()
34706{
34707
34708  ;
34709  return 0;
34710}
34711_ACEOF
34712if ac_fn_cxx_try_compile "$LINENO"; then :
34713  ac_cv_prog_cxx_g=yes
34714else
34715  CXXFLAGS=""
34716      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34717/* end confdefs.h.  */
34718
34719int
34720main ()
34721{
34722
34723  ;
34724  return 0;
34725}
34726_ACEOF
34727if ac_fn_cxx_try_compile "$LINENO"; then :
34728
34729else
34730  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34731	 CXXFLAGS="-g"
34732	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34733/* end confdefs.h.  */
34734
34735int
34736main ()
34737{
34738
34739  ;
34740  return 0;
34741}
34742_ACEOF
34743if ac_fn_cxx_try_compile "$LINENO"; then :
34744  ac_cv_prog_cxx_g=yes
34745fi
34746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34747fi
34748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34749fi
34750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34751   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34752fi
34753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34754$as_echo "$ac_cv_prog_cxx_g" >&6; }
34755if test "$ac_test_CXXFLAGS" = set; then
34756  CXXFLAGS=$ac_save_CXXFLAGS
34757elif test $ac_cv_prog_cxx_g = yes; then
34758  if test "$GXX" = yes; then
34759    CXXFLAGS="-g -O2"
34760  else
34761    CXXFLAGS="-g"
34762  fi
34763else
34764  if test "$GXX" = yes; then
34765    CXXFLAGS="-O2"
34766  else
34767    CXXFLAGS=
34768  fi
34769fi
34770ac_ext=cpp
34771ac_cpp='$CXXCPP $CPPFLAGS'
34772ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34773ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34774ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34775
34776
34777  # This is the compiler version number on the form X.Y[.Z]
34778
34779
34780
34781
34782  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34783    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34784$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34785    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34786$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34787  fi
34788
34789  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34790  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34791    { $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
34792$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;}
34793  fi
34794
34795  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34796    { $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
34797$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34798  fi
34799
34800  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34801
34802
34803  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846    # Execute function body
34847
34848  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34849  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34850
34851  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34852    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34853  fi
34854
34855  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34856    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34857  fi
34858
34859  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34860  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34861
34862  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34863    :
34864
34865  else
34866    :
34867
34868          { $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
34869$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34870
34871
34872  fi
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885  fi
34886
34887  #
34888  # Setup the preprocessor (CPP and CXXCPP)
34889  #
34890  ac_ext=c
34891ac_cpp='$CPP $CPPFLAGS'
34892ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34893ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34894ac_compiler_gnu=$ac_cv_c_compiler_gnu
34895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34896$as_echo_n "checking how to run the C preprocessor... " >&6; }
34897# On Suns, sometimes $CPP names a directory.
34898if test -n "$CPP" && test -d "$CPP"; then
34899  CPP=
34900fi
34901if test -z "$CPP"; then
34902  if ${ac_cv_prog_CPP+:} false; then :
34903  $as_echo_n "(cached) " >&6
34904else
34905      # Double quotes because CPP needs to be expanded
34906    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34907    do
34908      ac_preproc_ok=false
34909for ac_c_preproc_warn_flag in '' yes
34910do
34911  # Use a header file that comes with gcc, so configuring glibc
34912  # with a fresh cross-compiler works.
34913  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34914  # <limits.h> exists even on freestanding compilers.
34915  # On the NeXT, cc -E runs the code through the compiler's parser,
34916  # not just through cpp. "Syntax error" is here to catch this case.
34917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34918/* end confdefs.h.  */
34919#ifdef __STDC__
34920# include <limits.h>
34921#else
34922# include <assert.h>
34923#endif
34924		     Syntax error
34925_ACEOF
34926if ac_fn_c_try_cpp "$LINENO"; then :
34927
34928else
34929  # Broken: fails on valid input.
34930continue
34931fi
34932rm -f conftest.err conftest.i conftest.$ac_ext
34933
34934  # OK, works on sane cases.  Now check whether nonexistent headers
34935  # can be detected and how.
34936  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34937/* end confdefs.h.  */
34938#include <ac_nonexistent.h>
34939_ACEOF
34940if ac_fn_c_try_cpp "$LINENO"; then :
34941  # Broken: success on invalid input.
34942continue
34943else
34944  # Passes both tests.
34945ac_preproc_ok=:
34946break
34947fi
34948rm -f conftest.err conftest.i conftest.$ac_ext
34949
34950done
34951# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34952rm -f conftest.i conftest.err conftest.$ac_ext
34953if $ac_preproc_ok; then :
34954  break
34955fi
34956
34957    done
34958    ac_cv_prog_CPP=$CPP
34959
34960fi
34961  CPP=$ac_cv_prog_CPP
34962else
34963  ac_cv_prog_CPP=$CPP
34964fi
34965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34966$as_echo "$CPP" >&6; }
34967ac_preproc_ok=false
34968for ac_c_preproc_warn_flag in '' yes
34969do
34970  # Use a header file that comes with gcc, so configuring glibc
34971  # with a fresh cross-compiler works.
34972  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34973  # <limits.h> exists even on freestanding compilers.
34974  # On the NeXT, cc -E runs the code through the compiler's parser,
34975  # not just through cpp. "Syntax error" is here to catch this case.
34976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34977/* end confdefs.h.  */
34978#ifdef __STDC__
34979# include <limits.h>
34980#else
34981# include <assert.h>
34982#endif
34983		     Syntax error
34984_ACEOF
34985if ac_fn_c_try_cpp "$LINENO"; then :
34986
34987else
34988  # Broken: fails on valid input.
34989continue
34990fi
34991rm -f conftest.err conftest.i conftest.$ac_ext
34992
34993  # OK, works on sane cases.  Now check whether nonexistent headers
34994  # can be detected and how.
34995  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34996/* end confdefs.h.  */
34997#include <ac_nonexistent.h>
34998_ACEOF
34999if ac_fn_c_try_cpp "$LINENO"; then :
35000  # Broken: success on invalid input.
35001continue
35002else
35003  # Passes both tests.
35004ac_preproc_ok=:
35005break
35006fi
35007rm -f conftest.err conftest.i conftest.$ac_ext
35008
35009done
35010# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35011rm -f conftest.i conftest.err conftest.$ac_ext
35012if $ac_preproc_ok; then :
35013
35014else
35015  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35017as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35018See \`config.log' for more details" "$LINENO" 5; }
35019fi
35020
35021ac_ext=cpp
35022ac_cpp='$CXXCPP $CPPFLAGS'
35023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35026
35027
35028  # Only process if variable expands to non-empty
35029
35030  if test "x$CPP" != x; then
35031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35032
35033  # First separate the path from the arguments. This will split at the first
35034  # space.
35035  complete="$CPP"
35036  path="${complete%% *}"
35037  tmp="$complete EOL"
35038  arguments="${tmp#* }"
35039
35040  # Input might be given as Windows format, start by converting to
35041  # unix format.
35042  new_path=`$CYGPATH -u "$path"`
35043
35044  # Now try to locate executable using which
35045  new_path=`$WHICH "$new_path" 2> /dev/null`
35046  # bat and cmd files are not always considered executable in cygwin causing which
35047  # to not find them
35048  if test "x$new_path" = x \
35049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35051    new_path=`$CYGPATH -u "$path"`
35052  fi
35053  if test "x$new_path" = x; then
35054    # Oops. Which didn't find the executable.
35055    # The splitting of arguments from the executable at a space might have been incorrect,
35056    # since paths with space are more likely in Windows. Give it another try with the whole
35057    # argument.
35058    path="$complete"
35059    arguments="EOL"
35060    new_path=`$CYGPATH -u "$path"`
35061    new_path=`$WHICH "$new_path" 2> /dev/null`
35062    # bat and cmd files are not always considered executable in cygwin causing which
35063    # to not find them
35064    if test "x$new_path" = x \
35065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35067      new_path=`$CYGPATH -u "$path"`
35068    fi
35069    if test "x$new_path" = x; then
35070      # It's still not found. Now this is an unrecoverable error.
35071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35072$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35073      has_space=`$ECHO "$complete" | $GREP " "`
35074      if test "x$has_space" != x; then
35075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35077      fi
35078      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35079    fi
35080  fi
35081
35082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35085  # "foo.exe" is OK but "foo" is an error.
35086  #
35087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35088  # It is also a way to make sure we got the proper file name for the real test later on.
35089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35090  if test "x$test_shortpath" = x; then
35091    # Short path failed, file does not exist as specified.
35092    # Try adding .exe or .cmd
35093    if test -f "${new_path}.exe"; then
35094      input_to_shortpath="${new_path}.exe"
35095    elif test -f "${new_path}.cmd"; then
35096      input_to_shortpath="${new_path}.cmd"
35097    else
35098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35099$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35102      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35103    fi
35104  else
35105    input_to_shortpath="$new_path"
35106  fi
35107
35108  # Call helper function which possibly converts this using DOS-style short mode.
35109  # If so, the updated path is stored in $new_path.
35110  new_path="$input_to_shortpath"
35111
35112  input_path="$input_to_shortpath"
35113  # Check if we need to convert this using DOS-style short mode. If the path
35114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35115  # take no chances and rewrite it.
35116  # Note: m4 eats our [], so we need to use [ and ] instead.
35117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35118  if test "x$has_forbidden_chars" != x; then
35119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35123      # Going to short mode and back again did indeed matter. Since short mode is
35124      # case insensitive, let's make it lowercase to improve readability.
35125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35126      # Now convert it back to Unix-style (cygpath)
35127      input_path=`$CYGPATH -u "$shortmode_path"`
35128      new_path="$input_path"
35129    fi
35130  fi
35131
35132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35133  if test "x$test_cygdrive_prefix" = x; then
35134    # As a simple fix, exclude /usr/bin since it's not a real path.
35135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35137      # a path prefixed by /cygdrive for fixpath to work.
35138      new_path="$CYGWIN_ROOT_PATH$input_path"
35139    fi
35140  fi
35141
35142  # remove trailing .exe if any
35143  new_path="${new_path/%.exe/}"
35144
35145    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35146
35147  # First separate the path from the arguments. This will split at the first
35148  # space.
35149  complete="$CPP"
35150  path="${complete%% *}"
35151  tmp="$complete EOL"
35152  arguments="${tmp#* }"
35153
35154  # Input might be given as Windows format, start by converting to
35155  # unix format.
35156  new_path="$path"
35157
35158  windows_path="$new_path"
35159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35160    unix_path=`$CYGPATH -u "$windows_path"`
35161    new_path="$unix_path"
35162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35164    new_path="$unix_path"
35165  fi
35166
35167
35168  # Now try to locate executable using which
35169  new_path=`$WHICH "$new_path" 2> /dev/null`
35170
35171  if test "x$new_path" = x; then
35172    # Oops. Which didn't find the executable.
35173    # The splitting of arguments from the executable at a space might have been incorrect,
35174    # since paths with space are more likely in Windows. Give it another try with the whole
35175    # argument.
35176    path="$complete"
35177    arguments="EOL"
35178    new_path="$path"
35179
35180  windows_path="$new_path"
35181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35182    unix_path=`$CYGPATH -u "$windows_path"`
35183    new_path="$unix_path"
35184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35186    new_path="$unix_path"
35187  fi
35188
35189
35190    new_path=`$WHICH "$new_path" 2> /dev/null`
35191    # bat and cmd files are not always considered executable in MSYS causing which
35192    # to not find them
35193    if test "x$new_path" = x \
35194        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35195        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35196      new_path="$path"
35197
35198  windows_path="$new_path"
35199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35200    unix_path=`$CYGPATH -u "$windows_path"`
35201    new_path="$unix_path"
35202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35204    new_path="$unix_path"
35205  fi
35206
35207    fi
35208
35209    if test "x$new_path" = x; then
35210      # It's still not found. Now this is an unrecoverable error.
35211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35212$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35213      has_space=`$ECHO "$complete" | $GREP " "`
35214      if test "x$has_space" != x; then
35215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35217      fi
35218      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35219    fi
35220  fi
35221
35222  # Now new_path has a complete unix path to the binary
35223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35224    # Keep paths in /bin as-is, but remove trailing .exe if any
35225    new_path="${new_path/%.exe/}"
35226    # Do not save /bin paths to all_fixpath_prefixes!
35227  else
35228    # Not in mixed or Windows style, start by that.
35229    new_path=`cmd //c echo $new_path`
35230
35231  input_path="$new_path"
35232  # Check if we need to convert this using DOS-style short mode. If the path
35233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35234  # take no chances and rewrite it.
35235  # Note: m4 eats our [], so we need to use [ and ] instead.
35236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35237  if test "x$has_forbidden_chars" != x; then
35238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35240  fi
35241
35242    # Output is in $new_path
35243
35244  windows_path="$new_path"
35245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35246    unix_path=`$CYGPATH -u "$windows_path"`
35247    new_path="$unix_path"
35248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35250    new_path="$unix_path"
35251  fi
35252
35253    # remove trailing .exe if any
35254    new_path="${new_path/%.exe/}"
35255
35256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35258  fi
35259
35260    else
35261      # We're on a unix platform. Hooray! :)
35262      # First separate the path from the arguments. This will split at the first
35263      # space.
35264      complete="$CPP"
35265      path="${complete%% *}"
35266      tmp="$complete EOL"
35267      arguments="${tmp#* }"
35268
35269      # Cannot rely on the command "which" here since it doesn't always work.
35270      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35271      if test -z "$is_absolute_path"; then
35272        # Path to executable is not absolute. Find it.
35273        IFS_save="$IFS"
35274        IFS=:
35275        for p in $PATH; do
35276          if test -f "$p/$path" && test -x "$p/$path"; then
35277            new_path="$p/$path"
35278            break
35279          fi
35280        done
35281        IFS="$IFS_save"
35282      else
35283        # This is an absolute path, we can use it without further modifications.
35284        new_path="$path"
35285      fi
35286
35287      if test "x$new_path" = x; then
35288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35289$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35290        has_space=`$ECHO "$complete" | $GREP " "`
35291        if test "x$has_space" != x; then
35292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35294        fi
35295        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35296      fi
35297    fi
35298
35299    # Now join together the path and the arguments once again
35300    if test "x$arguments" != xEOL; then
35301      new_complete="$new_path ${arguments% *}"
35302    else
35303      new_complete="$new_path"
35304    fi
35305
35306    if test "x$complete" != "x$new_complete"; then
35307      CPP="$new_complete"
35308      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35309$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35310    fi
35311  fi
35312
35313  ac_ext=cpp
35314ac_cpp='$CXXCPP $CPPFLAGS'
35315ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35316ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35317ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35319$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35320if test -z "$CXXCPP"; then
35321  if ${ac_cv_prog_CXXCPP+:} false; then :
35322  $as_echo_n "(cached) " >&6
35323else
35324      # Double quotes because CXXCPP needs to be expanded
35325    for CXXCPP in "$CXX -E" "/lib/cpp"
35326    do
35327      ac_preproc_ok=false
35328for ac_cxx_preproc_warn_flag in '' yes
35329do
35330  # Use a header file that comes with gcc, so configuring glibc
35331  # with a fresh cross-compiler works.
35332  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35333  # <limits.h> exists even on freestanding compilers.
35334  # On the NeXT, cc -E runs the code through the compiler's parser,
35335  # not just through cpp. "Syntax error" is here to catch this case.
35336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35337/* end confdefs.h.  */
35338#ifdef __STDC__
35339# include <limits.h>
35340#else
35341# include <assert.h>
35342#endif
35343		     Syntax error
35344_ACEOF
35345if ac_fn_cxx_try_cpp "$LINENO"; then :
35346
35347else
35348  # Broken: fails on valid input.
35349continue
35350fi
35351rm -f conftest.err conftest.i conftest.$ac_ext
35352
35353  # OK, works on sane cases.  Now check whether nonexistent headers
35354  # can be detected and how.
35355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35356/* end confdefs.h.  */
35357#include <ac_nonexistent.h>
35358_ACEOF
35359if ac_fn_cxx_try_cpp "$LINENO"; then :
35360  # Broken: success on invalid input.
35361continue
35362else
35363  # Passes both tests.
35364ac_preproc_ok=:
35365break
35366fi
35367rm -f conftest.err conftest.i conftest.$ac_ext
35368
35369done
35370# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35371rm -f conftest.i conftest.err conftest.$ac_ext
35372if $ac_preproc_ok; then :
35373  break
35374fi
35375
35376    done
35377    ac_cv_prog_CXXCPP=$CXXCPP
35378
35379fi
35380  CXXCPP=$ac_cv_prog_CXXCPP
35381else
35382  ac_cv_prog_CXXCPP=$CXXCPP
35383fi
35384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35385$as_echo "$CXXCPP" >&6; }
35386ac_preproc_ok=false
35387for ac_cxx_preproc_warn_flag in '' yes
35388do
35389  # Use a header file that comes with gcc, so configuring glibc
35390  # with a fresh cross-compiler works.
35391  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35392  # <limits.h> exists even on freestanding compilers.
35393  # On the NeXT, cc -E runs the code through the compiler's parser,
35394  # not just through cpp. "Syntax error" is here to catch this case.
35395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35396/* end confdefs.h.  */
35397#ifdef __STDC__
35398# include <limits.h>
35399#else
35400# include <assert.h>
35401#endif
35402		     Syntax error
35403_ACEOF
35404if ac_fn_cxx_try_cpp "$LINENO"; then :
35405
35406else
35407  # Broken: fails on valid input.
35408continue
35409fi
35410rm -f conftest.err conftest.i conftest.$ac_ext
35411
35412  # OK, works on sane cases.  Now check whether nonexistent headers
35413  # can be detected and how.
35414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35415/* end confdefs.h.  */
35416#include <ac_nonexistent.h>
35417_ACEOF
35418if ac_fn_cxx_try_cpp "$LINENO"; then :
35419  # Broken: success on invalid input.
35420continue
35421else
35422  # Passes both tests.
35423ac_preproc_ok=:
35424break
35425fi
35426rm -f conftest.err conftest.i conftest.$ac_ext
35427
35428done
35429# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35430rm -f conftest.i conftest.err conftest.$ac_ext
35431if $ac_preproc_ok; then :
35432
35433else
35434  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35435$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35436as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35437See \`config.log' for more details" "$LINENO" 5; }
35438fi
35439
35440ac_ext=cpp
35441ac_cpp='$CXXCPP $CPPFLAGS'
35442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35445
35446
35447  # Only process if variable expands to non-empty
35448
35449  if test "x$CXXCPP" != x; then
35450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451
35452  # First separate the path from the arguments. This will split at the first
35453  # space.
35454  complete="$CXXCPP"
35455  path="${complete%% *}"
35456  tmp="$complete EOL"
35457  arguments="${tmp#* }"
35458
35459  # Input might be given as Windows format, start by converting to
35460  # unix format.
35461  new_path=`$CYGPATH -u "$path"`
35462
35463  # Now try to locate executable using which
35464  new_path=`$WHICH "$new_path" 2> /dev/null`
35465  # bat and cmd files are not always considered executable in cygwin causing which
35466  # to not find them
35467  if test "x$new_path" = x \
35468      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35469      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35470    new_path=`$CYGPATH -u "$path"`
35471  fi
35472  if test "x$new_path" = x; then
35473    # Oops. Which didn't find the executable.
35474    # The splitting of arguments from the executable at a space might have been incorrect,
35475    # since paths with space are more likely in Windows. Give it another try with the whole
35476    # argument.
35477    path="$complete"
35478    arguments="EOL"
35479    new_path=`$CYGPATH -u "$path"`
35480    new_path=`$WHICH "$new_path" 2> /dev/null`
35481    # bat and cmd files are not always considered executable in cygwin causing which
35482    # to not find them
35483    if test "x$new_path" = x \
35484        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35485        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35486      new_path=`$CYGPATH -u "$path"`
35487    fi
35488    if test "x$new_path" = x; then
35489      # It's still not found. Now this is an unrecoverable error.
35490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35491$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35492      has_space=`$ECHO "$complete" | $GREP " "`
35493      if test "x$has_space" != x; then
35494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35496      fi
35497      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35498    fi
35499  fi
35500
35501  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35502  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35503  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35504  # "foo.exe" is OK but "foo" is an error.
35505  #
35506  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35507  # It is also a way to make sure we got the proper file name for the real test later on.
35508  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35509  if test "x$test_shortpath" = x; then
35510    # Short path failed, file does not exist as specified.
35511    # Try adding .exe or .cmd
35512    if test -f "${new_path}.exe"; then
35513      input_to_shortpath="${new_path}.exe"
35514    elif test -f "${new_path}.cmd"; then
35515      input_to_shortpath="${new_path}.cmd"
35516    else
35517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35518$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35519      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35520$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35521      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35522    fi
35523  else
35524    input_to_shortpath="$new_path"
35525  fi
35526
35527  # Call helper function which possibly converts this using DOS-style short mode.
35528  # If so, the updated path is stored in $new_path.
35529  new_path="$input_to_shortpath"
35530
35531  input_path="$input_to_shortpath"
35532  # Check if we need to convert this using DOS-style short mode. If the path
35533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35534  # take no chances and rewrite it.
35535  # Note: m4 eats our [], so we need to use [ and ] instead.
35536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35537  if test "x$has_forbidden_chars" != x; then
35538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35542      # Going to short mode and back again did indeed matter. Since short mode is
35543      # case insensitive, let's make it lowercase to improve readability.
35544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35545      # Now convert it back to Unix-style (cygpath)
35546      input_path=`$CYGPATH -u "$shortmode_path"`
35547      new_path="$input_path"
35548    fi
35549  fi
35550
35551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35552  if test "x$test_cygdrive_prefix" = x; then
35553    # As a simple fix, exclude /usr/bin since it's not a real path.
35554    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35556      # a path prefixed by /cygdrive for fixpath to work.
35557      new_path="$CYGWIN_ROOT_PATH$input_path"
35558    fi
35559  fi
35560
35561  # remove trailing .exe if any
35562  new_path="${new_path/%.exe/}"
35563
35564    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35565
35566  # First separate the path from the arguments. This will split at the first
35567  # space.
35568  complete="$CXXCPP"
35569  path="${complete%% *}"
35570  tmp="$complete EOL"
35571  arguments="${tmp#* }"
35572
35573  # Input might be given as Windows format, start by converting to
35574  # unix format.
35575  new_path="$path"
35576
35577  windows_path="$new_path"
35578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35579    unix_path=`$CYGPATH -u "$windows_path"`
35580    new_path="$unix_path"
35581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35583    new_path="$unix_path"
35584  fi
35585
35586
35587  # Now try to locate executable using which
35588  new_path=`$WHICH "$new_path" 2> /dev/null`
35589
35590  if test "x$new_path" = x; then
35591    # Oops. Which didn't find the executable.
35592    # The splitting of arguments from the executable at a space might have been incorrect,
35593    # since paths with space are more likely in Windows. Give it another try with the whole
35594    # argument.
35595    path="$complete"
35596    arguments="EOL"
35597    new_path="$path"
35598
35599  windows_path="$new_path"
35600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35601    unix_path=`$CYGPATH -u "$windows_path"`
35602    new_path="$unix_path"
35603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35605    new_path="$unix_path"
35606  fi
35607
35608
35609    new_path=`$WHICH "$new_path" 2> /dev/null`
35610    # bat and cmd files are not always considered executable in MSYS causing which
35611    # to not find them
35612    if test "x$new_path" = x \
35613        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35614        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35615      new_path="$path"
35616
35617  windows_path="$new_path"
35618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35619    unix_path=`$CYGPATH -u "$windows_path"`
35620    new_path="$unix_path"
35621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35623    new_path="$unix_path"
35624  fi
35625
35626    fi
35627
35628    if test "x$new_path" = x; then
35629      # It's still not found. Now this is an unrecoverable error.
35630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35631$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35632      has_space=`$ECHO "$complete" | $GREP " "`
35633      if test "x$has_space" != x; then
35634        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35635$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35636      fi
35637      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35638    fi
35639  fi
35640
35641  # Now new_path has a complete unix path to the binary
35642  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35643    # Keep paths in /bin as-is, but remove trailing .exe if any
35644    new_path="${new_path/%.exe/}"
35645    # Do not save /bin paths to all_fixpath_prefixes!
35646  else
35647    # Not in mixed or Windows style, start by that.
35648    new_path=`cmd //c echo $new_path`
35649
35650  input_path="$new_path"
35651  # Check if we need to convert this using DOS-style short mode. If the path
35652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35653  # take no chances and rewrite it.
35654  # Note: m4 eats our [], so we need to use [ and ] instead.
35655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35656  if test "x$has_forbidden_chars" != x; then
35657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35659  fi
35660
35661    # Output is in $new_path
35662
35663  windows_path="$new_path"
35664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35665    unix_path=`$CYGPATH -u "$windows_path"`
35666    new_path="$unix_path"
35667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35669    new_path="$unix_path"
35670  fi
35671
35672    # remove trailing .exe if any
35673    new_path="${new_path/%.exe/}"
35674
35675    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35676    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35677  fi
35678
35679    else
35680      # We're on a unix platform. Hooray! :)
35681      # First separate the path from the arguments. This will split at the first
35682      # space.
35683      complete="$CXXCPP"
35684      path="${complete%% *}"
35685      tmp="$complete EOL"
35686      arguments="${tmp#* }"
35687
35688      # Cannot rely on the command "which" here since it doesn't always work.
35689      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35690      if test -z "$is_absolute_path"; then
35691        # Path to executable is not absolute. Find it.
35692        IFS_save="$IFS"
35693        IFS=:
35694        for p in $PATH; do
35695          if test -f "$p/$path" && test -x "$p/$path"; then
35696            new_path="$p/$path"
35697            break
35698          fi
35699        done
35700        IFS="$IFS_save"
35701      else
35702        # This is an absolute path, we can use it without further modifications.
35703        new_path="$path"
35704      fi
35705
35706      if test "x$new_path" = x; then
35707        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35708$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35709        has_space=`$ECHO "$complete" | $GREP " "`
35710        if test "x$has_space" != x; then
35711          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35712$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35713        fi
35714        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35715      fi
35716    fi
35717
35718    # Now join together the path and the arguments once again
35719    if test "x$arguments" != xEOL; then
35720      new_complete="$new_path ${arguments% *}"
35721    else
35722      new_complete="$new_path"
35723    fi
35724
35725    if test "x$complete" != "x$new_complete"; then
35726      CXXCPP="$new_complete"
35727      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35728$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35729    fi
35730  fi
35731
35732
35733  #
35734  # Setup the linker (LD)
35735  #
35736  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35737    # In the Microsoft toolchain we have a separate LD command "link".
35738    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35739    # a cygwin program for something completely different.
35740    # Extract the first word of "link", so it can be a program name with args.
35741set dummy link; ac_word=$2
35742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35743$as_echo_n "checking for $ac_word... " >&6; }
35744if ${ac_cv_prog_LD+:} false; then :
35745  $as_echo_n "(cached) " >&6
35746else
35747  if test -n "$LD"; then
35748  ac_cv_prog_LD="$LD" # Let the user override the test.
35749else
35750  ac_prog_rejected=no
35751as_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    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35759       ac_prog_rejected=yes
35760       continue
35761     fi
35762    ac_cv_prog_LD="link"
35763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35764    break 2
35765  fi
35766done
35767  done
35768IFS=$as_save_IFS
35769
35770if test $ac_prog_rejected = yes; then
35771  # We found a bogon in the path, so make sure we never use it.
35772  set dummy $ac_cv_prog_LD
35773  shift
35774  if test $# != 0; then
35775    # We chose a different compiler from the bogus one.
35776    # However, it has the same basename, so the bogon will be chosen
35777    # first if we set LD to just the basename; use the full file name.
35778    shift
35779    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35780  fi
35781fi
35782fi
35783fi
35784LD=$ac_cv_prog_LD
35785if test -n "$LD"; then
35786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35787$as_echo "$LD" >&6; }
35788else
35789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35790$as_echo "no" >&6; }
35791fi
35792
35793
35794
35795  # Only process if variable expands to non-empty
35796
35797  if test "x$LD" != x; then
35798    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35799
35800  # First separate the path from the arguments. This will split at the first
35801  # space.
35802  complete="$LD"
35803  path="${complete%% *}"
35804  tmp="$complete EOL"
35805  arguments="${tmp#* }"
35806
35807  # Input might be given as Windows format, start by converting to
35808  # unix format.
35809  new_path=`$CYGPATH -u "$path"`
35810
35811  # Now try to locate executable using which
35812  new_path=`$WHICH "$new_path" 2> /dev/null`
35813  # bat and cmd files are not always considered executable in cygwin causing which
35814  # to not find them
35815  if test "x$new_path" = x \
35816      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35817      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35818    new_path=`$CYGPATH -u "$path"`
35819  fi
35820  if test "x$new_path" = x; then
35821    # Oops. Which didn't find the executable.
35822    # The splitting of arguments from the executable at a space might have been incorrect,
35823    # since paths with space are more likely in Windows. Give it another try with the whole
35824    # argument.
35825    path="$complete"
35826    arguments="EOL"
35827    new_path=`$CYGPATH -u "$path"`
35828    new_path=`$WHICH "$new_path" 2> /dev/null`
35829    # bat and cmd files are not always considered executable in cygwin causing which
35830    # to not find them
35831    if test "x$new_path" = x \
35832        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35833        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35834      new_path=`$CYGPATH -u "$path"`
35835    fi
35836    if test "x$new_path" = x; then
35837      # It's still not found. Now this is an unrecoverable error.
35838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35839$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35840      has_space=`$ECHO "$complete" | $GREP " "`
35841      if test "x$has_space" != x; then
35842        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35843$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35844      fi
35845      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35846    fi
35847  fi
35848
35849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35852  # "foo.exe" is OK but "foo" is an error.
35853  #
35854  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35855  # It is also a way to make sure we got the proper file name for the real test later on.
35856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35857  if test "x$test_shortpath" = x; then
35858    # Short path failed, file does not exist as specified.
35859    # Try adding .exe or .cmd
35860    if test -f "${new_path}.exe"; then
35861      input_to_shortpath="${new_path}.exe"
35862    elif test -f "${new_path}.cmd"; then
35863      input_to_shortpath="${new_path}.cmd"
35864    else
35865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35866$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35867      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35868$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35869      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35870    fi
35871  else
35872    input_to_shortpath="$new_path"
35873  fi
35874
35875  # Call helper function which possibly converts this using DOS-style short mode.
35876  # If so, the updated path is stored in $new_path.
35877  new_path="$input_to_shortpath"
35878
35879  input_path="$input_to_shortpath"
35880  # Check if we need to convert this using DOS-style short mode. If the path
35881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35882  # take no chances and rewrite it.
35883  # Note: m4 eats our [], so we need to use [ and ] instead.
35884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35885  if test "x$has_forbidden_chars" != x; then
35886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35890      # Going to short mode and back again did indeed matter. Since short mode is
35891      # case insensitive, let's make it lowercase to improve readability.
35892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35893      # Now convert it back to Unix-style (cygpath)
35894      input_path=`$CYGPATH -u "$shortmode_path"`
35895      new_path="$input_path"
35896    fi
35897  fi
35898
35899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35900  if test "x$test_cygdrive_prefix" = x; then
35901    # As a simple fix, exclude /usr/bin since it's not a real path.
35902    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35904      # a path prefixed by /cygdrive for fixpath to work.
35905      new_path="$CYGWIN_ROOT_PATH$input_path"
35906    fi
35907  fi
35908
35909  # remove trailing .exe if any
35910  new_path="${new_path/%.exe/}"
35911
35912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35913
35914  # First separate the path from the arguments. This will split at the first
35915  # space.
35916  complete="$LD"
35917  path="${complete%% *}"
35918  tmp="$complete EOL"
35919  arguments="${tmp#* }"
35920
35921  # Input might be given as Windows format, start by converting to
35922  # unix format.
35923  new_path="$path"
35924
35925  windows_path="$new_path"
35926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35927    unix_path=`$CYGPATH -u "$windows_path"`
35928    new_path="$unix_path"
35929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35931    new_path="$unix_path"
35932  fi
35933
35934
35935  # Now try to locate executable using which
35936  new_path=`$WHICH "$new_path" 2> /dev/null`
35937
35938  if test "x$new_path" = x; then
35939    # Oops. Which didn't find the executable.
35940    # The splitting of arguments from the executable at a space might have been incorrect,
35941    # since paths with space are more likely in Windows. Give it another try with the whole
35942    # argument.
35943    path="$complete"
35944    arguments="EOL"
35945    new_path="$path"
35946
35947  windows_path="$new_path"
35948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35949    unix_path=`$CYGPATH -u "$windows_path"`
35950    new_path="$unix_path"
35951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35953    new_path="$unix_path"
35954  fi
35955
35956
35957    new_path=`$WHICH "$new_path" 2> /dev/null`
35958    # bat and cmd files are not always considered executable in MSYS causing which
35959    # to not find them
35960    if test "x$new_path" = x \
35961        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35962        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35963      new_path="$path"
35964
35965  windows_path="$new_path"
35966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35967    unix_path=`$CYGPATH -u "$windows_path"`
35968    new_path="$unix_path"
35969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35971    new_path="$unix_path"
35972  fi
35973
35974    fi
35975
35976    if test "x$new_path" = x; then
35977      # It's still not found. Now this is an unrecoverable error.
35978      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35979$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35980      has_space=`$ECHO "$complete" | $GREP " "`
35981      if test "x$has_space" != x; then
35982        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35983$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35984      fi
35985      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35986    fi
35987  fi
35988
35989  # Now new_path has a complete unix path to the binary
35990  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35991    # Keep paths in /bin as-is, but remove trailing .exe if any
35992    new_path="${new_path/%.exe/}"
35993    # Do not save /bin paths to all_fixpath_prefixes!
35994  else
35995    # Not in mixed or Windows style, start by that.
35996    new_path=`cmd //c echo $new_path`
35997
35998  input_path="$new_path"
35999  # Check if we need to convert this using DOS-style short mode. If the path
36000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36001  # take no chances and rewrite it.
36002  # Note: m4 eats our [], so we need to use [ and ] instead.
36003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36004  if test "x$has_forbidden_chars" != x; then
36005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36007  fi
36008
36009    # Output is in $new_path
36010
36011  windows_path="$new_path"
36012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36013    unix_path=`$CYGPATH -u "$windows_path"`
36014    new_path="$unix_path"
36015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36017    new_path="$unix_path"
36018  fi
36019
36020    # remove trailing .exe if any
36021    new_path="${new_path/%.exe/}"
36022
36023    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36024    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36025  fi
36026
36027    else
36028      # We're on a unix platform. Hooray! :)
36029      # First separate the path from the arguments. This will split at the first
36030      # space.
36031      complete="$LD"
36032      path="${complete%% *}"
36033      tmp="$complete EOL"
36034      arguments="${tmp#* }"
36035
36036      # Cannot rely on the command "which" here since it doesn't always work.
36037      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36038      if test -z "$is_absolute_path"; then
36039        # Path to executable is not absolute. Find it.
36040        IFS_save="$IFS"
36041        IFS=:
36042        for p in $PATH; do
36043          if test -f "$p/$path" && test -x "$p/$path"; then
36044            new_path="$p/$path"
36045            break
36046          fi
36047        done
36048        IFS="$IFS_save"
36049      else
36050        # This is an absolute path, we can use it without further modifications.
36051        new_path="$path"
36052      fi
36053
36054      if test "x$new_path" = x; then
36055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36056$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36057        has_space=`$ECHO "$complete" | $GREP " "`
36058        if test "x$has_space" != x; then
36059          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36060$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36061        fi
36062        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36063      fi
36064    fi
36065
36066    # Now join together the path and the arguments once again
36067    if test "x$arguments" != xEOL; then
36068      new_complete="$new_path ${arguments% *}"
36069    else
36070      new_complete="$new_path"
36071    fi
36072
36073    if test "x$complete" != "x$new_complete"; then
36074      LD="$new_complete"
36075      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36076$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36077    fi
36078  fi
36079
36080    # Verify that we indeed succeeded with this trick.
36081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36082$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36083    "$LD" --version > /dev/null
36084    if test $? -eq 0 ; then
36085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36086$as_echo "no" >&6; }
36087      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36088    else
36089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36090$as_echo "yes" >&6; }
36091    fi
36092    LDCXX="$LD"
36093  else
36094    # All other toolchains use the compiler to link.
36095    LD="$CC"
36096    LDCXX="$CXX"
36097  fi
36098
36099  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36100
36101
36102  #
36103  # Setup the assembler (AS)
36104  #
36105  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36106    # FIXME: should this really be solaris, or solstudio?
36107
36108
36109  # Publish this variable in the help.
36110
36111
36112  if [ -z "${AS+x}" ]; then
36113    # The variable is not set by user, try to locate tool using the code snippet
36114    for ac_prog in as
36115do
36116  # Extract the first word of "$ac_prog", so it can be a program name with args.
36117set dummy $ac_prog; ac_word=$2
36118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36119$as_echo_n "checking for $ac_word... " >&6; }
36120if ${ac_cv_path_AS+:} false; then :
36121  $as_echo_n "(cached) " >&6
36122else
36123  case $AS in
36124  [\\/]* | ?:[\\/]*)
36125  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36126  ;;
36127  *)
36128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36129for as_dir in $PATH
36130do
36131  IFS=$as_save_IFS
36132  test -z "$as_dir" && as_dir=.
36133    for ac_exec_ext in '' $ac_executable_extensions; do
36134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36135    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36137    break 2
36138  fi
36139done
36140  done
36141IFS=$as_save_IFS
36142
36143  ;;
36144esac
36145fi
36146AS=$ac_cv_path_AS
36147if test -n "$AS"; then
36148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36149$as_echo "$AS" >&6; }
36150else
36151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36152$as_echo "no" >&6; }
36153fi
36154
36155
36156  test -n "$AS" && break
36157done
36158
36159  else
36160    # The variable is set, but is it from the command line or the environment?
36161
36162    # Try to remove the string !AS! from our list.
36163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36165      # If it failed, the variable was not from the command line. Ignore it,
36166      # but warn the user (except for BASH, which is always set by the calling BASH).
36167      if test "xAS" != xBASH; then
36168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36169$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36170      fi
36171      # Try to locate tool using the code snippet
36172      for ac_prog in as
36173do
36174  # Extract the first word of "$ac_prog", so it can be a program name with args.
36175set dummy $ac_prog; ac_word=$2
36176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36177$as_echo_n "checking for $ac_word... " >&6; }
36178if ${ac_cv_path_AS+:} false; then :
36179  $as_echo_n "(cached) " >&6
36180else
36181  case $AS in
36182  [\\/]* | ?:[\\/]*)
36183  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36184  ;;
36185  *)
36186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36187for as_dir in $PATH
36188do
36189  IFS=$as_save_IFS
36190  test -z "$as_dir" && as_dir=.
36191    for ac_exec_ext in '' $ac_executable_extensions; do
36192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36193    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36195    break 2
36196  fi
36197done
36198  done
36199IFS=$as_save_IFS
36200
36201  ;;
36202esac
36203fi
36204AS=$ac_cv_path_AS
36205if test -n "$AS"; then
36206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36207$as_echo "$AS" >&6; }
36208else
36209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36210$as_echo "no" >&6; }
36211fi
36212
36213
36214  test -n "$AS" && break
36215done
36216
36217    else
36218      # If it succeeded, then it was overridden by the user. We will use it
36219      # for the tool.
36220
36221      # First remove it from the list of overridden variables, so we can test
36222      # for unknown variables in the end.
36223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36224
36225      # Check if we try to supply an empty value
36226      if test "x$AS" = x; then
36227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36228$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36230$as_echo_n "checking for AS... " >&6; }
36231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36232$as_echo "disabled" >&6; }
36233      else
36234        # Check if the provided tool contains a complete path.
36235        tool_specified="$AS"
36236        tool_basename="${tool_specified##*/}"
36237        if test "x$tool_basename" = "x$tool_specified"; then
36238          # A command without a complete path is provided, search $PATH.
36239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36240$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36241          # Extract the first word of "$tool_basename", so it can be a program name with args.
36242set dummy $tool_basename; ac_word=$2
36243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36244$as_echo_n "checking for $ac_word... " >&6; }
36245if ${ac_cv_path_AS+:} false; then :
36246  $as_echo_n "(cached) " >&6
36247else
36248  case $AS in
36249  [\\/]* | ?:[\\/]*)
36250  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36251  ;;
36252  *)
36253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36254for as_dir in $PATH
36255do
36256  IFS=$as_save_IFS
36257  test -z "$as_dir" && as_dir=.
36258    for ac_exec_ext in '' $ac_executable_extensions; do
36259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36260    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36262    break 2
36263  fi
36264done
36265  done
36266IFS=$as_save_IFS
36267
36268  ;;
36269esac
36270fi
36271AS=$ac_cv_path_AS
36272if test -n "$AS"; then
36273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36274$as_echo "$AS" >&6; }
36275else
36276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36277$as_echo "no" >&6; }
36278fi
36279
36280
36281          if test "x$AS" = x; then
36282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36283          fi
36284        else
36285          # Otherwise we believe it is a complete path. Use it as it is.
36286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36287$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36289$as_echo_n "checking for AS... " >&6; }
36290          if test ! -x "$tool_specified"; then
36291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36292$as_echo "not found" >&6; }
36293            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36294          fi
36295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36296$as_echo "$tool_specified" >&6; }
36297        fi
36298      fi
36299    fi
36300
36301  fi
36302
36303
36304
36305  # Only process if variable expands to non-empty
36306
36307  if test "x$AS" != x; then
36308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36309
36310  # First separate the path from the arguments. This will split at the first
36311  # space.
36312  complete="$AS"
36313  path="${complete%% *}"
36314  tmp="$complete EOL"
36315  arguments="${tmp#* }"
36316
36317  # Input might be given as Windows format, start by converting to
36318  # unix format.
36319  new_path=`$CYGPATH -u "$path"`
36320
36321  # Now try to locate executable using which
36322  new_path=`$WHICH "$new_path" 2> /dev/null`
36323  # bat and cmd files are not always considered executable in cygwin causing which
36324  # to not find them
36325  if test "x$new_path" = x \
36326      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36327      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36328    new_path=`$CYGPATH -u "$path"`
36329  fi
36330  if test "x$new_path" = x; then
36331    # Oops. Which didn't find the executable.
36332    # The splitting of arguments from the executable at a space might have been incorrect,
36333    # since paths with space are more likely in Windows. Give it another try with the whole
36334    # argument.
36335    path="$complete"
36336    arguments="EOL"
36337    new_path=`$CYGPATH -u "$path"`
36338    new_path=`$WHICH "$new_path" 2> /dev/null`
36339    # bat and cmd files are not always considered executable in cygwin causing which
36340    # to not find them
36341    if test "x$new_path" = x \
36342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36344      new_path=`$CYGPATH -u "$path"`
36345    fi
36346    if test "x$new_path" = x; then
36347      # It's still not found. Now this is an unrecoverable error.
36348      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36349$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36350      has_space=`$ECHO "$complete" | $GREP " "`
36351      if test "x$has_space" != x; then
36352        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36353$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36354      fi
36355      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36356    fi
36357  fi
36358
36359  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36360  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36361  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36362  # "foo.exe" is OK but "foo" is an error.
36363  #
36364  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36365  # It is also a way to make sure we got the proper file name for the real test later on.
36366  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36367  if test "x$test_shortpath" = x; then
36368    # Short path failed, file does not exist as specified.
36369    # Try adding .exe or .cmd
36370    if test -f "${new_path}.exe"; then
36371      input_to_shortpath="${new_path}.exe"
36372    elif test -f "${new_path}.cmd"; then
36373      input_to_shortpath="${new_path}.cmd"
36374    else
36375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36376$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36377      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36378$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36379      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36380    fi
36381  else
36382    input_to_shortpath="$new_path"
36383  fi
36384
36385  # Call helper function which possibly converts this using DOS-style short mode.
36386  # If so, the updated path is stored in $new_path.
36387  new_path="$input_to_shortpath"
36388
36389  input_path="$input_to_shortpath"
36390  # Check if we need to convert this using DOS-style short mode. If the path
36391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36392  # take no chances and rewrite it.
36393  # Note: m4 eats our [], so we need to use [ and ] instead.
36394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36395  if test "x$has_forbidden_chars" != x; then
36396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36400      # Going to short mode and back again did indeed matter. Since short mode is
36401      # case insensitive, let's make it lowercase to improve readability.
36402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36403      # Now convert it back to Unix-style (cygpath)
36404      input_path=`$CYGPATH -u "$shortmode_path"`
36405      new_path="$input_path"
36406    fi
36407  fi
36408
36409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36410  if test "x$test_cygdrive_prefix" = x; then
36411    # As a simple fix, exclude /usr/bin since it's not a real path.
36412    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36414      # a path prefixed by /cygdrive for fixpath to work.
36415      new_path="$CYGWIN_ROOT_PATH$input_path"
36416    fi
36417  fi
36418
36419  # remove trailing .exe if any
36420  new_path="${new_path/%.exe/}"
36421
36422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36423
36424  # First separate the path from the arguments. This will split at the first
36425  # space.
36426  complete="$AS"
36427  path="${complete%% *}"
36428  tmp="$complete EOL"
36429  arguments="${tmp#* }"
36430
36431  # Input might be given as Windows format, start by converting to
36432  # unix format.
36433  new_path="$path"
36434
36435  windows_path="$new_path"
36436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36437    unix_path=`$CYGPATH -u "$windows_path"`
36438    new_path="$unix_path"
36439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36441    new_path="$unix_path"
36442  fi
36443
36444
36445  # Now try to locate executable using which
36446  new_path=`$WHICH "$new_path" 2> /dev/null`
36447
36448  if test "x$new_path" = x; then
36449    # Oops. Which didn't find the executable.
36450    # The splitting of arguments from the executable at a space might have been incorrect,
36451    # since paths with space are more likely in Windows. Give it another try with the whole
36452    # argument.
36453    path="$complete"
36454    arguments="EOL"
36455    new_path="$path"
36456
36457  windows_path="$new_path"
36458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36459    unix_path=`$CYGPATH -u "$windows_path"`
36460    new_path="$unix_path"
36461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36463    new_path="$unix_path"
36464  fi
36465
36466
36467    new_path=`$WHICH "$new_path" 2> /dev/null`
36468    # bat and cmd files are not always considered executable in MSYS causing which
36469    # to not find them
36470    if test "x$new_path" = x \
36471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36473      new_path="$path"
36474
36475  windows_path="$new_path"
36476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36477    unix_path=`$CYGPATH -u "$windows_path"`
36478    new_path="$unix_path"
36479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36481    new_path="$unix_path"
36482  fi
36483
36484    fi
36485
36486    if test "x$new_path" = x; then
36487      # It's still not found. Now this is an unrecoverable error.
36488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36489$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36490      has_space=`$ECHO "$complete" | $GREP " "`
36491      if test "x$has_space" != x; then
36492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36494      fi
36495      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36496    fi
36497  fi
36498
36499  # Now new_path has a complete unix path to the binary
36500  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36501    # Keep paths in /bin as-is, but remove trailing .exe if any
36502    new_path="${new_path/%.exe/}"
36503    # Do not save /bin paths to all_fixpath_prefixes!
36504  else
36505    # Not in mixed or Windows style, start by that.
36506    new_path=`cmd //c echo $new_path`
36507
36508  input_path="$new_path"
36509  # Check if we need to convert this using DOS-style short mode. If the path
36510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36511  # take no chances and rewrite it.
36512  # Note: m4 eats our [], so we need to use [ and ] instead.
36513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36514  if test "x$has_forbidden_chars" != x; then
36515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36516    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36517  fi
36518
36519    # Output is in $new_path
36520
36521  windows_path="$new_path"
36522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36523    unix_path=`$CYGPATH -u "$windows_path"`
36524    new_path="$unix_path"
36525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36527    new_path="$unix_path"
36528  fi
36529
36530    # remove trailing .exe if any
36531    new_path="${new_path/%.exe/}"
36532
36533    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36534    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36535  fi
36536
36537    else
36538      # We're on a unix platform. Hooray! :)
36539      # First separate the path from the arguments. This will split at the first
36540      # space.
36541      complete="$AS"
36542      path="${complete%% *}"
36543      tmp="$complete EOL"
36544      arguments="${tmp#* }"
36545
36546      # Cannot rely on the command "which" here since it doesn't always work.
36547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36548      if test -z "$is_absolute_path"; then
36549        # Path to executable is not absolute. Find it.
36550        IFS_save="$IFS"
36551        IFS=:
36552        for p in $PATH; do
36553          if test -f "$p/$path" && test -x "$p/$path"; then
36554            new_path="$p/$path"
36555            break
36556          fi
36557        done
36558        IFS="$IFS_save"
36559      else
36560        # This is an absolute path, we can use it without further modifications.
36561        new_path="$path"
36562      fi
36563
36564      if test "x$new_path" = x; then
36565        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36566$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36567        has_space=`$ECHO "$complete" | $GREP " "`
36568        if test "x$has_space" != x; then
36569          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36570$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36571        fi
36572        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36573      fi
36574    fi
36575
36576    # Now join together the path and the arguments once again
36577    if test "x$arguments" != xEOL; then
36578      new_complete="$new_path ${arguments% *}"
36579    else
36580      new_complete="$new_path"
36581    fi
36582
36583    if test "x$complete" != "x$new_complete"; then
36584      AS="$new_complete"
36585      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36586$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36587    fi
36588  fi
36589
36590  else
36591    # FIXME: is this correct for microsoft?
36592    AS="$CC -c"
36593  fi
36594
36595
36596  #
36597  # Setup the archiver (AR)
36598  #
36599  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36600    # The corresponding ar tool is lib.exe (used to create static libraries)
36601    # Extract the first word of "lib", so it can be a program name with args.
36602set dummy lib; ac_word=$2
36603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36604$as_echo_n "checking for $ac_word... " >&6; }
36605if ${ac_cv_prog_AR+:} false; then :
36606  $as_echo_n "(cached) " >&6
36607else
36608  if test -n "$AR"; then
36609  ac_cv_prog_AR="$AR" # Let the user override the test.
36610else
36611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36612for as_dir in $PATH
36613do
36614  IFS=$as_save_IFS
36615  test -z "$as_dir" && as_dir=.
36616    for ac_exec_ext in '' $ac_executable_extensions; do
36617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36618    ac_cv_prog_AR="lib"
36619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36620    break 2
36621  fi
36622done
36623  done
36624IFS=$as_save_IFS
36625
36626fi
36627fi
36628AR=$ac_cv_prog_AR
36629if test -n "$AR"; then
36630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36631$as_echo "$AR" >&6; }
36632else
36633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36634$as_echo "no" >&6; }
36635fi
36636
36637
36638  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36639
36640
36641  # Publish this variable in the help.
36642
36643
36644  if [ -z "${AR+x}" ]; then
36645    # The variable is not set by user, try to locate tool using the code snippet
36646    if test -n "$ac_tool_prefix"; then
36647  for ac_prog in ar gcc-ar
36648  do
36649    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36650set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36652$as_echo_n "checking for $ac_word... " >&6; }
36653if ${ac_cv_prog_AR+:} false; then :
36654  $as_echo_n "(cached) " >&6
36655else
36656  if test -n "$AR"; then
36657  ac_cv_prog_AR="$AR" # Let the user override the test.
36658else
36659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36660for as_dir in $PATH
36661do
36662  IFS=$as_save_IFS
36663  test -z "$as_dir" && as_dir=.
36664    for ac_exec_ext in '' $ac_executable_extensions; do
36665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36666    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36668    break 2
36669  fi
36670done
36671  done
36672IFS=$as_save_IFS
36673
36674fi
36675fi
36676AR=$ac_cv_prog_AR
36677if test -n "$AR"; then
36678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36679$as_echo "$AR" >&6; }
36680else
36681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36682$as_echo "no" >&6; }
36683fi
36684
36685
36686    test -n "$AR" && break
36687  done
36688fi
36689if test -z "$AR"; then
36690  ac_ct_AR=$AR
36691  for ac_prog in ar gcc-ar
36692do
36693  # Extract the first word of "$ac_prog", so it can be a program name with args.
36694set dummy $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_ac_ct_AR+:} false; then :
36698  $as_echo_n "(cached) " >&6
36699else
36700  if test -n "$ac_ct_AR"; then
36701  ac_cv_prog_ac_ct_AR="$ac_ct_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_ac_ct_AR="$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
36720ac_ct_AR=$ac_cv_prog_ac_ct_AR
36721if test -n "$ac_ct_AR"; then
36722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36723$as_echo "$ac_ct_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 "$ac_ct_AR" && break
36731done
36732
36733  if test "x$ac_ct_AR" = x; then
36734    AR=""
36735  else
36736    case $cross_compiling:$ac_tool_warned in
36737yes:)
36738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36740ac_tool_warned=yes ;;
36741esac
36742    AR=$ac_ct_AR
36743  fi
36744fi
36745
36746  else
36747    # The variable is set, but is it from the command line or the environment?
36748
36749    # Try to remove the string !AR! from our list.
36750    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36751    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36752      # If it failed, the variable was not from the command line. Ignore it,
36753      # but warn the user (except for BASH, which is always set by the calling BASH).
36754      if test "xAR" != xBASH; then
36755        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36756$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36757      fi
36758      # Try to locate tool using the code snippet
36759      if test -n "$ac_tool_prefix"; then
36760  for ac_prog in ar gcc-ar
36761  do
36762    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36763set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36765$as_echo_n "checking for $ac_word... " >&6; }
36766if ${ac_cv_prog_AR+:} false; then :
36767  $as_echo_n "(cached) " >&6
36768else
36769  if test -n "$AR"; then
36770  ac_cv_prog_AR="$AR" # Let the user override the test.
36771else
36772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36773for as_dir in $PATH
36774do
36775  IFS=$as_save_IFS
36776  test -z "$as_dir" && as_dir=.
36777    for ac_exec_ext in '' $ac_executable_extensions; do
36778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36779    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36781    break 2
36782  fi
36783done
36784  done
36785IFS=$as_save_IFS
36786
36787fi
36788fi
36789AR=$ac_cv_prog_AR
36790if test -n "$AR"; then
36791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36792$as_echo "$AR" >&6; }
36793else
36794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36795$as_echo "no" >&6; }
36796fi
36797
36798
36799    test -n "$AR" && break
36800  done
36801fi
36802if test -z "$AR"; then
36803  ac_ct_AR=$AR
36804  for ac_prog in ar gcc-ar
36805do
36806  # Extract the first word of "$ac_prog", so it can be a program name with args.
36807set dummy $ac_prog; ac_word=$2
36808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36809$as_echo_n "checking for $ac_word... " >&6; }
36810if ${ac_cv_prog_ac_ct_AR+:} false; then :
36811  $as_echo_n "(cached) " >&6
36812else
36813  if test -n "$ac_ct_AR"; then
36814  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36815else
36816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36817for as_dir in $PATH
36818do
36819  IFS=$as_save_IFS
36820  test -z "$as_dir" && as_dir=.
36821    for ac_exec_ext in '' $ac_executable_extensions; do
36822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36823    ac_cv_prog_ac_ct_AR="$ac_prog"
36824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36825    break 2
36826  fi
36827done
36828  done
36829IFS=$as_save_IFS
36830
36831fi
36832fi
36833ac_ct_AR=$ac_cv_prog_ac_ct_AR
36834if test -n "$ac_ct_AR"; then
36835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36836$as_echo "$ac_ct_AR" >&6; }
36837else
36838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36839$as_echo "no" >&6; }
36840fi
36841
36842
36843  test -n "$ac_ct_AR" && break
36844done
36845
36846  if test "x$ac_ct_AR" = x; then
36847    AR=""
36848  else
36849    case $cross_compiling:$ac_tool_warned in
36850yes:)
36851{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36852$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36853ac_tool_warned=yes ;;
36854esac
36855    AR=$ac_ct_AR
36856  fi
36857fi
36858
36859    else
36860      # If it succeeded, then it was overridden by the user. We will use it
36861      # for the tool.
36862
36863      # First remove it from the list of overridden variables, so we can test
36864      # for unknown variables in the end.
36865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36866
36867      # Check if we try to supply an empty value
36868      if test "x$AR" = x; then
36869        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36870$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36872$as_echo_n "checking for AR... " >&6; }
36873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36874$as_echo "disabled" >&6; }
36875      else
36876        # Check if the provided tool contains a complete path.
36877        tool_specified="$AR"
36878        tool_basename="${tool_specified##*/}"
36879        if test "x$tool_basename" = "x$tool_specified"; then
36880          # A command without a complete path is provided, search $PATH.
36881          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36882$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36883          # Extract the first word of "$tool_basename", so it can be a program name with args.
36884set dummy $tool_basename; ac_word=$2
36885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36886$as_echo_n "checking for $ac_word... " >&6; }
36887if ${ac_cv_path_AR+:} false; then :
36888  $as_echo_n "(cached) " >&6
36889else
36890  case $AR in
36891  [\\/]* | ?:[\\/]*)
36892  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36893  ;;
36894  *)
36895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36896for as_dir in $PATH
36897do
36898  IFS=$as_save_IFS
36899  test -z "$as_dir" && as_dir=.
36900    for ac_exec_ext in '' $ac_executable_extensions; do
36901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36902    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36904    break 2
36905  fi
36906done
36907  done
36908IFS=$as_save_IFS
36909
36910  ;;
36911esac
36912fi
36913AR=$ac_cv_path_AR
36914if test -n "$AR"; then
36915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36916$as_echo "$AR" >&6; }
36917else
36918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36919$as_echo "no" >&6; }
36920fi
36921
36922
36923          if test "x$AR" = x; then
36924            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36925          fi
36926        else
36927          # Otherwise we believe it is a complete path. Use it as it is.
36928          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36929$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36930          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36931$as_echo_n "checking for AR... " >&6; }
36932          if test ! -x "$tool_specified"; then
36933            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36934$as_echo "not found" >&6; }
36935            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36936          fi
36937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36938$as_echo "$tool_specified" >&6; }
36939        fi
36940      fi
36941    fi
36942
36943  fi
36944
36945
36946  else
36947
36948
36949  # Publish this variable in the help.
36950
36951
36952  if [ -z "${AR+x}" ]; then
36953    # The variable is not set by user, try to locate tool using the code snippet
36954    if test -n "$ac_tool_prefix"; then
36955  for ac_prog in ar
36956  do
36957    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36958set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36960$as_echo_n "checking for $ac_word... " >&6; }
36961if ${ac_cv_prog_AR+:} false; then :
36962  $as_echo_n "(cached) " >&6
36963else
36964  if test -n "$AR"; then
36965  ac_cv_prog_AR="$AR" # Let the user override the test.
36966else
36967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36968for as_dir in $PATH
36969do
36970  IFS=$as_save_IFS
36971  test -z "$as_dir" && as_dir=.
36972    for ac_exec_ext in '' $ac_executable_extensions; do
36973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36974    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36976    break 2
36977  fi
36978done
36979  done
36980IFS=$as_save_IFS
36981
36982fi
36983fi
36984AR=$ac_cv_prog_AR
36985if test -n "$AR"; then
36986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36987$as_echo "$AR" >&6; }
36988else
36989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36990$as_echo "no" >&6; }
36991fi
36992
36993
36994    test -n "$AR" && break
36995  done
36996fi
36997if test -z "$AR"; then
36998  ac_ct_AR=$AR
36999  for ac_prog in ar
37000do
37001  # Extract the first word of "$ac_prog", so it can be a program name with args.
37002set dummy $ac_prog; ac_word=$2
37003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37004$as_echo_n "checking for $ac_word... " >&6; }
37005if ${ac_cv_prog_ac_ct_AR+:} false; then :
37006  $as_echo_n "(cached) " >&6
37007else
37008  if test -n "$ac_ct_AR"; then
37009  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37010else
37011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37012for as_dir in $PATH
37013do
37014  IFS=$as_save_IFS
37015  test -z "$as_dir" && as_dir=.
37016    for ac_exec_ext in '' $ac_executable_extensions; do
37017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37018    ac_cv_prog_ac_ct_AR="$ac_prog"
37019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37020    break 2
37021  fi
37022done
37023  done
37024IFS=$as_save_IFS
37025
37026fi
37027fi
37028ac_ct_AR=$ac_cv_prog_ac_ct_AR
37029if test -n "$ac_ct_AR"; then
37030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37031$as_echo "$ac_ct_AR" >&6; }
37032else
37033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37034$as_echo "no" >&6; }
37035fi
37036
37037
37038  test -n "$ac_ct_AR" && break
37039done
37040
37041  if test "x$ac_ct_AR" = x; then
37042    AR=""
37043  else
37044    case $cross_compiling:$ac_tool_warned in
37045yes:)
37046{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37047$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37048ac_tool_warned=yes ;;
37049esac
37050    AR=$ac_ct_AR
37051  fi
37052fi
37053
37054  else
37055    # The variable is set, but is it from the command line or the environment?
37056
37057    # Try to remove the string !AR! from our list.
37058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37060      # If it failed, the variable was not from the command line. Ignore it,
37061      # but warn the user (except for BASH, which is always set by the calling BASH).
37062      if test "xAR" != xBASH; then
37063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37064$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37065      fi
37066      # Try to locate tool using the code snippet
37067      if test -n "$ac_tool_prefix"; then
37068  for ac_prog in ar
37069  do
37070    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37071set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37073$as_echo_n "checking for $ac_word... " >&6; }
37074if ${ac_cv_prog_AR+:} false; then :
37075  $as_echo_n "(cached) " >&6
37076else
37077  if test -n "$AR"; then
37078  ac_cv_prog_AR="$AR" # Let the user override the test.
37079else
37080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37081for as_dir in $PATH
37082do
37083  IFS=$as_save_IFS
37084  test -z "$as_dir" && as_dir=.
37085    for ac_exec_ext in '' $ac_executable_extensions; do
37086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37087    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37089    break 2
37090  fi
37091done
37092  done
37093IFS=$as_save_IFS
37094
37095fi
37096fi
37097AR=$ac_cv_prog_AR
37098if test -n "$AR"; then
37099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37100$as_echo "$AR" >&6; }
37101else
37102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37103$as_echo "no" >&6; }
37104fi
37105
37106
37107    test -n "$AR" && break
37108  done
37109fi
37110if test -z "$AR"; then
37111  ac_ct_AR=$AR
37112  for ac_prog in ar
37113do
37114  # Extract the first word of "$ac_prog", so it can be a program name with args.
37115set dummy $ac_prog; ac_word=$2
37116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37117$as_echo_n "checking for $ac_word... " >&6; }
37118if ${ac_cv_prog_ac_ct_AR+:} false; then :
37119  $as_echo_n "(cached) " >&6
37120else
37121  if test -n "$ac_ct_AR"; then
37122  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37123else
37124as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37125for as_dir in $PATH
37126do
37127  IFS=$as_save_IFS
37128  test -z "$as_dir" && as_dir=.
37129    for ac_exec_ext in '' $ac_executable_extensions; do
37130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37131    ac_cv_prog_ac_ct_AR="$ac_prog"
37132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37133    break 2
37134  fi
37135done
37136  done
37137IFS=$as_save_IFS
37138
37139fi
37140fi
37141ac_ct_AR=$ac_cv_prog_ac_ct_AR
37142if test -n "$ac_ct_AR"; then
37143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37144$as_echo "$ac_ct_AR" >&6; }
37145else
37146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37147$as_echo "no" >&6; }
37148fi
37149
37150
37151  test -n "$ac_ct_AR" && break
37152done
37153
37154  if test "x$ac_ct_AR" = x; then
37155    AR=""
37156  else
37157    case $cross_compiling:$ac_tool_warned in
37158yes:)
37159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37161ac_tool_warned=yes ;;
37162esac
37163    AR=$ac_ct_AR
37164  fi
37165fi
37166
37167    else
37168      # If it succeeded, then it was overridden by the user. We will use it
37169      # for the tool.
37170
37171      # First remove it from the list of overridden variables, so we can test
37172      # for unknown variables in the end.
37173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37174
37175      # Check if we try to supply an empty value
37176      if test "x$AR" = x; then
37177        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37178$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37180$as_echo_n "checking for AR... " >&6; }
37181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37182$as_echo "disabled" >&6; }
37183      else
37184        # Check if the provided tool contains a complete path.
37185        tool_specified="$AR"
37186        tool_basename="${tool_specified##*/}"
37187        if test "x$tool_basename" = "x$tool_specified"; then
37188          # A command without a complete path is provided, search $PATH.
37189          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37190$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37191          # Extract the first word of "$tool_basename", so it can be a program name with args.
37192set dummy $tool_basename; ac_word=$2
37193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37194$as_echo_n "checking for $ac_word... " >&6; }
37195if ${ac_cv_path_AR+:} false; then :
37196  $as_echo_n "(cached) " >&6
37197else
37198  case $AR in
37199  [\\/]* | ?:[\\/]*)
37200  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37201  ;;
37202  *)
37203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37204for as_dir in $PATH
37205do
37206  IFS=$as_save_IFS
37207  test -z "$as_dir" && as_dir=.
37208    for ac_exec_ext in '' $ac_executable_extensions; do
37209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37210    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37212    break 2
37213  fi
37214done
37215  done
37216IFS=$as_save_IFS
37217
37218  ;;
37219esac
37220fi
37221AR=$ac_cv_path_AR
37222if test -n "$AR"; then
37223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37224$as_echo "$AR" >&6; }
37225else
37226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37227$as_echo "no" >&6; }
37228fi
37229
37230
37231          if test "x$AR" = x; then
37232            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37233          fi
37234        else
37235          # Otherwise we believe it is a complete path. Use it as it is.
37236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37237$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37238          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37239$as_echo_n "checking for AR... " >&6; }
37240          if test ! -x "$tool_specified"; then
37241            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37242$as_echo "not found" >&6; }
37243            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37244          fi
37245          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37246$as_echo "$tool_specified" >&6; }
37247        fi
37248      fi
37249    fi
37250
37251  fi
37252
37253
37254  fi
37255
37256  # Only process if variable expands to non-empty
37257
37258  if test "x$AR" != x; then
37259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37260
37261  # First separate the path from the arguments. This will split at the first
37262  # space.
37263  complete="$AR"
37264  path="${complete%% *}"
37265  tmp="$complete EOL"
37266  arguments="${tmp#* }"
37267
37268  # Input might be given as Windows format, start by converting to
37269  # unix format.
37270  new_path=`$CYGPATH -u "$path"`
37271
37272  # Now try to locate executable using which
37273  new_path=`$WHICH "$new_path" 2> /dev/null`
37274  # bat and cmd files are not always considered executable in cygwin causing which
37275  # to not find them
37276  if test "x$new_path" = x \
37277      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37278      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37279    new_path=`$CYGPATH -u "$path"`
37280  fi
37281  if test "x$new_path" = x; then
37282    # Oops. Which didn't find the executable.
37283    # The splitting of arguments from the executable at a space might have been incorrect,
37284    # since paths with space are more likely in Windows. Give it another try with the whole
37285    # argument.
37286    path="$complete"
37287    arguments="EOL"
37288    new_path=`$CYGPATH -u "$path"`
37289    new_path=`$WHICH "$new_path" 2> /dev/null`
37290    # bat and cmd files are not always considered executable in cygwin causing which
37291    # to not find them
37292    if test "x$new_path" = x \
37293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37295      new_path=`$CYGPATH -u "$path"`
37296    fi
37297    if test "x$new_path" = x; then
37298      # It's still not found. Now this is an unrecoverable error.
37299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37300$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37301      has_space=`$ECHO "$complete" | $GREP " "`
37302      if test "x$has_space" != x; then
37303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37305      fi
37306      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37307    fi
37308  fi
37309
37310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37313  # "foo.exe" is OK but "foo" is an error.
37314  #
37315  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37316  # It is also a way to make sure we got the proper file name for the real test later on.
37317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37318  if test "x$test_shortpath" = x; then
37319    # Short path failed, file does not exist as specified.
37320    # Try adding .exe or .cmd
37321    if test -f "${new_path}.exe"; then
37322      input_to_shortpath="${new_path}.exe"
37323    elif test -f "${new_path}.cmd"; then
37324      input_to_shortpath="${new_path}.cmd"
37325    else
37326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37327$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37328      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37329$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37330      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37331    fi
37332  else
37333    input_to_shortpath="$new_path"
37334  fi
37335
37336  # Call helper function which possibly converts this using DOS-style short mode.
37337  # If so, the updated path is stored in $new_path.
37338  new_path="$input_to_shortpath"
37339
37340  input_path="$input_to_shortpath"
37341  # Check if we need to convert this using DOS-style short mode. If the path
37342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37343  # take no chances and rewrite it.
37344  # Note: m4 eats our [], so we need to use [ and ] instead.
37345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37346  if test "x$has_forbidden_chars" != x; then
37347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37351      # Going to short mode and back again did indeed matter. Since short mode is
37352      # case insensitive, let's make it lowercase to improve readability.
37353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37354      # Now convert it back to Unix-style (cygpath)
37355      input_path=`$CYGPATH -u "$shortmode_path"`
37356      new_path="$input_path"
37357    fi
37358  fi
37359
37360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37361  if test "x$test_cygdrive_prefix" = x; then
37362    # As a simple fix, exclude /usr/bin since it's not a real path.
37363    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37365      # a path prefixed by /cygdrive for fixpath to work.
37366      new_path="$CYGWIN_ROOT_PATH$input_path"
37367    fi
37368  fi
37369
37370  # remove trailing .exe if any
37371  new_path="${new_path/%.exe/}"
37372
37373    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37374
37375  # First separate the path from the arguments. This will split at the first
37376  # space.
37377  complete="$AR"
37378  path="${complete%% *}"
37379  tmp="$complete EOL"
37380  arguments="${tmp#* }"
37381
37382  # Input might be given as Windows format, start by converting to
37383  # unix format.
37384  new_path="$path"
37385
37386  windows_path="$new_path"
37387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37388    unix_path=`$CYGPATH -u "$windows_path"`
37389    new_path="$unix_path"
37390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37392    new_path="$unix_path"
37393  fi
37394
37395
37396  # Now try to locate executable using which
37397  new_path=`$WHICH "$new_path" 2> /dev/null`
37398
37399  if test "x$new_path" = x; then
37400    # Oops. Which didn't find the executable.
37401    # The splitting of arguments from the executable at a space might have been incorrect,
37402    # since paths with space are more likely in Windows. Give it another try with the whole
37403    # argument.
37404    path="$complete"
37405    arguments="EOL"
37406    new_path="$path"
37407
37408  windows_path="$new_path"
37409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37410    unix_path=`$CYGPATH -u "$windows_path"`
37411    new_path="$unix_path"
37412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37414    new_path="$unix_path"
37415  fi
37416
37417
37418    new_path=`$WHICH "$new_path" 2> /dev/null`
37419    # bat and cmd files are not always considered executable in MSYS causing which
37420    # to not find them
37421    if test "x$new_path" = x \
37422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37424      new_path="$path"
37425
37426  windows_path="$new_path"
37427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37428    unix_path=`$CYGPATH -u "$windows_path"`
37429    new_path="$unix_path"
37430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37432    new_path="$unix_path"
37433  fi
37434
37435    fi
37436
37437    if test "x$new_path" = x; then
37438      # It's still not found. Now this is an unrecoverable error.
37439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37440$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37441      has_space=`$ECHO "$complete" | $GREP " "`
37442      if test "x$has_space" != x; then
37443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37445      fi
37446      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37447    fi
37448  fi
37449
37450  # Now new_path has a complete unix path to the binary
37451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37452    # Keep paths in /bin as-is, but remove trailing .exe if any
37453    new_path="${new_path/%.exe/}"
37454    # Do not save /bin paths to all_fixpath_prefixes!
37455  else
37456    # Not in mixed or Windows style, start by that.
37457    new_path=`cmd //c echo $new_path`
37458
37459  input_path="$new_path"
37460  # Check if we need to convert this using DOS-style short mode. If the path
37461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37462  # take no chances and rewrite it.
37463  # Note: m4 eats our [], so we need to use [ and ] instead.
37464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37465  if test "x$has_forbidden_chars" != x; then
37466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37468  fi
37469
37470    # Output is in $new_path
37471
37472  windows_path="$new_path"
37473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37474    unix_path=`$CYGPATH -u "$windows_path"`
37475    new_path="$unix_path"
37476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37478    new_path="$unix_path"
37479  fi
37480
37481    # remove trailing .exe if any
37482    new_path="${new_path/%.exe/}"
37483
37484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37486  fi
37487
37488    else
37489      # We're on a unix platform. Hooray! :)
37490      # First separate the path from the arguments. This will split at the first
37491      # space.
37492      complete="$AR"
37493      path="${complete%% *}"
37494      tmp="$complete EOL"
37495      arguments="${tmp#* }"
37496
37497      # Cannot rely on the command "which" here since it doesn't always work.
37498      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37499      if test -z "$is_absolute_path"; then
37500        # Path to executable is not absolute. Find it.
37501        IFS_save="$IFS"
37502        IFS=:
37503        for p in $PATH; do
37504          if test -f "$p/$path" && test -x "$p/$path"; then
37505            new_path="$p/$path"
37506            break
37507          fi
37508        done
37509        IFS="$IFS_save"
37510      else
37511        # This is an absolute path, we can use it without further modifications.
37512        new_path="$path"
37513      fi
37514
37515      if test "x$new_path" = x; then
37516        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37517$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37518        has_space=`$ECHO "$complete" | $GREP " "`
37519        if test "x$has_space" != x; then
37520          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37521$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37522        fi
37523        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37524      fi
37525    fi
37526
37527    # Now join together the path and the arguments once again
37528    if test "x$arguments" != xEOL; then
37529      new_complete="$new_path ${arguments% *}"
37530    else
37531      new_complete="$new_path"
37532    fi
37533
37534    if test "x$complete" != "x$new_complete"; then
37535      AR="$new_complete"
37536      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37537$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37538    fi
37539  fi
37540
37541
37542
37543  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37544
37545
37546  # Publish this variable in the help.
37547
37548
37549  if [ -z "${LIPO+x}" ]; then
37550    # The variable is not set by user, try to locate tool using the code snippet
37551    for ac_prog in lipo
37552do
37553  # Extract the first word of "$ac_prog", so it can be a program name with args.
37554set dummy $ac_prog; ac_word=$2
37555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37556$as_echo_n "checking for $ac_word... " >&6; }
37557if ${ac_cv_path_LIPO+:} false; then :
37558  $as_echo_n "(cached) " >&6
37559else
37560  case $LIPO in
37561  [\\/]* | ?:[\\/]*)
37562  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37563  ;;
37564  *)
37565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37566for as_dir in $PATH
37567do
37568  IFS=$as_save_IFS
37569  test -z "$as_dir" && as_dir=.
37570    for ac_exec_ext in '' $ac_executable_extensions; do
37571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37572    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37574    break 2
37575  fi
37576done
37577  done
37578IFS=$as_save_IFS
37579
37580  ;;
37581esac
37582fi
37583LIPO=$ac_cv_path_LIPO
37584if test -n "$LIPO"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37586$as_echo "$LIPO" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593  test -n "$LIPO" && break
37594done
37595
37596  else
37597    # The variable is set, but is it from the command line or the environment?
37598
37599    # Try to remove the string !LIPO! from our list.
37600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37602      # If it failed, the variable was not from the command line. Ignore it,
37603      # but warn the user (except for BASH, which is always set by the calling BASH).
37604      if test "xLIPO" != xBASH; then
37605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37606$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37607      fi
37608      # Try to locate tool using the code snippet
37609      for ac_prog in lipo
37610do
37611  # Extract the first word of "$ac_prog", so it can be a program name with args.
37612set dummy $ac_prog; ac_word=$2
37613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37614$as_echo_n "checking for $ac_word... " >&6; }
37615if ${ac_cv_path_LIPO+:} false; then :
37616  $as_echo_n "(cached) " >&6
37617else
37618  case $LIPO in
37619  [\\/]* | ?:[\\/]*)
37620  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37621  ;;
37622  *)
37623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37624for as_dir in $PATH
37625do
37626  IFS=$as_save_IFS
37627  test -z "$as_dir" && as_dir=.
37628    for ac_exec_ext in '' $ac_executable_extensions; do
37629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37630    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37632    break 2
37633  fi
37634done
37635  done
37636IFS=$as_save_IFS
37637
37638  ;;
37639esac
37640fi
37641LIPO=$ac_cv_path_LIPO
37642if test -n "$LIPO"; then
37643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37644$as_echo "$LIPO" >&6; }
37645else
37646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37647$as_echo "no" >&6; }
37648fi
37649
37650
37651  test -n "$LIPO" && break
37652done
37653
37654    else
37655      # If it succeeded, then it was overridden by the user. We will use it
37656      # for the tool.
37657
37658      # First remove it from the list of overridden variables, so we can test
37659      # for unknown variables in the end.
37660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37661
37662      # Check if we try to supply an empty value
37663      if test "x$LIPO" = x; then
37664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37665$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37667$as_echo_n "checking for LIPO... " >&6; }
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37669$as_echo "disabled" >&6; }
37670      else
37671        # Check if the provided tool contains a complete path.
37672        tool_specified="$LIPO"
37673        tool_basename="${tool_specified##*/}"
37674        if test "x$tool_basename" = "x$tool_specified"; then
37675          # A command without a complete path is provided, search $PATH.
37676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37677$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37678          # Extract the first word of "$tool_basename", so it can be a program name with args.
37679set dummy $tool_basename; ac_word=$2
37680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37681$as_echo_n "checking for $ac_word... " >&6; }
37682if ${ac_cv_path_LIPO+:} false; then :
37683  $as_echo_n "(cached) " >&6
37684else
37685  case $LIPO in
37686  [\\/]* | ?:[\\/]*)
37687  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37688  ;;
37689  *)
37690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37691for as_dir in $PATH
37692do
37693  IFS=$as_save_IFS
37694  test -z "$as_dir" && as_dir=.
37695    for ac_exec_ext in '' $ac_executable_extensions; do
37696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37697    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37699    break 2
37700  fi
37701done
37702  done
37703IFS=$as_save_IFS
37704
37705  ;;
37706esac
37707fi
37708LIPO=$ac_cv_path_LIPO
37709if test -n "$LIPO"; then
37710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37711$as_echo "$LIPO" >&6; }
37712else
37713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37714$as_echo "no" >&6; }
37715fi
37716
37717
37718          if test "x$LIPO" = x; then
37719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37720          fi
37721        else
37722          # Otherwise we believe it is a complete path. Use it as it is.
37723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37724$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37726$as_echo_n "checking for LIPO... " >&6; }
37727          if test ! -x "$tool_specified"; then
37728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37729$as_echo "not found" >&6; }
37730            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37731          fi
37732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37733$as_echo "$tool_specified" >&6; }
37734        fi
37735      fi
37736    fi
37737
37738  fi
37739
37740
37741
37742  # Only process if variable expands to non-empty
37743
37744  if test "x$LIPO" != x; then
37745    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37746
37747  # First separate the path from the arguments. This will split at the first
37748  # space.
37749  complete="$LIPO"
37750  path="${complete%% *}"
37751  tmp="$complete EOL"
37752  arguments="${tmp#* }"
37753
37754  # Input might be given as Windows format, start by converting to
37755  # unix format.
37756  new_path=`$CYGPATH -u "$path"`
37757
37758  # Now try to locate executable using which
37759  new_path=`$WHICH "$new_path" 2> /dev/null`
37760  # bat and cmd files are not always considered executable in cygwin causing which
37761  # to not find them
37762  if test "x$new_path" = x \
37763      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37764      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37765    new_path=`$CYGPATH -u "$path"`
37766  fi
37767  if test "x$new_path" = x; then
37768    # Oops. Which didn't find the executable.
37769    # The splitting of arguments from the executable at a space might have been incorrect,
37770    # since paths with space are more likely in Windows. Give it another try with the whole
37771    # argument.
37772    path="$complete"
37773    arguments="EOL"
37774    new_path=`$CYGPATH -u "$path"`
37775    new_path=`$WHICH "$new_path" 2> /dev/null`
37776    # bat and cmd files are not always considered executable in cygwin causing which
37777    # to not find them
37778    if test "x$new_path" = x \
37779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37781      new_path=`$CYGPATH -u "$path"`
37782    fi
37783    if test "x$new_path" = x; then
37784      # It's still not found. Now this is an unrecoverable error.
37785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37786$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37787      has_space=`$ECHO "$complete" | $GREP " "`
37788      if test "x$has_space" != x; then
37789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37791      fi
37792      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37793    fi
37794  fi
37795
37796  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37797  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37798  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37799  # "foo.exe" is OK but "foo" is an error.
37800  #
37801  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37802  # It is also a way to make sure we got the proper file name for the real test later on.
37803  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37804  if test "x$test_shortpath" = x; then
37805    # Short path failed, file does not exist as specified.
37806    # Try adding .exe or .cmd
37807    if test -f "${new_path}.exe"; then
37808      input_to_shortpath="${new_path}.exe"
37809    elif test -f "${new_path}.cmd"; then
37810      input_to_shortpath="${new_path}.cmd"
37811    else
37812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37813$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37814      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37815$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37816      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37817    fi
37818  else
37819    input_to_shortpath="$new_path"
37820  fi
37821
37822  # Call helper function which possibly converts this using DOS-style short mode.
37823  # If so, the updated path is stored in $new_path.
37824  new_path="$input_to_shortpath"
37825
37826  input_path="$input_to_shortpath"
37827  # Check if we need to convert this using DOS-style short mode. If the path
37828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37829  # take no chances and rewrite it.
37830  # Note: m4 eats our [], so we need to use [ and ] instead.
37831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37832  if test "x$has_forbidden_chars" != x; then
37833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37837      # Going to short mode and back again did indeed matter. Since short mode is
37838      # case insensitive, let's make it lowercase to improve readability.
37839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37840      # Now convert it back to Unix-style (cygpath)
37841      input_path=`$CYGPATH -u "$shortmode_path"`
37842      new_path="$input_path"
37843    fi
37844  fi
37845
37846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37847  if test "x$test_cygdrive_prefix" = x; then
37848    # As a simple fix, exclude /usr/bin since it's not a real path.
37849    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37851      # a path prefixed by /cygdrive for fixpath to work.
37852      new_path="$CYGWIN_ROOT_PATH$input_path"
37853    fi
37854  fi
37855
37856  # remove trailing .exe if any
37857  new_path="${new_path/%.exe/}"
37858
37859    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37860
37861  # First separate the path from the arguments. This will split at the first
37862  # space.
37863  complete="$LIPO"
37864  path="${complete%% *}"
37865  tmp="$complete EOL"
37866  arguments="${tmp#* }"
37867
37868  # Input might be given as Windows format, start by converting to
37869  # unix format.
37870  new_path="$path"
37871
37872  windows_path="$new_path"
37873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37874    unix_path=`$CYGPATH -u "$windows_path"`
37875    new_path="$unix_path"
37876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37878    new_path="$unix_path"
37879  fi
37880
37881
37882  # Now try to locate executable using which
37883  new_path=`$WHICH "$new_path" 2> /dev/null`
37884
37885  if test "x$new_path" = x; then
37886    # Oops. Which didn't find the executable.
37887    # The splitting of arguments from the executable at a space might have been incorrect,
37888    # since paths with space are more likely in Windows. Give it another try with the whole
37889    # argument.
37890    path="$complete"
37891    arguments="EOL"
37892    new_path="$path"
37893
37894  windows_path="$new_path"
37895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37896    unix_path=`$CYGPATH -u "$windows_path"`
37897    new_path="$unix_path"
37898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37900    new_path="$unix_path"
37901  fi
37902
37903
37904    new_path=`$WHICH "$new_path" 2> /dev/null`
37905    # bat and cmd files are not always considered executable in MSYS causing which
37906    # to not find them
37907    if test "x$new_path" = x \
37908        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37909        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37910      new_path="$path"
37911
37912  windows_path="$new_path"
37913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37914    unix_path=`$CYGPATH -u "$windows_path"`
37915    new_path="$unix_path"
37916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37918    new_path="$unix_path"
37919  fi
37920
37921    fi
37922
37923    if test "x$new_path" = x; then
37924      # It's still not found. Now this is an unrecoverable error.
37925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37926$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37927      has_space=`$ECHO "$complete" | $GREP " "`
37928      if test "x$has_space" != x; then
37929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37931      fi
37932      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37933    fi
37934  fi
37935
37936  # Now new_path has a complete unix path to the binary
37937  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37938    # Keep paths in /bin as-is, but remove trailing .exe if any
37939    new_path="${new_path/%.exe/}"
37940    # Do not save /bin paths to all_fixpath_prefixes!
37941  else
37942    # Not in mixed or Windows style, start by that.
37943    new_path=`cmd //c echo $new_path`
37944
37945  input_path="$new_path"
37946  # Check if we need to convert this using DOS-style short mode. If the path
37947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37948  # take no chances and rewrite it.
37949  # Note: m4 eats our [], so we need to use [ and ] instead.
37950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37951  if test "x$has_forbidden_chars" != x; then
37952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37954  fi
37955
37956    # Output is in $new_path
37957
37958  windows_path="$new_path"
37959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37960    unix_path=`$CYGPATH -u "$windows_path"`
37961    new_path="$unix_path"
37962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37964    new_path="$unix_path"
37965  fi
37966
37967    # remove trailing .exe if any
37968    new_path="${new_path/%.exe/}"
37969
37970    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37971    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37972  fi
37973
37974    else
37975      # We're on a unix platform. Hooray! :)
37976      # First separate the path from the arguments. This will split at the first
37977      # space.
37978      complete="$LIPO"
37979      path="${complete%% *}"
37980      tmp="$complete EOL"
37981      arguments="${tmp#* }"
37982
37983      # Cannot rely on the command "which" here since it doesn't always work.
37984      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37985      if test -z "$is_absolute_path"; then
37986        # Path to executable is not absolute. Find it.
37987        IFS_save="$IFS"
37988        IFS=:
37989        for p in $PATH; do
37990          if test -f "$p/$path" && test -x "$p/$path"; then
37991            new_path="$p/$path"
37992            break
37993          fi
37994        done
37995        IFS="$IFS_save"
37996      else
37997        # This is an absolute path, we can use it without further modifications.
37998        new_path="$path"
37999      fi
38000
38001      if test "x$new_path" = x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38003$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38004        has_space=`$ECHO "$complete" | $GREP " "`
38005        if test "x$has_space" != x; then
38006          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38007$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38008        fi
38009        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38010      fi
38011    fi
38012
38013    # Now join together the path and the arguments once again
38014    if test "x$arguments" != xEOL; then
38015      new_complete="$new_path ${arguments% *}"
38016    else
38017      new_complete="$new_path"
38018    fi
38019
38020    if test "x$complete" != "x$new_complete"; then
38021      LIPO="$new_complete"
38022      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38023$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38024    fi
38025  fi
38026
38027  fi
38028
38029  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38030    # Extract the first word of "mt", so it can be a program name with args.
38031set dummy mt; ac_word=$2
38032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38033$as_echo_n "checking for $ac_word... " >&6; }
38034if ${ac_cv_prog_MT+:} false; then :
38035  $as_echo_n "(cached) " >&6
38036else
38037  if test -n "$MT"; then
38038  ac_cv_prog_MT="$MT" # Let the user override the test.
38039else
38040  ac_prog_rejected=no
38041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38042for as_dir in $PATH
38043do
38044  IFS=$as_save_IFS
38045  test -z "$as_dir" && as_dir=.
38046    for ac_exec_ext in '' $ac_executable_extensions; do
38047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38048    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38049       ac_prog_rejected=yes
38050       continue
38051     fi
38052    ac_cv_prog_MT="mt"
38053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38054    break 2
38055  fi
38056done
38057  done
38058IFS=$as_save_IFS
38059
38060if test $ac_prog_rejected = yes; then
38061  # We found a bogon in the path, so make sure we never use it.
38062  set dummy $ac_cv_prog_MT
38063  shift
38064  if test $# != 0; then
38065    # We chose a different compiler from the bogus one.
38066    # However, it has the same basename, so the bogon will be chosen
38067    # first if we set MT to just the basename; use the full file name.
38068    shift
38069    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38070  fi
38071fi
38072fi
38073fi
38074MT=$ac_cv_prog_MT
38075if test -n "$MT"; then
38076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38077$as_echo "$MT" >&6; }
38078else
38079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38080$as_echo "no" >&6; }
38081fi
38082
38083
38084
38085  # Only process if variable expands to non-empty
38086
38087  if test "x$MT" != x; then
38088    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38089
38090  # First separate the path from the arguments. This will split at the first
38091  # space.
38092  complete="$MT"
38093  path="${complete%% *}"
38094  tmp="$complete EOL"
38095  arguments="${tmp#* }"
38096
38097  # Input might be given as Windows format, start by converting to
38098  # unix format.
38099  new_path=`$CYGPATH -u "$path"`
38100
38101  # Now try to locate executable using which
38102  new_path=`$WHICH "$new_path" 2> /dev/null`
38103  # bat and cmd files are not always considered executable in cygwin causing which
38104  # to not find them
38105  if test "x$new_path" = x \
38106      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38107      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38108    new_path=`$CYGPATH -u "$path"`
38109  fi
38110  if test "x$new_path" = x; then
38111    # Oops. Which didn't find the executable.
38112    # The splitting of arguments from the executable at a space might have been incorrect,
38113    # since paths with space are more likely in Windows. Give it another try with the whole
38114    # argument.
38115    path="$complete"
38116    arguments="EOL"
38117    new_path=`$CYGPATH -u "$path"`
38118    new_path=`$WHICH "$new_path" 2> /dev/null`
38119    # bat and cmd files are not always considered executable in cygwin causing which
38120    # to not find them
38121    if test "x$new_path" = x \
38122        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38123        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38124      new_path=`$CYGPATH -u "$path"`
38125    fi
38126    if test "x$new_path" = x; then
38127      # It's still not found. Now this is an unrecoverable error.
38128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38129$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38130      has_space=`$ECHO "$complete" | $GREP " "`
38131      if test "x$has_space" != x; then
38132        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38133$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38134      fi
38135      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38136    fi
38137  fi
38138
38139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38142  # "foo.exe" is OK but "foo" is an error.
38143  #
38144  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38145  # It is also a way to make sure we got the proper file name for the real test later on.
38146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38147  if test "x$test_shortpath" = x; then
38148    # Short path failed, file does not exist as specified.
38149    # Try adding .exe or .cmd
38150    if test -f "${new_path}.exe"; then
38151      input_to_shortpath="${new_path}.exe"
38152    elif test -f "${new_path}.cmd"; then
38153      input_to_shortpath="${new_path}.cmd"
38154    else
38155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38156$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38157      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38158$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38159      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38160    fi
38161  else
38162    input_to_shortpath="$new_path"
38163  fi
38164
38165  # Call helper function which possibly converts this using DOS-style short mode.
38166  # If so, the updated path is stored in $new_path.
38167  new_path="$input_to_shortpath"
38168
38169  input_path="$input_to_shortpath"
38170  # Check if we need to convert this using DOS-style short mode. If the path
38171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38172  # take no chances and rewrite it.
38173  # Note: m4 eats our [], so we need to use [ and ] instead.
38174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38175  if test "x$has_forbidden_chars" != x; then
38176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38180      # Going to short mode and back again did indeed matter. Since short mode is
38181      # case insensitive, let's make it lowercase to improve readability.
38182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38183      # Now convert it back to Unix-style (cygpath)
38184      input_path=`$CYGPATH -u "$shortmode_path"`
38185      new_path="$input_path"
38186    fi
38187  fi
38188
38189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38190  if test "x$test_cygdrive_prefix" = x; then
38191    # As a simple fix, exclude /usr/bin since it's not a real path.
38192    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38194      # a path prefixed by /cygdrive for fixpath to work.
38195      new_path="$CYGWIN_ROOT_PATH$input_path"
38196    fi
38197  fi
38198
38199  # remove trailing .exe if any
38200  new_path="${new_path/%.exe/}"
38201
38202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38203
38204  # First separate the path from the arguments. This will split at the first
38205  # space.
38206  complete="$MT"
38207  path="${complete%% *}"
38208  tmp="$complete EOL"
38209  arguments="${tmp#* }"
38210
38211  # Input might be given as Windows format, start by converting to
38212  # unix format.
38213  new_path="$path"
38214
38215  windows_path="$new_path"
38216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38217    unix_path=`$CYGPATH -u "$windows_path"`
38218    new_path="$unix_path"
38219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38221    new_path="$unix_path"
38222  fi
38223
38224
38225  # Now try to locate executable using which
38226  new_path=`$WHICH "$new_path" 2> /dev/null`
38227
38228  if test "x$new_path" = x; then
38229    # Oops. Which didn't find the executable.
38230    # The splitting of arguments from the executable at a space might have been incorrect,
38231    # since paths with space are more likely in Windows. Give it another try with the whole
38232    # argument.
38233    path="$complete"
38234    arguments="EOL"
38235    new_path="$path"
38236
38237  windows_path="$new_path"
38238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38239    unix_path=`$CYGPATH -u "$windows_path"`
38240    new_path="$unix_path"
38241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38243    new_path="$unix_path"
38244  fi
38245
38246
38247    new_path=`$WHICH "$new_path" 2> /dev/null`
38248    # bat and cmd files are not always considered executable in MSYS causing which
38249    # to not find them
38250    if test "x$new_path" = x \
38251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38253      new_path="$path"
38254
38255  windows_path="$new_path"
38256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38257    unix_path=`$CYGPATH -u "$windows_path"`
38258    new_path="$unix_path"
38259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38261    new_path="$unix_path"
38262  fi
38263
38264    fi
38265
38266    if test "x$new_path" = x; then
38267      # It's still not found. Now this is an unrecoverable error.
38268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38269$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38270      has_space=`$ECHO "$complete" | $GREP " "`
38271      if test "x$has_space" != x; then
38272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38274      fi
38275      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38276    fi
38277  fi
38278
38279  # Now new_path has a complete unix path to the binary
38280  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38281    # Keep paths in /bin as-is, but remove trailing .exe if any
38282    new_path="${new_path/%.exe/}"
38283    # Do not save /bin paths to all_fixpath_prefixes!
38284  else
38285    # Not in mixed or Windows style, start by that.
38286    new_path=`cmd //c echo $new_path`
38287
38288  input_path="$new_path"
38289  # Check if we need to convert this using DOS-style short mode. If the path
38290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38291  # take no chances and rewrite it.
38292  # Note: m4 eats our [], so we need to use [ and ] instead.
38293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38294  if test "x$has_forbidden_chars" != x; then
38295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38297  fi
38298
38299    # Output is in $new_path
38300
38301  windows_path="$new_path"
38302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38303    unix_path=`$CYGPATH -u "$windows_path"`
38304    new_path="$unix_path"
38305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38307    new_path="$unix_path"
38308  fi
38309
38310    # remove trailing .exe if any
38311    new_path="${new_path/%.exe/}"
38312
38313    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38314    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38315  fi
38316
38317    else
38318      # We're on a unix platform. Hooray! :)
38319      # First separate the path from the arguments. This will split at the first
38320      # space.
38321      complete="$MT"
38322      path="${complete%% *}"
38323      tmp="$complete EOL"
38324      arguments="${tmp#* }"
38325
38326      # Cannot rely on the command "which" here since it doesn't always work.
38327      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38328      if test -z "$is_absolute_path"; then
38329        # Path to executable is not absolute. Find it.
38330        IFS_save="$IFS"
38331        IFS=:
38332        for p in $PATH; do
38333          if test -f "$p/$path" && test -x "$p/$path"; then
38334            new_path="$p/$path"
38335            break
38336          fi
38337        done
38338        IFS="$IFS_save"
38339      else
38340        # This is an absolute path, we can use it without further modifications.
38341        new_path="$path"
38342      fi
38343
38344      if test "x$new_path" = x; then
38345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38346$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38347        has_space=`$ECHO "$complete" | $GREP " "`
38348        if test "x$has_space" != x; then
38349          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38350$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38351        fi
38352        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38353      fi
38354    fi
38355
38356    # Now join together the path and the arguments once again
38357    if test "x$arguments" != xEOL; then
38358      new_complete="$new_path ${arguments% *}"
38359    else
38360      new_complete="$new_path"
38361    fi
38362
38363    if test "x$complete" != "x$new_complete"; then
38364      MT="$new_complete"
38365      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38366$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38367    fi
38368  fi
38369
38370    # Setup the resource compiler (RC)
38371    # Extract the first word of "rc", so it can be a program name with args.
38372set dummy rc; ac_word=$2
38373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38374$as_echo_n "checking for $ac_word... " >&6; }
38375if ${ac_cv_prog_RC+:} false; then :
38376  $as_echo_n "(cached) " >&6
38377else
38378  if test -n "$RC"; then
38379  ac_cv_prog_RC="$RC" # Let the user override the test.
38380else
38381  ac_prog_rejected=no
38382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38383for as_dir in $PATH
38384do
38385  IFS=$as_save_IFS
38386  test -z "$as_dir" && as_dir=.
38387    for ac_exec_ext in '' $ac_executable_extensions; do
38388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38389    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38390       ac_prog_rejected=yes
38391       continue
38392     fi
38393    ac_cv_prog_RC="rc"
38394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38395    break 2
38396  fi
38397done
38398  done
38399IFS=$as_save_IFS
38400
38401if test $ac_prog_rejected = yes; then
38402  # We found a bogon in the path, so make sure we never use it.
38403  set dummy $ac_cv_prog_RC
38404  shift
38405  if test $# != 0; then
38406    # We chose a different compiler from the bogus one.
38407    # However, it has the same basename, so the bogon will be chosen
38408    # first if we set RC to just the basename; use the full file name.
38409    shift
38410    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38411  fi
38412fi
38413fi
38414fi
38415RC=$ac_cv_prog_RC
38416if test -n "$RC"; then
38417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38418$as_echo "$RC" >&6; }
38419else
38420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38421$as_echo "no" >&6; }
38422fi
38423
38424
38425
38426  # Only process if variable expands to non-empty
38427
38428  if test "x$RC" != x; then
38429    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38430
38431  # First separate the path from the arguments. This will split at the first
38432  # space.
38433  complete="$RC"
38434  path="${complete%% *}"
38435  tmp="$complete EOL"
38436  arguments="${tmp#* }"
38437
38438  # Input might be given as Windows format, start by converting to
38439  # unix format.
38440  new_path=`$CYGPATH -u "$path"`
38441
38442  # Now try to locate executable using which
38443  new_path=`$WHICH "$new_path" 2> /dev/null`
38444  # bat and cmd files are not always considered executable in cygwin causing which
38445  # to not find them
38446  if test "x$new_path" = x \
38447      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38448      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38449    new_path=`$CYGPATH -u "$path"`
38450  fi
38451  if test "x$new_path" = x; then
38452    # Oops. Which didn't find the executable.
38453    # The splitting of arguments from the executable at a space might have been incorrect,
38454    # since paths with space are more likely in Windows. Give it another try with the whole
38455    # argument.
38456    path="$complete"
38457    arguments="EOL"
38458    new_path=`$CYGPATH -u "$path"`
38459    new_path=`$WHICH "$new_path" 2> /dev/null`
38460    # bat and cmd files are not always considered executable in cygwin causing which
38461    # to not find them
38462    if test "x$new_path" = x \
38463        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38464        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38465      new_path=`$CYGPATH -u "$path"`
38466    fi
38467    if test "x$new_path" = x; then
38468      # It's still not found. Now this is an unrecoverable error.
38469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38470$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38471      has_space=`$ECHO "$complete" | $GREP " "`
38472      if test "x$has_space" != x; then
38473        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38474$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38475      fi
38476      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38477    fi
38478  fi
38479
38480  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38481  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38482  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38483  # "foo.exe" is OK but "foo" is an error.
38484  #
38485  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38486  # It is also a way to make sure we got the proper file name for the real test later on.
38487  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38488  if test "x$test_shortpath" = x; then
38489    # Short path failed, file does not exist as specified.
38490    # Try adding .exe or .cmd
38491    if test -f "${new_path}.exe"; then
38492      input_to_shortpath="${new_path}.exe"
38493    elif test -f "${new_path}.cmd"; then
38494      input_to_shortpath="${new_path}.cmd"
38495    else
38496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38497$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38498      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38499$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38500      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38501    fi
38502  else
38503    input_to_shortpath="$new_path"
38504  fi
38505
38506  # Call helper function which possibly converts this using DOS-style short mode.
38507  # If so, the updated path is stored in $new_path.
38508  new_path="$input_to_shortpath"
38509
38510  input_path="$input_to_shortpath"
38511  # Check if we need to convert this using DOS-style short mode. If the path
38512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38513  # take no chances and rewrite it.
38514  # Note: m4 eats our [], so we need to use [ and ] instead.
38515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38516  if test "x$has_forbidden_chars" != x; then
38517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38521      # Going to short mode and back again did indeed matter. Since short mode is
38522      # case insensitive, let's make it lowercase to improve readability.
38523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38524      # Now convert it back to Unix-style (cygpath)
38525      input_path=`$CYGPATH -u "$shortmode_path"`
38526      new_path="$input_path"
38527    fi
38528  fi
38529
38530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38531  if test "x$test_cygdrive_prefix" = x; then
38532    # As a simple fix, exclude /usr/bin since it's not a real path.
38533    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38535      # a path prefixed by /cygdrive for fixpath to work.
38536      new_path="$CYGWIN_ROOT_PATH$input_path"
38537    fi
38538  fi
38539
38540  # remove trailing .exe if any
38541  new_path="${new_path/%.exe/}"
38542
38543    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38544
38545  # First separate the path from the arguments. This will split at the first
38546  # space.
38547  complete="$RC"
38548  path="${complete%% *}"
38549  tmp="$complete EOL"
38550  arguments="${tmp#* }"
38551
38552  # Input might be given as Windows format, start by converting to
38553  # unix format.
38554  new_path="$path"
38555
38556  windows_path="$new_path"
38557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38558    unix_path=`$CYGPATH -u "$windows_path"`
38559    new_path="$unix_path"
38560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38562    new_path="$unix_path"
38563  fi
38564
38565
38566  # Now try to locate executable using which
38567  new_path=`$WHICH "$new_path" 2> /dev/null`
38568
38569  if test "x$new_path" = x; then
38570    # Oops. Which didn't find the executable.
38571    # The splitting of arguments from the executable at a space might have been incorrect,
38572    # since paths with space are more likely in Windows. Give it another try with the whole
38573    # argument.
38574    path="$complete"
38575    arguments="EOL"
38576    new_path="$path"
38577
38578  windows_path="$new_path"
38579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38580    unix_path=`$CYGPATH -u "$windows_path"`
38581    new_path="$unix_path"
38582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38584    new_path="$unix_path"
38585  fi
38586
38587
38588    new_path=`$WHICH "$new_path" 2> /dev/null`
38589    # bat and cmd files are not always considered executable in MSYS causing which
38590    # to not find them
38591    if test "x$new_path" = x \
38592        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38593        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38594      new_path="$path"
38595
38596  windows_path="$new_path"
38597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38598    unix_path=`$CYGPATH -u "$windows_path"`
38599    new_path="$unix_path"
38600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38602    new_path="$unix_path"
38603  fi
38604
38605    fi
38606
38607    if test "x$new_path" = x; then
38608      # It's still not found. Now this is an unrecoverable error.
38609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38610$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38611      has_space=`$ECHO "$complete" | $GREP " "`
38612      if test "x$has_space" != x; then
38613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38615      fi
38616      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38617    fi
38618  fi
38619
38620  # Now new_path has a complete unix path to the binary
38621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38622    # Keep paths in /bin as-is, but remove trailing .exe if any
38623    new_path="${new_path/%.exe/}"
38624    # Do not save /bin paths to all_fixpath_prefixes!
38625  else
38626    # Not in mixed or Windows style, start by that.
38627    new_path=`cmd //c echo $new_path`
38628
38629  input_path="$new_path"
38630  # Check if we need to convert this using DOS-style short mode. If the path
38631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38632  # take no chances and rewrite it.
38633  # Note: m4 eats our [], so we need to use [ and ] instead.
38634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38635  if test "x$has_forbidden_chars" != x; then
38636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38638  fi
38639
38640    # Output is in $new_path
38641
38642  windows_path="$new_path"
38643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38644    unix_path=`$CYGPATH -u "$windows_path"`
38645    new_path="$unix_path"
38646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38648    new_path="$unix_path"
38649  fi
38650
38651    # remove trailing .exe if any
38652    new_path="${new_path/%.exe/}"
38653
38654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38656  fi
38657
38658    else
38659      # We're on a unix platform. Hooray! :)
38660      # First separate the path from the arguments. This will split at the first
38661      # space.
38662      complete="$RC"
38663      path="${complete%% *}"
38664      tmp="$complete EOL"
38665      arguments="${tmp#* }"
38666
38667      # Cannot rely on the command "which" here since it doesn't always work.
38668      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38669      if test -z "$is_absolute_path"; then
38670        # Path to executable is not absolute. Find it.
38671        IFS_save="$IFS"
38672        IFS=:
38673        for p in $PATH; do
38674          if test -f "$p/$path" && test -x "$p/$path"; then
38675            new_path="$p/$path"
38676            break
38677          fi
38678        done
38679        IFS="$IFS_save"
38680      else
38681        # This is an absolute path, we can use it without further modifications.
38682        new_path="$path"
38683      fi
38684
38685      if test "x$new_path" = x; then
38686        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38687$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38688        has_space=`$ECHO "$complete" | $GREP " "`
38689        if test "x$has_space" != x; then
38690          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38692        fi
38693        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38694      fi
38695    fi
38696
38697    # Now join together the path and the arguments once again
38698    if test "x$arguments" != xEOL; then
38699      new_complete="$new_path ${arguments% *}"
38700    else
38701      new_complete="$new_path"
38702    fi
38703
38704    if test "x$complete" != "x$new_complete"; then
38705      RC="$new_complete"
38706      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38707$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38708    fi
38709  fi
38710
38711    # Extract the first word of "dumpbin", so it can be a program name with args.
38712set dummy dumpbin; ac_word=$2
38713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38714$as_echo_n "checking for $ac_word... " >&6; }
38715if ${ac_cv_prog_DUMPBIN+:} false; then :
38716  $as_echo_n "(cached) " >&6
38717else
38718  if test -n "$DUMPBIN"; then
38719  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38720else
38721as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38722for as_dir in $PATH
38723do
38724  IFS=$as_save_IFS
38725  test -z "$as_dir" && as_dir=.
38726    for ac_exec_ext in '' $ac_executable_extensions; do
38727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38728    ac_cv_prog_DUMPBIN="dumpbin"
38729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38730    break 2
38731  fi
38732done
38733  done
38734IFS=$as_save_IFS
38735
38736fi
38737fi
38738DUMPBIN=$ac_cv_prog_DUMPBIN
38739if test -n "$DUMPBIN"; then
38740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38741$as_echo "$DUMPBIN" >&6; }
38742else
38743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38744$as_echo "no" >&6; }
38745fi
38746
38747
38748
38749  # Only process if variable expands to non-empty
38750
38751  if test "x$DUMPBIN" != x; then
38752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753
38754  # First separate the path from the arguments. This will split at the first
38755  # space.
38756  complete="$DUMPBIN"
38757  path="${complete%% *}"
38758  tmp="$complete EOL"
38759  arguments="${tmp#* }"
38760
38761  # Input might be given as Windows format, start by converting to
38762  # unix format.
38763  new_path=`$CYGPATH -u "$path"`
38764
38765  # Now try to locate executable using which
38766  new_path=`$WHICH "$new_path" 2> /dev/null`
38767  # bat and cmd files are not always considered executable in cygwin causing which
38768  # to not find them
38769  if test "x$new_path" = x \
38770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38772    new_path=`$CYGPATH -u "$path"`
38773  fi
38774  if test "x$new_path" = x; then
38775    # Oops. Which didn't find the executable.
38776    # The splitting of arguments from the executable at a space might have been incorrect,
38777    # since paths with space are more likely in Windows. Give it another try with the whole
38778    # argument.
38779    path="$complete"
38780    arguments="EOL"
38781    new_path=`$CYGPATH -u "$path"`
38782    new_path=`$WHICH "$new_path" 2> /dev/null`
38783    # bat and cmd files are not always considered executable in cygwin causing which
38784    # to not find them
38785    if test "x$new_path" = x \
38786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38788      new_path=`$CYGPATH -u "$path"`
38789    fi
38790    if test "x$new_path" = x; then
38791      # It's still not found. Now this is an unrecoverable error.
38792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38793$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38794      has_space=`$ECHO "$complete" | $GREP " "`
38795      if test "x$has_space" != x; then
38796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38798      fi
38799      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38800    fi
38801  fi
38802
38803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38806  # "foo.exe" is OK but "foo" is an error.
38807  #
38808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38809  # It is also a way to make sure we got the proper file name for the real test later on.
38810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38811  if test "x$test_shortpath" = x; then
38812    # Short path failed, file does not exist as specified.
38813    # Try adding .exe or .cmd
38814    if test -f "${new_path}.exe"; then
38815      input_to_shortpath="${new_path}.exe"
38816    elif test -f "${new_path}.cmd"; then
38817      input_to_shortpath="${new_path}.cmd"
38818    else
38819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38820$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38823      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38824    fi
38825  else
38826    input_to_shortpath="$new_path"
38827  fi
38828
38829  # Call helper function which possibly converts this using DOS-style short mode.
38830  # If so, the updated path is stored in $new_path.
38831  new_path="$input_to_shortpath"
38832
38833  input_path="$input_to_shortpath"
38834  # Check if we need to convert this using DOS-style short mode. If the path
38835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38836  # take no chances and rewrite it.
38837  # Note: m4 eats our [], so we need to use [ and ] instead.
38838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38839  if test "x$has_forbidden_chars" != x; then
38840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38844      # Going to short mode and back again did indeed matter. Since short mode is
38845      # case insensitive, let's make it lowercase to improve readability.
38846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38847      # Now convert it back to Unix-style (cygpath)
38848      input_path=`$CYGPATH -u "$shortmode_path"`
38849      new_path="$input_path"
38850    fi
38851  fi
38852
38853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38854  if test "x$test_cygdrive_prefix" = x; then
38855    # As a simple fix, exclude /usr/bin since it's not a real path.
38856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38858      # a path prefixed by /cygdrive for fixpath to work.
38859      new_path="$CYGWIN_ROOT_PATH$input_path"
38860    fi
38861  fi
38862
38863  # remove trailing .exe if any
38864  new_path="${new_path/%.exe/}"
38865
38866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38867
38868  # First separate the path from the arguments. This will split at the first
38869  # space.
38870  complete="$DUMPBIN"
38871  path="${complete%% *}"
38872  tmp="$complete EOL"
38873  arguments="${tmp#* }"
38874
38875  # Input might be given as Windows format, start by converting to
38876  # unix format.
38877  new_path="$path"
38878
38879  windows_path="$new_path"
38880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38881    unix_path=`$CYGPATH -u "$windows_path"`
38882    new_path="$unix_path"
38883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38885    new_path="$unix_path"
38886  fi
38887
38888
38889  # Now try to locate executable using which
38890  new_path=`$WHICH "$new_path" 2> /dev/null`
38891
38892  if test "x$new_path" = x; then
38893    # Oops. Which didn't find the executable.
38894    # The splitting of arguments from the executable at a space might have been incorrect,
38895    # since paths with space are more likely in Windows. Give it another try with the whole
38896    # argument.
38897    path="$complete"
38898    arguments="EOL"
38899    new_path="$path"
38900
38901  windows_path="$new_path"
38902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38903    unix_path=`$CYGPATH -u "$windows_path"`
38904    new_path="$unix_path"
38905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38907    new_path="$unix_path"
38908  fi
38909
38910
38911    new_path=`$WHICH "$new_path" 2> /dev/null`
38912    # bat and cmd files are not always considered executable in MSYS causing which
38913    # to not find them
38914    if test "x$new_path" = x \
38915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38917      new_path="$path"
38918
38919  windows_path="$new_path"
38920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38921    unix_path=`$CYGPATH -u "$windows_path"`
38922    new_path="$unix_path"
38923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38925    new_path="$unix_path"
38926  fi
38927
38928    fi
38929
38930    if test "x$new_path" = x; then
38931      # It's still not found. Now this is an unrecoverable error.
38932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38933$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38934      has_space=`$ECHO "$complete" | $GREP " "`
38935      if test "x$has_space" != x; then
38936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38938      fi
38939      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38940    fi
38941  fi
38942
38943  # Now new_path has a complete unix path to the binary
38944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38945    # Keep paths in /bin as-is, but remove trailing .exe if any
38946    new_path="${new_path/%.exe/}"
38947    # Do not save /bin paths to all_fixpath_prefixes!
38948  else
38949    # Not in mixed or Windows style, start by that.
38950    new_path=`cmd //c echo $new_path`
38951
38952  input_path="$new_path"
38953  # Check if we need to convert this using DOS-style short mode. If the path
38954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38955  # take no chances and rewrite it.
38956  # Note: m4 eats our [], so we need to use [ and ] instead.
38957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38958  if test "x$has_forbidden_chars" != x; then
38959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38961  fi
38962
38963    # Output is in $new_path
38964
38965  windows_path="$new_path"
38966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38967    unix_path=`$CYGPATH -u "$windows_path"`
38968    new_path="$unix_path"
38969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38971    new_path="$unix_path"
38972  fi
38973
38974    # remove trailing .exe if any
38975    new_path="${new_path/%.exe/}"
38976
38977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38979  fi
38980
38981    else
38982      # We're on a unix platform. Hooray! :)
38983      # First separate the path from the arguments. This will split at the first
38984      # space.
38985      complete="$DUMPBIN"
38986      path="${complete%% *}"
38987      tmp="$complete EOL"
38988      arguments="${tmp#* }"
38989
38990      # Cannot rely on the command "which" here since it doesn't always work.
38991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38992      if test -z "$is_absolute_path"; then
38993        # Path to executable is not absolute. Find it.
38994        IFS_save="$IFS"
38995        IFS=:
38996        for p in $PATH; do
38997          if test -f "$p/$path" && test -x "$p/$path"; then
38998            new_path="$p/$path"
38999            break
39000          fi
39001        done
39002        IFS="$IFS_save"
39003      else
39004        # This is an absolute path, we can use it without further modifications.
39005        new_path="$path"
39006      fi
39007
39008      if test "x$new_path" = x; then
39009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39010$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39011        has_space=`$ECHO "$complete" | $GREP " "`
39012        if test "x$has_space" != x; then
39013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39015        fi
39016        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39017      fi
39018    fi
39019
39020    # Now join together the path and the arguments once again
39021    if test "x$arguments" != xEOL; then
39022      new_complete="$new_path ${arguments% *}"
39023    else
39024      new_complete="$new_path"
39025    fi
39026
39027    if test "x$complete" != "x$new_complete"; then
39028      DUMPBIN="$new_complete"
39029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39030$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39031    fi
39032  fi
39033
39034    # We need to check for 'msbuild.exe' because at the place where we expect to
39035    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39036    # won't find the 'msbuild.exe' executable in that case (and the
39037    # 'ac_executable_extensions' is unusable due to performance reasons).
39038    # Notice that we intentionally don't fix up the path to MSBUILD because we
39039    # will call it in a DOS shell during freetype detection on Windows (see
39040    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39041    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39042set dummy msbuild.exe; ac_word=$2
39043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39044$as_echo_n "checking for $ac_word... " >&6; }
39045if ${ac_cv_prog_MSBUILD+:} false; then :
39046  $as_echo_n "(cached) " >&6
39047else
39048  if test -n "$MSBUILD"; then
39049  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39050else
39051as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39052for as_dir in $PATH
39053do
39054  IFS=$as_save_IFS
39055  test -z "$as_dir" && as_dir=.
39056    for ac_exec_ext in '' $ac_executable_extensions; do
39057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39058    ac_cv_prog_MSBUILD="msbuild.exe"
39059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39060    break 2
39061  fi
39062done
39063  done
39064IFS=$as_save_IFS
39065
39066fi
39067fi
39068MSBUILD=$ac_cv_prog_MSBUILD
39069if test -n "$MSBUILD"; then
39070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39071$as_echo "$MSBUILD" >&6; }
39072else
39073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39074$as_echo "no" >&6; }
39075fi
39076
39077
39078  fi
39079
39080  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39081
39082
39083  # Publish this variable in the help.
39084
39085
39086  if [ -z "${STRIP+x}" ]; then
39087    # The variable is not set by user, try to locate tool using the code snippet
39088    for ac_prog in strip
39089do
39090  # Extract the first word of "$ac_prog", so it can be a program name with args.
39091set dummy $ac_prog; ac_word=$2
39092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39093$as_echo_n "checking for $ac_word... " >&6; }
39094if ${ac_cv_path_STRIP+:} false; then :
39095  $as_echo_n "(cached) " >&6
39096else
39097  case $STRIP in
39098  [\\/]* | ?:[\\/]*)
39099  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39100  ;;
39101  *)
39102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39103for as_dir in $PATH
39104do
39105  IFS=$as_save_IFS
39106  test -z "$as_dir" && as_dir=.
39107    for ac_exec_ext in '' $ac_executable_extensions; do
39108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39109    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39111    break 2
39112  fi
39113done
39114  done
39115IFS=$as_save_IFS
39116
39117  ;;
39118esac
39119fi
39120STRIP=$ac_cv_path_STRIP
39121if test -n "$STRIP"; then
39122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39123$as_echo "$STRIP" >&6; }
39124else
39125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39126$as_echo "no" >&6; }
39127fi
39128
39129
39130  test -n "$STRIP" && break
39131done
39132
39133  else
39134    # The variable is set, but is it from the command line or the environment?
39135
39136    # Try to remove the string !STRIP! from our list.
39137    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39138    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39139      # If it failed, the variable was not from the command line. Ignore it,
39140      # but warn the user (except for BASH, which is always set by the calling BASH).
39141      if test "xSTRIP" != xBASH; then
39142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39143$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39144      fi
39145      # Try to locate tool using the code snippet
39146      for ac_prog in strip
39147do
39148  # Extract the first word of "$ac_prog", so it can be a program name with args.
39149set dummy $ac_prog; ac_word=$2
39150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39151$as_echo_n "checking for $ac_word... " >&6; }
39152if ${ac_cv_path_STRIP+:} false; then :
39153  $as_echo_n "(cached) " >&6
39154else
39155  case $STRIP in
39156  [\\/]* | ?:[\\/]*)
39157  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39158  ;;
39159  *)
39160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39161for as_dir in $PATH
39162do
39163  IFS=$as_save_IFS
39164  test -z "$as_dir" && as_dir=.
39165    for ac_exec_ext in '' $ac_executable_extensions; do
39166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39167    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39169    break 2
39170  fi
39171done
39172  done
39173IFS=$as_save_IFS
39174
39175  ;;
39176esac
39177fi
39178STRIP=$ac_cv_path_STRIP
39179if test -n "$STRIP"; then
39180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39181$as_echo "$STRIP" >&6; }
39182else
39183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39184$as_echo "no" >&6; }
39185fi
39186
39187
39188  test -n "$STRIP" && break
39189done
39190
39191    else
39192      # If it succeeded, then it was overridden by the user. We will use it
39193      # for the tool.
39194
39195      # First remove it from the list of overridden variables, so we can test
39196      # for unknown variables in the end.
39197      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39198
39199      # Check if we try to supply an empty value
39200      if test "x$STRIP" = x; then
39201        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39202$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39204$as_echo_n "checking for STRIP... " >&6; }
39205        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39206$as_echo "disabled" >&6; }
39207      else
39208        # Check if the provided tool contains a complete path.
39209        tool_specified="$STRIP"
39210        tool_basename="${tool_specified##*/}"
39211        if test "x$tool_basename" = "x$tool_specified"; then
39212          # A command without a complete path is provided, search $PATH.
39213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39214$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39215          # Extract the first word of "$tool_basename", so it can be a program name with args.
39216set dummy $tool_basename; ac_word=$2
39217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39218$as_echo_n "checking for $ac_word... " >&6; }
39219if ${ac_cv_path_STRIP+:} false; then :
39220  $as_echo_n "(cached) " >&6
39221else
39222  case $STRIP in
39223  [\\/]* | ?:[\\/]*)
39224  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39225  ;;
39226  *)
39227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39228for as_dir in $PATH
39229do
39230  IFS=$as_save_IFS
39231  test -z "$as_dir" && as_dir=.
39232    for ac_exec_ext in '' $ac_executable_extensions; do
39233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39234    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39236    break 2
39237  fi
39238done
39239  done
39240IFS=$as_save_IFS
39241
39242  ;;
39243esac
39244fi
39245STRIP=$ac_cv_path_STRIP
39246if test -n "$STRIP"; then
39247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39248$as_echo "$STRIP" >&6; }
39249else
39250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39251$as_echo "no" >&6; }
39252fi
39253
39254
39255          if test "x$STRIP" = x; then
39256            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39257          fi
39258        else
39259          # Otherwise we believe it is a complete path. Use it as it is.
39260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39261$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39262          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39263$as_echo_n "checking for STRIP... " >&6; }
39264          if test ! -x "$tool_specified"; then
39265            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39266$as_echo "not found" >&6; }
39267            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39268          fi
39269          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39270$as_echo "$tool_specified" >&6; }
39271        fi
39272      fi
39273    fi
39274
39275  fi
39276
39277
39278
39279  # Only process if variable expands to non-empty
39280
39281  if test "x$STRIP" != x; then
39282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39283
39284  # First separate the path from the arguments. This will split at the first
39285  # space.
39286  complete="$STRIP"
39287  path="${complete%% *}"
39288  tmp="$complete EOL"
39289  arguments="${tmp#* }"
39290
39291  # Input might be given as Windows format, start by converting to
39292  # unix format.
39293  new_path=`$CYGPATH -u "$path"`
39294
39295  # Now try to locate executable using which
39296  new_path=`$WHICH "$new_path" 2> /dev/null`
39297  # bat and cmd files are not always considered executable in cygwin causing which
39298  # to not find them
39299  if test "x$new_path" = x \
39300      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39301      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39302    new_path=`$CYGPATH -u "$path"`
39303  fi
39304  if test "x$new_path" = x; then
39305    # Oops. Which didn't find the executable.
39306    # The splitting of arguments from the executable at a space might have been incorrect,
39307    # since paths with space are more likely in Windows. Give it another try with the whole
39308    # argument.
39309    path="$complete"
39310    arguments="EOL"
39311    new_path=`$CYGPATH -u "$path"`
39312    new_path=`$WHICH "$new_path" 2> /dev/null`
39313    # bat and cmd files are not always considered executable in cygwin causing which
39314    # to not find them
39315    if test "x$new_path" = x \
39316        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39317        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39318      new_path=`$CYGPATH -u "$path"`
39319    fi
39320    if test "x$new_path" = x; then
39321      # It's still not found. Now this is an unrecoverable error.
39322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39323$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39324      has_space=`$ECHO "$complete" | $GREP " "`
39325      if test "x$has_space" != x; then
39326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39328      fi
39329      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39330    fi
39331  fi
39332
39333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39336  # "foo.exe" is OK but "foo" is an error.
39337  #
39338  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39339  # It is also a way to make sure we got the proper file name for the real test later on.
39340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39341  if test "x$test_shortpath" = x; then
39342    # Short path failed, file does not exist as specified.
39343    # Try adding .exe or .cmd
39344    if test -f "${new_path}.exe"; then
39345      input_to_shortpath="${new_path}.exe"
39346    elif test -f "${new_path}.cmd"; then
39347      input_to_shortpath="${new_path}.cmd"
39348    else
39349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39350$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39351      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39352$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39353      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39354    fi
39355  else
39356    input_to_shortpath="$new_path"
39357  fi
39358
39359  # Call helper function which possibly converts this using DOS-style short mode.
39360  # If so, the updated path is stored in $new_path.
39361  new_path="$input_to_shortpath"
39362
39363  input_path="$input_to_shortpath"
39364  # Check if we need to convert this using DOS-style short mode. If the path
39365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39366  # take no chances and rewrite it.
39367  # Note: m4 eats our [], so we need to use [ and ] instead.
39368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39369  if test "x$has_forbidden_chars" != x; then
39370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39374      # Going to short mode and back again did indeed matter. Since short mode is
39375      # case insensitive, let's make it lowercase to improve readability.
39376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39377      # Now convert it back to Unix-style (cygpath)
39378      input_path=`$CYGPATH -u "$shortmode_path"`
39379      new_path="$input_path"
39380    fi
39381  fi
39382
39383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39384  if test "x$test_cygdrive_prefix" = x; then
39385    # As a simple fix, exclude /usr/bin since it's not a real path.
39386    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39388      # a path prefixed by /cygdrive for fixpath to work.
39389      new_path="$CYGWIN_ROOT_PATH$input_path"
39390    fi
39391  fi
39392
39393  # remove trailing .exe if any
39394  new_path="${new_path/%.exe/}"
39395
39396    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39397
39398  # First separate the path from the arguments. This will split at the first
39399  # space.
39400  complete="$STRIP"
39401  path="${complete%% *}"
39402  tmp="$complete EOL"
39403  arguments="${tmp#* }"
39404
39405  # Input might be given as Windows format, start by converting to
39406  # unix format.
39407  new_path="$path"
39408
39409  windows_path="$new_path"
39410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39411    unix_path=`$CYGPATH -u "$windows_path"`
39412    new_path="$unix_path"
39413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39415    new_path="$unix_path"
39416  fi
39417
39418
39419  # Now try to locate executable using which
39420  new_path=`$WHICH "$new_path" 2> /dev/null`
39421
39422  if test "x$new_path" = x; then
39423    # Oops. Which didn't find the executable.
39424    # The splitting of arguments from the executable at a space might have been incorrect,
39425    # since paths with space are more likely in Windows. Give it another try with the whole
39426    # argument.
39427    path="$complete"
39428    arguments="EOL"
39429    new_path="$path"
39430
39431  windows_path="$new_path"
39432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39433    unix_path=`$CYGPATH -u "$windows_path"`
39434    new_path="$unix_path"
39435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39437    new_path="$unix_path"
39438  fi
39439
39440
39441    new_path=`$WHICH "$new_path" 2> /dev/null`
39442    # bat and cmd files are not always considered executable in MSYS causing which
39443    # to not find them
39444    if test "x$new_path" = x \
39445        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39446        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39447      new_path="$path"
39448
39449  windows_path="$new_path"
39450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39451    unix_path=`$CYGPATH -u "$windows_path"`
39452    new_path="$unix_path"
39453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39455    new_path="$unix_path"
39456  fi
39457
39458    fi
39459
39460    if test "x$new_path" = x; then
39461      # It's still not found. Now this is an unrecoverable error.
39462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39463$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39464      has_space=`$ECHO "$complete" | $GREP " "`
39465      if test "x$has_space" != x; then
39466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39468      fi
39469      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39470    fi
39471  fi
39472
39473  # Now new_path has a complete unix path to the binary
39474  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39475    # Keep paths in /bin as-is, but remove trailing .exe if any
39476    new_path="${new_path/%.exe/}"
39477    # Do not save /bin paths to all_fixpath_prefixes!
39478  else
39479    # Not in mixed or Windows style, start by that.
39480    new_path=`cmd //c echo $new_path`
39481
39482  input_path="$new_path"
39483  # Check if we need to convert this using DOS-style short mode. If the path
39484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39485  # take no chances and rewrite it.
39486  # Note: m4 eats our [], so we need to use [ and ] instead.
39487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39488  if test "x$has_forbidden_chars" != x; then
39489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39491  fi
39492
39493    # Output is in $new_path
39494
39495  windows_path="$new_path"
39496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39497    unix_path=`$CYGPATH -u "$windows_path"`
39498    new_path="$unix_path"
39499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39501    new_path="$unix_path"
39502  fi
39503
39504    # remove trailing .exe if any
39505    new_path="${new_path/%.exe/}"
39506
39507    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39508    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39509  fi
39510
39511    else
39512      # We're on a unix platform. Hooray! :)
39513      # First separate the path from the arguments. This will split at the first
39514      # space.
39515      complete="$STRIP"
39516      path="${complete%% *}"
39517      tmp="$complete EOL"
39518      arguments="${tmp#* }"
39519
39520      # Cannot rely on the command "which" here since it doesn't always work.
39521      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39522      if test -z "$is_absolute_path"; then
39523        # Path to executable is not absolute. Find it.
39524        IFS_save="$IFS"
39525        IFS=:
39526        for p in $PATH; do
39527          if test -f "$p/$path" && test -x "$p/$path"; then
39528            new_path="$p/$path"
39529            break
39530          fi
39531        done
39532        IFS="$IFS_save"
39533      else
39534        # This is an absolute path, we can use it without further modifications.
39535        new_path="$path"
39536      fi
39537
39538      if test "x$new_path" = x; then
39539        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39540$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39541        has_space=`$ECHO "$complete" | $GREP " "`
39542        if test "x$has_space" != x; then
39543          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39544$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39545        fi
39546        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39547      fi
39548    fi
39549
39550    # Now join together the path and the arguments once again
39551    if test "x$arguments" != xEOL; then
39552      new_complete="$new_path ${arguments% *}"
39553    else
39554      new_complete="$new_path"
39555    fi
39556
39557    if test "x$complete" != "x$new_complete"; then
39558      STRIP="$new_complete"
39559      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39560$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39561    fi
39562  fi
39563
39564
39565
39566  # Publish this variable in the help.
39567
39568
39569  if [ -z "${NM+x}" ]; then
39570    # The variable is not set by user, try to locate tool using the code snippet
39571    for ac_prog in nm
39572do
39573  # Extract the first word of "$ac_prog", so it can be a program name with args.
39574set dummy $ac_prog; ac_word=$2
39575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39576$as_echo_n "checking for $ac_word... " >&6; }
39577if ${ac_cv_path_NM+:} false; then :
39578  $as_echo_n "(cached) " >&6
39579else
39580  case $NM in
39581  [\\/]* | ?:[\\/]*)
39582  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39583  ;;
39584  *)
39585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39586for as_dir in $PATH
39587do
39588  IFS=$as_save_IFS
39589  test -z "$as_dir" && as_dir=.
39590    for ac_exec_ext in '' $ac_executable_extensions; do
39591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39592    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39594    break 2
39595  fi
39596done
39597  done
39598IFS=$as_save_IFS
39599
39600  ;;
39601esac
39602fi
39603NM=$ac_cv_path_NM
39604if test -n "$NM"; then
39605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39606$as_echo "$NM" >&6; }
39607else
39608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39609$as_echo "no" >&6; }
39610fi
39611
39612
39613  test -n "$NM" && break
39614done
39615
39616  else
39617    # The variable is set, but is it from the command line or the environment?
39618
39619    # Try to remove the string !NM! from our list.
39620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39622      # If it failed, the variable was not from the command line. Ignore it,
39623      # but warn the user (except for BASH, which is always set by the calling BASH).
39624      if test "xNM" != xBASH; then
39625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39626$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39627      fi
39628      # Try to locate tool using the code snippet
39629      for ac_prog in nm
39630do
39631  # Extract the first word of "$ac_prog", so it can be a program name with args.
39632set dummy $ac_prog; ac_word=$2
39633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39634$as_echo_n "checking for $ac_word... " >&6; }
39635if ${ac_cv_path_NM+:} false; then :
39636  $as_echo_n "(cached) " >&6
39637else
39638  case $NM in
39639  [\\/]* | ?:[\\/]*)
39640  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39641  ;;
39642  *)
39643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39644for as_dir in $PATH
39645do
39646  IFS=$as_save_IFS
39647  test -z "$as_dir" && as_dir=.
39648    for ac_exec_ext in '' $ac_executable_extensions; do
39649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39650    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39652    break 2
39653  fi
39654done
39655  done
39656IFS=$as_save_IFS
39657
39658  ;;
39659esac
39660fi
39661NM=$ac_cv_path_NM
39662if test -n "$NM"; then
39663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39664$as_echo "$NM" >&6; }
39665else
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39667$as_echo "no" >&6; }
39668fi
39669
39670
39671  test -n "$NM" && break
39672done
39673
39674    else
39675      # If it succeeded, then it was overridden by the user. We will use it
39676      # for the tool.
39677
39678      # First remove it from the list of overridden variables, so we can test
39679      # for unknown variables in the end.
39680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39681
39682      # Check if we try to supply an empty value
39683      if test "x$NM" = x; then
39684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39685$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39687$as_echo_n "checking for NM... " >&6; }
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39689$as_echo "disabled" >&6; }
39690      else
39691        # Check if the provided tool contains a complete path.
39692        tool_specified="$NM"
39693        tool_basename="${tool_specified##*/}"
39694        if test "x$tool_basename" = "x$tool_specified"; then
39695          # A command without a complete path is provided, search $PATH.
39696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39697$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39698          # Extract the first word of "$tool_basename", so it can be a program name with args.
39699set dummy $tool_basename; ac_word=$2
39700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39701$as_echo_n "checking for $ac_word... " >&6; }
39702if ${ac_cv_path_NM+:} false; then :
39703  $as_echo_n "(cached) " >&6
39704else
39705  case $NM in
39706  [\\/]* | ?:[\\/]*)
39707  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39708  ;;
39709  *)
39710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39711for as_dir in $PATH
39712do
39713  IFS=$as_save_IFS
39714  test -z "$as_dir" && as_dir=.
39715    for ac_exec_ext in '' $ac_executable_extensions; do
39716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39717    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39719    break 2
39720  fi
39721done
39722  done
39723IFS=$as_save_IFS
39724
39725  ;;
39726esac
39727fi
39728NM=$ac_cv_path_NM
39729if test -n "$NM"; then
39730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39731$as_echo "$NM" >&6; }
39732else
39733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39734$as_echo "no" >&6; }
39735fi
39736
39737
39738          if test "x$NM" = x; then
39739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39740          fi
39741        else
39742          # Otherwise we believe it is a complete path. Use it as it is.
39743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39744$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39746$as_echo_n "checking for NM... " >&6; }
39747          if test ! -x "$tool_specified"; then
39748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39749$as_echo "not found" >&6; }
39750            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39751          fi
39752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39753$as_echo "$tool_specified" >&6; }
39754        fi
39755      fi
39756    fi
39757
39758  fi
39759
39760
39761
39762  # Only process if variable expands to non-empty
39763
39764  if test "x$NM" != x; then
39765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39766
39767  # First separate the path from the arguments. This will split at the first
39768  # space.
39769  complete="$NM"
39770  path="${complete%% *}"
39771  tmp="$complete EOL"
39772  arguments="${tmp#* }"
39773
39774  # Input might be given as Windows format, start by converting to
39775  # unix format.
39776  new_path=`$CYGPATH -u "$path"`
39777
39778  # Now try to locate executable using which
39779  new_path=`$WHICH "$new_path" 2> /dev/null`
39780  # bat and cmd files are not always considered executable in cygwin causing which
39781  # to not find them
39782  if test "x$new_path" = x \
39783      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39784      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39785    new_path=`$CYGPATH -u "$path"`
39786  fi
39787  if test "x$new_path" = x; then
39788    # Oops. Which didn't find the executable.
39789    # The splitting of arguments from the executable at a space might have been incorrect,
39790    # since paths with space are more likely in Windows. Give it another try with the whole
39791    # argument.
39792    path="$complete"
39793    arguments="EOL"
39794    new_path=`$CYGPATH -u "$path"`
39795    new_path=`$WHICH "$new_path" 2> /dev/null`
39796    # bat and cmd files are not always considered executable in cygwin causing which
39797    # to not find them
39798    if test "x$new_path" = x \
39799        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39800        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39801      new_path=`$CYGPATH -u "$path"`
39802    fi
39803    if test "x$new_path" = x; then
39804      # It's still not found. Now this is an unrecoverable error.
39805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39806$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39807      has_space=`$ECHO "$complete" | $GREP " "`
39808      if test "x$has_space" != x; then
39809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39811      fi
39812      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39813    fi
39814  fi
39815
39816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39819  # "foo.exe" is OK but "foo" is an error.
39820  #
39821  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39822  # It is also a way to make sure we got the proper file name for the real test later on.
39823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39824  if test "x$test_shortpath" = x; then
39825    # Short path failed, file does not exist as specified.
39826    # Try adding .exe or .cmd
39827    if test -f "${new_path}.exe"; then
39828      input_to_shortpath="${new_path}.exe"
39829    elif test -f "${new_path}.cmd"; then
39830      input_to_shortpath="${new_path}.cmd"
39831    else
39832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39833$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39834      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39835$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39836      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39837    fi
39838  else
39839    input_to_shortpath="$new_path"
39840  fi
39841
39842  # Call helper function which possibly converts this using DOS-style short mode.
39843  # If so, the updated path is stored in $new_path.
39844  new_path="$input_to_shortpath"
39845
39846  input_path="$input_to_shortpath"
39847  # Check if we need to convert this using DOS-style short mode. If the path
39848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39849  # take no chances and rewrite it.
39850  # Note: m4 eats our [], so we need to use [ and ] instead.
39851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39852  if test "x$has_forbidden_chars" != x; then
39853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39857      # Going to short mode and back again did indeed matter. Since short mode is
39858      # case insensitive, let's make it lowercase to improve readability.
39859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39860      # Now convert it back to Unix-style (cygpath)
39861      input_path=`$CYGPATH -u "$shortmode_path"`
39862      new_path="$input_path"
39863    fi
39864  fi
39865
39866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39867  if test "x$test_cygdrive_prefix" = x; then
39868    # As a simple fix, exclude /usr/bin since it's not a real path.
39869    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39871      # a path prefixed by /cygdrive for fixpath to work.
39872      new_path="$CYGWIN_ROOT_PATH$input_path"
39873    fi
39874  fi
39875
39876  # remove trailing .exe if any
39877  new_path="${new_path/%.exe/}"
39878
39879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39880
39881  # First separate the path from the arguments. This will split at the first
39882  # space.
39883  complete="$NM"
39884  path="${complete%% *}"
39885  tmp="$complete EOL"
39886  arguments="${tmp#* }"
39887
39888  # Input might be given as Windows format, start by converting to
39889  # unix format.
39890  new_path="$path"
39891
39892  windows_path="$new_path"
39893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39894    unix_path=`$CYGPATH -u "$windows_path"`
39895    new_path="$unix_path"
39896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39898    new_path="$unix_path"
39899  fi
39900
39901
39902  # Now try to locate executable using which
39903  new_path=`$WHICH "$new_path" 2> /dev/null`
39904
39905  if test "x$new_path" = x; then
39906    # Oops. Which didn't find the executable.
39907    # The splitting of arguments from the executable at a space might have been incorrect,
39908    # since paths with space are more likely in Windows. Give it another try with the whole
39909    # argument.
39910    path="$complete"
39911    arguments="EOL"
39912    new_path="$path"
39913
39914  windows_path="$new_path"
39915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39916    unix_path=`$CYGPATH -u "$windows_path"`
39917    new_path="$unix_path"
39918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39920    new_path="$unix_path"
39921  fi
39922
39923
39924    new_path=`$WHICH "$new_path" 2> /dev/null`
39925    # bat and cmd files are not always considered executable in MSYS causing which
39926    # to not find them
39927    if test "x$new_path" = x \
39928        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39929        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39930      new_path="$path"
39931
39932  windows_path="$new_path"
39933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39934    unix_path=`$CYGPATH -u "$windows_path"`
39935    new_path="$unix_path"
39936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39938    new_path="$unix_path"
39939  fi
39940
39941    fi
39942
39943    if test "x$new_path" = x; then
39944      # It's still not found. Now this is an unrecoverable error.
39945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39946$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39947      has_space=`$ECHO "$complete" | $GREP " "`
39948      if test "x$has_space" != x; then
39949        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39950$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39951      fi
39952      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39953    fi
39954  fi
39955
39956  # Now new_path has a complete unix path to the binary
39957  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39958    # Keep paths in /bin as-is, but remove trailing .exe if any
39959    new_path="${new_path/%.exe/}"
39960    # Do not save /bin paths to all_fixpath_prefixes!
39961  else
39962    # Not in mixed or Windows style, start by that.
39963    new_path=`cmd //c echo $new_path`
39964
39965  input_path="$new_path"
39966  # Check if we need to convert this using DOS-style short mode. If the path
39967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39968  # take no chances and rewrite it.
39969  # Note: m4 eats our [], so we need to use [ and ] instead.
39970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39971  if test "x$has_forbidden_chars" != x; then
39972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39974  fi
39975
39976    # Output is in $new_path
39977
39978  windows_path="$new_path"
39979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39980    unix_path=`$CYGPATH -u "$windows_path"`
39981    new_path="$unix_path"
39982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39983    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39984    new_path="$unix_path"
39985  fi
39986
39987    # remove trailing .exe if any
39988    new_path="${new_path/%.exe/}"
39989
39990    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39991    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39992  fi
39993
39994    else
39995      # We're on a unix platform. Hooray! :)
39996      # First separate the path from the arguments. This will split at the first
39997      # space.
39998      complete="$NM"
39999      path="${complete%% *}"
40000      tmp="$complete EOL"
40001      arguments="${tmp#* }"
40002
40003      # Cannot rely on the command "which" here since it doesn't always work.
40004      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40005      if test -z "$is_absolute_path"; then
40006        # Path to executable is not absolute. Find it.
40007        IFS_save="$IFS"
40008        IFS=:
40009        for p in $PATH; do
40010          if test -f "$p/$path" && test -x "$p/$path"; then
40011            new_path="$p/$path"
40012            break
40013          fi
40014        done
40015        IFS="$IFS_save"
40016      else
40017        # This is an absolute path, we can use it without further modifications.
40018        new_path="$path"
40019      fi
40020
40021      if test "x$new_path" = x; then
40022        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40023$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40024        has_space=`$ECHO "$complete" | $GREP " "`
40025        if test "x$has_space" != x; then
40026          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40027$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40028        fi
40029        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40030      fi
40031    fi
40032
40033    # Now join together the path and the arguments once again
40034    if test "x$arguments" != xEOL; then
40035      new_complete="$new_path ${arguments% *}"
40036    else
40037      new_complete="$new_path"
40038    fi
40039
40040    if test "x$complete" != "x$new_complete"; then
40041      NM="$new_complete"
40042      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40043$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40044    fi
40045  fi
40046
40047
40048
40049  # Publish this variable in the help.
40050
40051
40052  if [ -z "${GNM+x}" ]; then
40053    # The variable is not set by user, try to locate tool using the code snippet
40054    for ac_prog in gnm
40055do
40056  # Extract the first word of "$ac_prog", so it can be a program name with args.
40057set dummy $ac_prog; ac_word=$2
40058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40059$as_echo_n "checking for $ac_word... " >&6; }
40060if ${ac_cv_path_GNM+:} false; then :
40061  $as_echo_n "(cached) " >&6
40062else
40063  case $GNM in
40064  [\\/]* | ?:[\\/]*)
40065  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40066  ;;
40067  *)
40068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40069for as_dir in $PATH
40070do
40071  IFS=$as_save_IFS
40072  test -z "$as_dir" && as_dir=.
40073    for ac_exec_ext in '' $ac_executable_extensions; do
40074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40075    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40077    break 2
40078  fi
40079done
40080  done
40081IFS=$as_save_IFS
40082
40083  ;;
40084esac
40085fi
40086GNM=$ac_cv_path_GNM
40087if test -n "$GNM"; then
40088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40089$as_echo "$GNM" >&6; }
40090else
40091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40092$as_echo "no" >&6; }
40093fi
40094
40095
40096  test -n "$GNM" && break
40097done
40098
40099  else
40100    # The variable is set, but is it from the command line or the environment?
40101
40102    # Try to remove the string !GNM! from our list.
40103    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40104    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40105      # If it failed, the variable was not from the command line. Ignore it,
40106      # but warn the user (except for BASH, which is always set by the calling BASH).
40107      if test "xGNM" != xBASH; then
40108        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40109$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40110      fi
40111      # Try to locate tool using the code snippet
40112      for ac_prog in gnm
40113do
40114  # Extract the first word of "$ac_prog", so it can be a program name with args.
40115set dummy $ac_prog; ac_word=$2
40116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40117$as_echo_n "checking for $ac_word... " >&6; }
40118if ${ac_cv_path_GNM+:} false; then :
40119  $as_echo_n "(cached) " >&6
40120else
40121  case $GNM in
40122  [\\/]* | ?:[\\/]*)
40123  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40124  ;;
40125  *)
40126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40127for as_dir in $PATH
40128do
40129  IFS=$as_save_IFS
40130  test -z "$as_dir" && as_dir=.
40131    for ac_exec_ext in '' $ac_executable_extensions; do
40132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40133    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40135    break 2
40136  fi
40137done
40138  done
40139IFS=$as_save_IFS
40140
40141  ;;
40142esac
40143fi
40144GNM=$ac_cv_path_GNM
40145if test -n "$GNM"; then
40146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40147$as_echo "$GNM" >&6; }
40148else
40149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40150$as_echo "no" >&6; }
40151fi
40152
40153
40154  test -n "$GNM" && break
40155done
40156
40157    else
40158      # If it succeeded, then it was overridden by the user. We will use it
40159      # for the tool.
40160
40161      # First remove it from the list of overridden variables, so we can test
40162      # for unknown variables in the end.
40163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40164
40165      # Check if we try to supply an empty value
40166      if test "x$GNM" = x; then
40167        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40168$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40170$as_echo_n "checking for GNM... " >&6; }
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40172$as_echo "disabled" >&6; }
40173      else
40174        # Check if the provided tool contains a complete path.
40175        tool_specified="$GNM"
40176        tool_basename="${tool_specified##*/}"
40177        if test "x$tool_basename" = "x$tool_specified"; then
40178          # A command without a complete path is provided, search $PATH.
40179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40180$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40181          # Extract the first word of "$tool_basename", so it can be a program name with args.
40182set dummy $tool_basename; ac_word=$2
40183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40184$as_echo_n "checking for $ac_word... " >&6; }
40185if ${ac_cv_path_GNM+:} false; then :
40186  $as_echo_n "(cached) " >&6
40187else
40188  case $GNM in
40189  [\\/]* | ?:[\\/]*)
40190  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40191  ;;
40192  *)
40193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40194for as_dir in $PATH
40195do
40196  IFS=$as_save_IFS
40197  test -z "$as_dir" && as_dir=.
40198    for ac_exec_ext in '' $ac_executable_extensions; do
40199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40200    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40202    break 2
40203  fi
40204done
40205  done
40206IFS=$as_save_IFS
40207
40208  ;;
40209esac
40210fi
40211GNM=$ac_cv_path_GNM
40212if test -n "$GNM"; then
40213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40214$as_echo "$GNM" >&6; }
40215else
40216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40217$as_echo "no" >&6; }
40218fi
40219
40220
40221          if test "x$GNM" = x; then
40222            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40223          fi
40224        else
40225          # Otherwise we believe it is a complete path. Use it as it is.
40226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40227$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40228          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40229$as_echo_n "checking for GNM... " >&6; }
40230          if test ! -x "$tool_specified"; then
40231            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40232$as_echo "not found" >&6; }
40233            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40234          fi
40235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40236$as_echo "$tool_specified" >&6; }
40237        fi
40238      fi
40239    fi
40240
40241  fi
40242
40243
40244
40245  # Only process if variable expands to non-empty
40246
40247  if test "x$GNM" != x; then
40248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40249
40250  # First separate the path from the arguments. This will split at the first
40251  # space.
40252  complete="$GNM"
40253  path="${complete%% *}"
40254  tmp="$complete EOL"
40255  arguments="${tmp#* }"
40256
40257  # Input might be given as Windows format, start by converting to
40258  # unix format.
40259  new_path=`$CYGPATH -u "$path"`
40260
40261  # Now try to locate executable using which
40262  new_path=`$WHICH "$new_path" 2> /dev/null`
40263  # bat and cmd files are not always considered executable in cygwin causing which
40264  # to not find them
40265  if test "x$new_path" = x \
40266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40268    new_path=`$CYGPATH -u "$path"`
40269  fi
40270  if test "x$new_path" = x; then
40271    # Oops. Which didn't find the executable.
40272    # The splitting of arguments from the executable at a space might have been incorrect,
40273    # since paths with space are more likely in Windows. Give it another try with the whole
40274    # argument.
40275    path="$complete"
40276    arguments="EOL"
40277    new_path=`$CYGPATH -u "$path"`
40278    new_path=`$WHICH "$new_path" 2> /dev/null`
40279    # bat and cmd files are not always considered executable in cygwin causing which
40280    # to not find them
40281    if test "x$new_path" = x \
40282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40284      new_path=`$CYGPATH -u "$path"`
40285    fi
40286    if test "x$new_path" = x; then
40287      # It's still not found. Now this is an unrecoverable error.
40288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40289$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40290      has_space=`$ECHO "$complete" | $GREP " "`
40291      if test "x$has_space" != x; then
40292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40294      fi
40295      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40296    fi
40297  fi
40298
40299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40302  # "foo.exe" is OK but "foo" is an error.
40303  #
40304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40305  # It is also a way to make sure we got the proper file name for the real test later on.
40306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40307  if test "x$test_shortpath" = x; then
40308    # Short path failed, file does not exist as specified.
40309    # Try adding .exe or .cmd
40310    if test -f "${new_path}.exe"; then
40311      input_to_shortpath="${new_path}.exe"
40312    elif test -f "${new_path}.cmd"; then
40313      input_to_shortpath="${new_path}.cmd"
40314    else
40315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40316$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40319      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40320    fi
40321  else
40322    input_to_shortpath="$new_path"
40323  fi
40324
40325  # Call helper function which possibly converts this using DOS-style short mode.
40326  # If so, the updated path is stored in $new_path.
40327  new_path="$input_to_shortpath"
40328
40329  input_path="$input_to_shortpath"
40330  # Check if we need to convert this using DOS-style short mode. If the path
40331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40332  # take no chances and rewrite it.
40333  # Note: m4 eats our [], so we need to use [ and ] instead.
40334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40335  if test "x$has_forbidden_chars" != x; then
40336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40340      # Going to short mode and back again did indeed matter. Since short mode is
40341      # case insensitive, let's make it lowercase to improve readability.
40342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40343      # Now convert it back to Unix-style (cygpath)
40344      input_path=`$CYGPATH -u "$shortmode_path"`
40345      new_path="$input_path"
40346    fi
40347  fi
40348
40349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40350  if test "x$test_cygdrive_prefix" = x; then
40351    # As a simple fix, exclude /usr/bin since it's not a real path.
40352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40354      # a path prefixed by /cygdrive for fixpath to work.
40355      new_path="$CYGWIN_ROOT_PATH$input_path"
40356    fi
40357  fi
40358
40359  # remove trailing .exe if any
40360  new_path="${new_path/%.exe/}"
40361
40362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40363
40364  # First separate the path from the arguments. This will split at the first
40365  # space.
40366  complete="$GNM"
40367  path="${complete%% *}"
40368  tmp="$complete EOL"
40369  arguments="${tmp#* }"
40370
40371  # Input might be given as Windows format, start by converting to
40372  # unix format.
40373  new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384
40385  # Now try to locate executable using which
40386  new_path=`$WHICH "$new_path" 2> /dev/null`
40387
40388  if test "x$new_path" = x; then
40389    # Oops. Which didn't find the executable.
40390    # The splitting of arguments from the executable at a space might have been incorrect,
40391    # since paths with space are more likely in Windows. Give it another try with the whole
40392    # argument.
40393    path="$complete"
40394    arguments="EOL"
40395    new_path="$path"
40396
40397  windows_path="$new_path"
40398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399    unix_path=`$CYGPATH -u "$windows_path"`
40400    new_path="$unix_path"
40401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40403    new_path="$unix_path"
40404  fi
40405
40406
40407    new_path=`$WHICH "$new_path" 2> /dev/null`
40408    # bat and cmd files are not always considered executable in MSYS causing which
40409    # to not find them
40410    if test "x$new_path" = x \
40411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40413      new_path="$path"
40414
40415  windows_path="$new_path"
40416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417    unix_path=`$CYGPATH -u "$windows_path"`
40418    new_path="$unix_path"
40419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421    new_path="$unix_path"
40422  fi
40423
40424    fi
40425
40426    if test "x$new_path" = x; then
40427      # It's still not found. Now this is an unrecoverable error.
40428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40429$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40430      has_space=`$ECHO "$complete" | $GREP " "`
40431      if test "x$has_space" != x; then
40432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40434      fi
40435      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40436    fi
40437  fi
40438
40439  # Now new_path has a complete unix path to the binary
40440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40441    # Keep paths in /bin as-is, but remove trailing .exe if any
40442    new_path="${new_path/%.exe/}"
40443    # Do not save /bin paths to all_fixpath_prefixes!
40444  else
40445    # Not in mixed or Windows style, start by that.
40446    new_path=`cmd //c echo $new_path`
40447
40448  input_path="$new_path"
40449  # Check if we need to convert this using DOS-style short mode. If the path
40450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40451  # take no chances and rewrite it.
40452  # Note: m4 eats our [], so we need to use [ and ] instead.
40453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40454  if test "x$has_forbidden_chars" != x; then
40455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40457  fi
40458
40459    # Output is in $new_path
40460
40461  windows_path="$new_path"
40462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40463    unix_path=`$CYGPATH -u "$windows_path"`
40464    new_path="$unix_path"
40465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40467    new_path="$unix_path"
40468  fi
40469
40470    # remove trailing .exe if any
40471    new_path="${new_path/%.exe/}"
40472
40473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40475  fi
40476
40477    else
40478      # We're on a unix platform. Hooray! :)
40479      # First separate the path from the arguments. This will split at the first
40480      # space.
40481      complete="$GNM"
40482      path="${complete%% *}"
40483      tmp="$complete EOL"
40484      arguments="${tmp#* }"
40485
40486      # Cannot rely on the command "which" here since it doesn't always work.
40487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40488      if test -z "$is_absolute_path"; then
40489        # Path to executable is not absolute. Find it.
40490        IFS_save="$IFS"
40491        IFS=:
40492        for p in $PATH; do
40493          if test -f "$p/$path" && test -x "$p/$path"; then
40494            new_path="$p/$path"
40495            break
40496          fi
40497        done
40498        IFS="$IFS_save"
40499      else
40500        # This is an absolute path, we can use it without further modifications.
40501        new_path="$path"
40502      fi
40503
40504      if test "x$new_path" = x; then
40505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40506$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40507        has_space=`$ECHO "$complete" | $GREP " "`
40508        if test "x$has_space" != x; then
40509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40511        fi
40512        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40513      fi
40514    fi
40515
40516    # Now join together the path and the arguments once again
40517    if test "x$arguments" != xEOL; then
40518      new_complete="$new_path ${arguments% *}"
40519    else
40520      new_complete="$new_path"
40521    fi
40522
40523    if test "x$complete" != "x$new_complete"; then
40524      GNM="$new_complete"
40525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40526$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40527    fi
40528  fi
40529
40530  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40531    # FIXME: we should unify this with the solaris case above.
40532
40533
40534  # Publish this variable in the help.
40535
40536
40537  if [ -z "${STRIP+x}" ]; then
40538    # The variable is not set by user, try to locate tool using the code snippet
40539    if test -n "$ac_tool_prefix"; then
40540  for ac_prog in strip
40541  do
40542    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40545$as_echo_n "checking for $ac_word... " >&6; }
40546if ${ac_cv_prog_STRIP+:} false; then :
40547  $as_echo_n "(cached) " >&6
40548else
40549  if test -n "$STRIP"; then
40550  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40551else
40552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40553for as_dir in $PATH
40554do
40555  IFS=$as_save_IFS
40556  test -z "$as_dir" && as_dir=.
40557    for ac_exec_ext in '' $ac_executable_extensions; do
40558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40559    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40561    break 2
40562  fi
40563done
40564  done
40565IFS=$as_save_IFS
40566
40567fi
40568fi
40569STRIP=$ac_cv_prog_STRIP
40570if test -n "$STRIP"; then
40571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40572$as_echo "$STRIP" >&6; }
40573else
40574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40575$as_echo "no" >&6; }
40576fi
40577
40578
40579    test -n "$STRIP" && break
40580  done
40581fi
40582if test -z "$STRIP"; then
40583  ac_ct_STRIP=$STRIP
40584  for ac_prog in strip
40585do
40586  # Extract the first word of "$ac_prog", so it can be a program name with args.
40587set dummy $ac_prog; ac_word=$2
40588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40589$as_echo_n "checking for $ac_word... " >&6; }
40590if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40591  $as_echo_n "(cached) " >&6
40592else
40593  if test -n "$ac_ct_STRIP"; then
40594  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40595else
40596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40597for as_dir in $PATH
40598do
40599  IFS=$as_save_IFS
40600  test -z "$as_dir" && as_dir=.
40601    for ac_exec_ext in '' $ac_executable_extensions; do
40602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40603    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40605    break 2
40606  fi
40607done
40608  done
40609IFS=$as_save_IFS
40610
40611fi
40612fi
40613ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40614if test -n "$ac_ct_STRIP"; then
40615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40616$as_echo "$ac_ct_STRIP" >&6; }
40617else
40618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40619$as_echo "no" >&6; }
40620fi
40621
40622
40623  test -n "$ac_ct_STRIP" && break
40624done
40625
40626  if test "x$ac_ct_STRIP" = x; then
40627    STRIP=""
40628  else
40629    case $cross_compiling:$ac_tool_warned in
40630yes:)
40631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40633ac_tool_warned=yes ;;
40634esac
40635    STRIP=$ac_ct_STRIP
40636  fi
40637fi
40638
40639  else
40640    # The variable is set, but is it from the command line or the environment?
40641
40642    # Try to remove the string !STRIP! from our list.
40643    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40644    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40645      # If it failed, the variable was not from the command line. Ignore it,
40646      # but warn the user (except for BASH, which is always set by the calling BASH).
40647      if test "xSTRIP" != xBASH; then
40648        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40649$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40650      fi
40651      # Try to locate tool using the code snippet
40652      if test -n "$ac_tool_prefix"; then
40653  for ac_prog in strip
40654  do
40655    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40656set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40658$as_echo_n "checking for $ac_word... " >&6; }
40659if ${ac_cv_prog_STRIP+:} false; then :
40660  $as_echo_n "(cached) " >&6
40661else
40662  if test -n "$STRIP"; then
40663  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40664else
40665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40666for as_dir in $PATH
40667do
40668  IFS=$as_save_IFS
40669  test -z "$as_dir" && as_dir=.
40670    for ac_exec_ext in '' $ac_executable_extensions; do
40671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40672    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40674    break 2
40675  fi
40676done
40677  done
40678IFS=$as_save_IFS
40679
40680fi
40681fi
40682STRIP=$ac_cv_prog_STRIP
40683if test -n "$STRIP"; then
40684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40685$as_echo "$STRIP" >&6; }
40686else
40687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40688$as_echo "no" >&6; }
40689fi
40690
40691
40692    test -n "$STRIP" && break
40693  done
40694fi
40695if test -z "$STRIP"; then
40696  ac_ct_STRIP=$STRIP
40697  for ac_prog in strip
40698do
40699  # Extract the first word of "$ac_prog", so it can be a program name with args.
40700set dummy $ac_prog; ac_word=$2
40701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40702$as_echo_n "checking for $ac_word... " >&6; }
40703if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40704  $as_echo_n "(cached) " >&6
40705else
40706  if test -n "$ac_ct_STRIP"; then
40707  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40708else
40709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40710for as_dir in $PATH
40711do
40712  IFS=$as_save_IFS
40713  test -z "$as_dir" && as_dir=.
40714    for ac_exec_ext in '' $ac_executable_extensions; do
40715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40716    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40718    break 2
40719  fi
40720done
40721  done
40722IFS=$as_save_IFS
40723
40724fi
40725fi
40726ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40727if test -n "$ac_ct_STRIP"; then
40728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40729$as_echo "$ac_ct_STRIP" >&6; }
40730else
40731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40732$as_echo "no" >&6; }
40733fi
40734
40735
40736  test -n "$ac_ct_STRIP" && break
40737done
40738
40739  if test "x$ac_ct_STRIP" = x; then
40740    STRIP=""
40741  else
40742    case $cross_compiling:$ac_tool_warned in
40743yes:)
40744{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40745$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40746ac_tool_warned=yes ;;
40747esac
40748    STRIP=$ac_ct_STRIP
40749  fi
40750fi
40751
40752    else
40753      # If it succeeded, then it was overridden by the user. We will use it
40754      # for the tool.
40755
40756      # First remove it from the list of overridden variables, so we can test
40757      # for unknown variables in the end.
40758      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40759
40760      # Check if we try to supply an empty value
40761      if test "x$STRIP" = x; then
40762        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40763$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40764        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40765$as_echo_n "checking for STRIP... " >&6; }
40766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40767$as_echo "disabled" >&6; }
40768      else
40769        # Check if the provided tool contains a complete path.
40770        tool_specified="$STRIP"
40771        tool_basename="${tool_specified##*/}"
40772        if test "x$tool_basename" = "x$tool_specified"; then
40773          # A command without a complete path is provided, search $PATH.
40774          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40775$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40776          # Extract the first word of "$tool_basename", so it can be a program name with args.
40777set dummy $tool_basename; ac_word=$2
40778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40779$as_echo_n "checking for $ac_word... " >&6; }
40780if ${ac_cv_path_STRIP+:} false; then :
40781  $as_echo_n "(cached) " >&6
40782else
40783  case $STRIP in
40784  [\\/]* | ?:[\\/]*)
40785  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40786  ;;
40787  *)
40788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40789for as_dir in $PATH
40790do
40791  IFS=$as_save_IFS
40792  test -z "$as_dir" && as_dir=.
40793    for ac_exec_ext in '' $ac_executable_extensions; do
40794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40795    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40797    break 2
40798  fi
40799done
40800  done
40801IFS=$as_save_IFS
40802
40803  ;;
40804esac
40805fi
40806STRIP=$ac_cv_path_STRIP
40807if test -n "$STRIP"; then
40808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40809$as_echo "$STRIP" >&6; }
40810else
40811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40812$as_echo "no" >&6; }
40813fi
40814
40815
40816          if test "x$STRIP" = x; then
40817            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40818          fi
40819        else
40820          # Otherwise we believe it is a complete path. Use it as it is.
40821          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40822$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40823          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40824$as_echo_n "checking for STRIP... " >&6; }
40825          if test ! -x "$tool_specified"; then
40826            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40827$as_echo "not found" >&6; }
40828            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40829          fi
40830          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40831$as_echo "$tool_specified" >&6; }
40832        fi
40833      fi
40834    fi
40835
40836  fi
40837
40838
40839
40840  # Only process if variable expands to non-empty
40841
40842  if test "x$STRIP" != x; then
40843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40844
40845  # First separate the path from the arguments. This will split at the first
40846  # space.
40847  complete="$STRIP"
40848  path="${complete%% *}"
40849  tmp="$complete EOL"
40850  arguments="${tmp#* }"
40851
40852  # Input might be given as Windows format, start by converting to
40853  # unix format.
40854  new_path=`$CYGPATH -u "$path"`
40855
40856  # Now try to locate executable using which
40857  new_path=`$WHICH "$new_path" 2> /dev/null`
40858  # bat and cmd files are not always considered executable in cygwin causing which
40859  # to not find them
40860  if test "x$new_path" = x \
40861      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40862      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40863    new_path=`$CYGPATH -u "$path"`
40864  fi
40865  if test "x$new_path" = x; then
40866    # Oops. Which didn't find the executable.
40867    # The splitting of arguments from the executable at a space might have been incorrect,
40868    # since paths with space are more likely in Windows. Give it another try with the whole
40869    # argument.
40870    path="$complete"
40871    arguments="EOL"
40872    new_path=`$CYGPATH -u "$path"`
40873    new_path=`$WHICH "$new_path" 2> /dev/null`
40874    # bat and cmd files are not always considered executable in cygwin causing which
40875    # to not find them
40876    if test "x$new_path" = x \
40877        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40878        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40879      new_path=`$CYGPATH -u "$path"`
40880    fi
40881    if test "x$new_path" = x; then
40882      # It's still not found. Now this is an unrecoverable error.
40883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40884$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40885      has_space=`$ECHO "$complete" | $GREP " "`
40886      if test "x$has_space" != x; then
40887        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40888$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40889      fi
40890      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40891    fi
40892  fi
40893
40894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40897  # "foo.exe" is OK but "foo" is an error.
40898  #
40899  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40900  # It is also a way to make sure we got the proper file name for the real test later on.
40901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40902  if test "x$test_shortpath" = x; then
40903    # Short path failed, file does not exist as specified.
40904    # Try adding .exe or .cmd
40905    if test -f "${new_path}.exe"; then
40906      input_to_shortpath="${new_path}.exe"
40907    elif test -f "${new_path}.cmd"; then
40908      input_to_shortpath="${new_path}.cmd"
40909    else
40910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40911$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40912      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40913$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40914      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40915    fi
40916  else
40917    input_to_shortpath="$new_path"
40918  fi
40919
40920  # Call helper function which possibly converts this using DOS-style short mode.
40921  # If so, the updated path is stored in $new_path.
40922  new_path="$input_to_shortpath"
40923
40924  input_path="$input_to_shortpath"
40925  # Check if we need to convert this using DOS-style short mode. If the path
40926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40927  # take no chances and rewrite it.
40928  # Note: m4 eats our [], so we need to use [ and ] instead.
40929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40930  if test "x$has_forbidden_chars" != x; then
40931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40932    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40933    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40934    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40935      # Going to short mode and back again did indeed matter. Since short mode is
40936      # case insensitive, let's make it lowercase to improve readability.
40937      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40938      # Now convert it back to Unix-style (cygpath)
40939      input_path=`$CYGPATH -u "$shortmode_path"`
40940      new_path="$input_path"
40941    fi
40942  fi
40943
40944  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40945  if test "x$test_cygdrive_prefix" = x; then
40946    # As a simple fix, exclude /usr/bin since it's not a real path.
40947    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40948      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40949      # a path prefixed by /cygdrive for fixpath to work.
40950      new_path="$CYGWIN_ROOT_PATH$input_path"
40951    fi
40952  fi
40953
40954  # remove trailing .exe if any
40955  new_path="${new_path/%.exe/}"
40956
40957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40958
40959  # First separate the path from the arguments. This will split at the first
40960  # space.
40961  complete="$STRIP"
40962  path="${complete%% *}"
40963  tmp="$complete EOL"
40964  arguments="${tmp#* }"
40965
40966  # Input might be given as Windows format, start by converting to
40967  # unix format.
40968  new_path="$path"
40969
40970  windows_path="$new_path"
40971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40972    unix_path=`$CYGPATH -u "$windows_path"`
40973    new_path="$unix_path"
40974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40976    new_path="$unix_path"
40977  fi
40978
40979
40980  # Now try to locate executable using which
40981  new_path=`$WHICH "$new_path" 2> /dev/null`
40982
40983  if test "x$new_path" = x; then
40984    # Oops. Which didn't find the executable.
40985    # The splitting of arguments from the executable at a space might have been incorrect,
40986    # since paths with space are more likely in Windows. Give it another try with the whole
40987    # argument.
40988    path="$complete"
40989    arguments="EOL"
40990    new_path="$path"
40991
40992  windows_path="$new_path"
40993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40994    unix_path=`$CYGPATH -u "$windows_path"`
40995    new_path="$unix_path"
40996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40998    new_path="$unix_path"
40999  fi
41000
41001
41002    new_path=`$WHICH "$new_path" 2> /dev/null`
41003    # bat and cmd files are not always considered executable in MSYS causing which
41004    # to not find them
41005    if test "x$new_path" = x \
41006        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41007        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41008      new_path="$path"
41009
41010  windows_path="$new_path"
41011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41012    unix_path=`$CYGPATH -u "$windows_path"`
41013    new_path="$unix_path"
41014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41016    new_path="$unix_path"
41017  fi
41018
41019    fi
41020
41021    if test "x$new_path" = x; then
41022      # It's still not found. Now this is an unrecoverable error.
41023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41024$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41025      has_space=`$ECHO "$complete" | $GREP " "`
41026      if test "x$has_space" != x; then
41027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41029      fi
41030      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41031    fi
41032  fi
41033
41034  # Now new_path has a complete unix path to the binary
41035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41036    # Keep paths in /bin as-is, but remove trailing .exe if any
41037    new_path="${new_path/%.exe/}"
41038    # Do not save /bin paths to all_fixpath_prefixes!
41039  else
41040    # Not in mixed or Windows style, start by that.
41041    new_path=`cmd //c echo $new_path`
41042
41043  input_path="$new_path"
41044  # Check if we need to convert this using DOS-style short mode. If the path
41045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41046  # take no chances and rewrite it.
41047  # Note: m4 eats our [], so we need to use [ and ] instead.
41048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41049  if test "x$has_forbidden_chars" != x; then
41050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41052  fi
41053
41054    # Output is in $new_path
41055
41056  windows_path="$new_path"
41057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41058    unix_path=`$CYGPATH -u "$windows_path"`
41059    new_path="$unix_path"
41060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41062    new_path="$unix_path"
41063  fi
41064
41065    # remove trailing .exe if any
41066    new_path="${new_path/%.exe/}"
41067
41068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41070  fi
41071
41072    else
41073      # We're on a unix platform. Hooray! :)
41074      # First separate the path from the arguments. This will split at the first
41075      # space.
41076      complete="$STRIP"
41077      path="${complete%% *}"
41078      tmp="$complete EOL"
41079      arguments="${tmp#* }"
41080
41081      # Cannot rely on the command "which" here since it doesn't always work.
41082      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41083      if test -z "$is_absolute_path"; then
41084        # Path to executable is not absolute. Find it.
41085        IFS_save="$IFS"
41086        IFS=:
41087        for p in $PATH; do
41088          if test -f "$p/$path" && test -x "$p/$path"; then
41089            new_path="$p/$path"
41090            break
41091          fi
41092        done
41093        IFS="$IFS_save"
41094      else
41095        # This is an absolute path, we can use it without further modifications.
41096        new_path="$path"
41097      fi
41098
41099      if test "x$new_path" = x; then
41100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41101$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41102        has_space=`$ECHO "$complete" | $GREP " "`
41103        if test "x$has_space" != x; then
41104          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41105$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41106        fi
41107        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41108      fi
41109    fi
41110
41111    # Now join together the path and the arguments once again
41112    if test "x$arguments" != xEOL; then
41113      new_complete="$new_path ${arguments% *}"
41114    else
41115      new_complete="$new_path"
41116    fi
41117
41118    if test "x$complete" != "x$new_complete"; then
41119      STRIP="$new_complete"
41120      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41121$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41122    fi
41123  fi
41124
41125    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41126
41127
41128  # Publish this variable in the help.
41129
41130
41131  if [ -z "${NM+x}" ]; then
41132    # The variable is not set by user, try to locate tool using the code snippet
41133    if test -n "$ac_tool_prefix"; then
41134  for ac_prog in nm gcc-nm
41135  do
41136    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41137set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41139$as_echo_n "checking for $ac_word... " >&6; }
41140if ${ac_cv_prog_NM+:} false; then :
41141  $as_echo_n "(cached) " >&6
41142else
41143  if test -n "$NM"; then
41144  ac_cv_prog_NM="$NM" # Let the user override the test.
41145else
41146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41147for as_dir in $PATH
41148do
41149  IFS=$as_save_IFS
41150  test -z "$as_dir" && as_dir=.
41151    for ac_exec_ext in '' $ac_executable_extensions; do
41152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41153    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41155    break 2
41156  fi
41157done
41158  done
41159IFS=$as_save_IFS
41160
41161fi
41162fi
41163NM=$ac_cv_prog_NM
41164if test -n "$NM"; then
41165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41166$as_echo "$NM" >&6; }
41167else
41168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41169$as_echo "no" >&6; }
41170fi
41171
41172
41173    test -n "$NM" && break
41174  done
41175fi
41176if test -z "$NM"; then
41177  ac_ct_NM=$NM
41178  for ac_prog in nm gcc-nm
41179do
41180  # Extract the first word of "$ac_prog", so it can be a program name with args.
41181set dummy $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_ac_ct_NM+:} false; then :
41185  $as_echo_n "(cached) " >&6
41186else
41187  if test -n "$ac_ct_NM"; then
41188  ac_cv_prog_ac_ct_NM="$ac_ct_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_ac_ct_NM="$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
41207ac_ct_NM=$ac_cv_prog_ac_ct_NM
41208if test -n "$ac_ct_NM"; then
41209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41210$as_echo "$ac_ct_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 "$ac_ct_NM" && break
41218done
41219
41220  if test "x$ac_ct_NM" = x; then
41221    NM=""
41222  else
41223    case $cross_compiling:$ac_tool_warned in
41224yes:)
41225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41227ac_tool_warned=yes ;;
41228esac
41229    NM=$ac_ct_NM
41230  fi
41231fi
41232
41233  else
41234    # The variable is set, but is it from the command line or the environment?
41235
41236    # Try to remove the string !NM! from our list.
41237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41239      # If it failed, the variable was not from the command line. Ignore it,
41240      # but warn the user (except for BASH, which is always set by the calling BASH).
41241      if test "xNM" != xBASH; then
41242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41243$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41244      fi
41245      # Try to locate tool using the code snippet
41246      if test -n "$ac_tool_prefix"; then
41247  for ac_prog in nm gcc-nm
41248  do
41249    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41250set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41252$as_echo_n "checking for $ac_word... " >&6; }
41253if ${ac_cv_prog_NM+:} false; then :
41254  $as_echo_n "(cached) " >&6
41255else
41256  if test -n "$NM"; then
41257  ac_cv_prog_NM="$NM" # Let the user override the test.
41258else
41259as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41260for as_dir in $PATH
41261do
41262  IFS=$as_save_IFS
41263  test -z "$as_dir" && as_dir=.
41264    for ac_exec_ext in '' $ac_executable_extensions; do
41265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41266    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41268    break 2
41269  fi
41270done
41271  done
41272IFS=$as_save_IFS
41273
41274fi
41275fi
41276NM=$ac_cv_prog_NM
41277if test -n "$NM"; then
41278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41279$as_echo "$NM" >&6; }
41280else
41281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41282$as_echo "no" >&6; }
41283fi
41284
41285
41286    test -n "$NM" && break
41287  done
41288fi
41289if test -z "$NM"; then
41290  ac_ct_NM=$NM
41291  for ac_prog in nm gcc-nm
41292do
41293  # Extract the first word of "$ac_prog", so it can be a program name with args.
41294set dummy $ac_prog; ac_word=$2
41295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41296$as_echo_n "checking for $ac_word... " >&6; }
41297if ${ac_cv_prog_ac_ct_NM+:} false; then :
41298  $as_echo_n "(cached) " >&6
41299else
41300  if test -n "$ac_ct_NM"; then
41301  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41302else
41303as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41304for as_dir in $PATH
41305do
41306  IFS=$as_save_IFS
41307  test -z "$as_dir" && as_dir=.
41308    for ac_exec_ext in '' $ac_executable_extensions; do
41309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41310    ac_cv_prog_ac_ct_NM="$ac_prog"
41311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41312    break 2
41313  fi
41314done
41315  done
41316IFS=$as_save_IFS
41317
41318fi
41319fi
41320ac_ct_NM=$ac_cv_prog_ac_ct_NM
41321if test -n "$ac_ct_NM"; then
41322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41323$as_echo "$ac_ct_NM" >&6; }
41324else
41325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41326$as_echo "no" >&6; }
41327fi
41328
41329
41330  test -n "$ac_ct_NM" && break
41331done
41332
41333  if test "x$ac_ct_NM" = x; then
41334    NM=""
41335  else
41336    case $cross_compiling:$ac_tool_warned in
41337yes:)
41338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41340ac_tool_warned=yes ;;
41341esac
41342    NM=$ac_ct_NM
41343  fi
41344fi
41345
41346    else
41347      # If it succeeded, then it was overridden by the user. We will use it
41348      # for the tool.
41349
41350      # First remove it from the list of overridden variables, so we can test
41351      # for unknown variables in the end.
41352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41353
41354      # Check if we try to supply an empty value
41355      if test "x$NM" = x; then
41356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41357$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41359$as_echo_n "checking for NM... " >&6; }
41360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41361$as_echo "disabled" >&6; }
41362      else
41363        # Check if the provided tool contains a complete path.
41364        tool_specified="$NM"
41365        tool_basename="${tool_specified##*/}"
41366        if test "x$tool_basename" = "x$tool_specified"; then
41367          # A command without a complete path is provided, search $PATH.
41368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41369$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41370          # Extract the first word of "$tool_basename", so it can be a program name with args.
41371set dummy $tool_basename; ac_word=$2
41372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41373$as_echo_n "checking for $ac_word... " >&6; }
41374if ${ac_cv_path_NM+:} false; then :
41375  $as_echo_n "(cached) " >&6
41376else
41377  case $NM in
41378  [\\/]* | ?:[\\/]*)
41379  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41380  ;;
41381  *)
41382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41383for as_dir in $PATH
41384do
41385  IFS=$as_save_IFS
41386  test -z "$as_dir" && as_dir=.
41387    for ac_exec_ext in '' $ac_executable_extensions; do
41388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41389    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41391    break 2
41392  fi
41393done
41394  done
41395IFS=$as_save_IFS
41396
41397  ;;
41398esac
41399fi
41400NM=$ac_cv_path_NM
41401if test -n "$NM"; then
41402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41403$as_echo "$NM" >&6; }
41404else
41405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41406$as_echo "no" >&6; }
41407fi
41408
41409
41410          if test "x$NM" = x; then
41411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41412          fi
41413        else
41414          # Otherwise we believe it is a complete path. Use it as it is.
41415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41416$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41418$as_echo_n "checking for NM... " >&6; }
41419          if test ! -x "$tool_specified"; then
41420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41421$as_echo "not found" >&6; }
41422            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41423          fi
41424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41425$as_echo "$tool_specified" >&6; }
41426        fi
41427      fi
41428    fi
41429
41430  fi
41431
41432
41433    else
41434
41435
41436  # Publish this variable in the help.
41437
41438
41439  if [ -z "${NM+x}" ]; then
41440    # The variable is not set by user, try to locate tool using the code snippet
41441    if test -n "$ac_tool_prefix"; then
41442  for ac_prog in nm
41443  do
41444    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41445set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41447$as_echo_n "checking for $ac_word... " >&6; }
41448if ${ac_cv_prog_NM+:} false; then :
41449  $as_echo_n "(cached) " >&6
41450else
41451  if test -n "$NM"; then
41452  ac_cv_prog_NM="$NM" # Let the user override the test.
41453else
41454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41455for as_dir in $PATH
41456do
41457  IFS=$as_save_IFS
41458  test -z "$as_dir" && as_dir=.
41459    for ac_exec_ext in '' $ac_executable_extensions; do
41460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41461    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41463    break 2
41464  fi
41465done
41466  done
41467IFS=$as_save_IFS
41468
41469fi
41470fi
41471NM=$ac_cv_prog_NM
41472if test -n "$NM"; then
41473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41474$as_echo "$NM" >&6; }
41475else
41476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41477$as_echo "no" >&6; }
41478fi
41479
41480
41481    test -n "$NM" && break
41482  done
41483fi
41484if test -z "$NM"; then
41485  ac_ct_NM=$NM
41486  for ac_prog in nm
41487do
41488  # Extract the first word of "$ac_prog", so it can be a program name with args.
41489set dummy $ac_prog; ac_word=$2
41490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41491$as_echo_n "checking for $ac_word... " >&6; }
41492if ${ac_cv_prog_ac_ct_NM+:} false; then :
41493  $as_echo_n "(cached) " >&6
41494else
41495  if test -n "$ac_ct_NM"; then
41496  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41497else
41498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41499for as_dir in $PATH
41500do
41501  IFS=$as_save_IFS
41502  test -z "$as_dir" && as_dir=.
41503    for ac_exec_ext in '' $ac_executable_extensions; do
41504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41505    ac_cv_prog_ac_ct_NM="$ac_prog"
41506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41507    break 2
41508  fi
41509done
41510  done
41511IFS=$as_save_IFS
41512
41513fi
41514fi
41515ac_ct_NM=$ac_cv_prog_ac_ct_NM
41516if test -n "$ac_ct_NM"; then
41517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41518$as_echo "$ac_ct_NM" >&6; }
41519else
41520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41521$as_echo "no" >&6; }
41522fi
41523
41524
41525  test -n "$ac_ct_NM" && break
41526done
41527
41528  if test "x$ac_ct_NM" = x; then
41529    NM=""
41530  else
41531    case $cross_compiling:$ac_tool_warned in
41532yes:)
41533{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41534$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41535ac_tool_warned=yes ;;
41536esac
41537    NM=$ac_ct_NM
41538  fi
41539fi
41540
41541  else
41542    # The variable is set, but is it from the command line or the environment?
41543
41544    # Try to remove the string !NM! from our list.
41545    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41546    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41547      # If it failed, the variable was not from the command line. Ignore it,
41548      # but warn the user (except for BASH, which is always set by the calling BASH).
41549      if test "xNM" != xBASH; then
41550        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41551$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41552      fi
41553      # Try to locate tool using the code snippet
41554      if test -n "$ac_tool_prefix"; then
41555  for ac_prog in nm
41556  do
41557    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41558set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41560$as_echo_n "checking for $ac_word... " >&6; }
41561if ${ac_cv_prog_NM+:} false; then :
41562  $as_echo_n "(cached) " >&6
41563else
41564  if test -n "$NM"; then
41565  ac_cv_prog_NM="$NM" # Let the user override the test.
41566else
41567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41568for as_dir in $PATH
41569do
41570  IFS=$as_save_IFS
41571  test -z "$as_dir" && as_dir=.
41572    for ac_exec_ext in '' $ac_executable_extensions; do
41573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41574    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41576    break 2
41577  fi
41578done
41579  done
41580IFS=$as_save_IFS
41581
41582fi
41583fi
41584NM=$ac_cv_prog_NM
41585if test -n "$NM"; then
41586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41587$as_echo "$NM" >&6; }
41588else
41589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41590$as_echo "no" >&6; }
41591fi
41592
41593
41594    test -n "$NM" && break
41595  done
41596fi
41597if test -z "$NM"; then
41598  ac_ct_NM=$NM
41599  for ac_prog in nm
41600do
41601  # Extract the first word of "$ac_prog", so it can be a program name with args.
41602set dummy $ac_prog; ac_word=$2
41603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41604$as_echo_n "checking for $ac_word... " >&6; }
41605if ${ac_cv_prog_ac_ct_NM+:} false; then :
41606  $as_echo_n "(cached) " >&6
41607else
41608  if test -n "$ac_ct_NM"; then
41609  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41610else
41611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41612for as_dir in $PATH
41613do
41614  IFS=$as_save_IFS
41615  test -z "$as_dir" && as_dir=.
41616    for ac_exec_ext in '' $ac_executable_extensions; do
41617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41618    ac_cv_prog_ac_ct_NM="$ac_prog"
41619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41620    break 2
41621  fi
41622done
41623  done
41624IFS=$as_save_IFS
41625
41626fi
41627fi
41628ac_ct_NM=$ac_cv_prog_ac_ct_NM
41629if test -n "$ac_ct_NM"; then
41630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41631$as_echo "$ac_ct_NM" >&6; }
41632else
41633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41634$as_echo "no" >&6; }
41635fi
41636
41637
41638  test -n "$ac_ct_NM" && break
41639done
41640
41641  if test "x$ac_ct_NM" = x; then
41642    NM=""
41643  else
41644    case $cross_compiling:$ac_tool_warned in
41645yes:)
41646{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41647$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41648ac_tool_warned=yes ;;
41649esac
41650    NM=$ac_ct_NM
41651  fi
41652fi
41653
41654    else
41655      # If it succeeded, then it was overridden by the user. We will use it
41656      # for the tool.
41657
41658      # First remove it from the list of overridden variables, so we can test
41659      # for unknown variables in the end.
41660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41661
41662      # Check if we try to supply an empty value
41663      if test "x$NM" = x; then
41664        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41665$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41667$as_echo_n "checking for NM... " >&6; }
41668        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41669$as_echo "disabled" >&6; }
41670      else
41671        # Check if the provided tool contains a complete path.
41672        tool_specified="$NM"
41673        tool_basename="${tool_specified##*/}"
41674        if test "x$tool_basename" = "x$tool_specified"; then
41675          # A command without a complete path is provided, search $PATH.
41676          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41677$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41678          # Extract the first word of "$tool_basename", so it can be a program name with args.
41679set dummy $tool_basename; ac_word=$2
41680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41681$as_echo_n "checking for $ac_word... " >&6; }
41682if ${ac_cv_path_NM+:} false; then :
41683  $as_echo_n "(cached) " >&6
41684else
41685  case $NM in
41686  [\\/]* | ?:[\\/]*)
41687  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41688  ;;
41689  *)
41690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41691for as_dir in $PATH
41692do
41693  IFS=$as_save_IFS
41694  test -z "$as_dir" && as_dir=.
41695    for ac_exec_ext in '' $ac_executable_extensions; do
41696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41697    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41699    break 2
41700  fi
41701done
41702  done
41703IFS=$as_save_IFS
41704
41705  ;;
41706esac
41707fi
41708NM=$ac_cv_path_NM
41709if test -n "$NM"; then
41710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41711$as_echo "$NM" >&6; }
41712else
41713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41714$as_echo "no" >&6; }
41715fi
41716
41717
41718          if test "x$NM" = x; then
41719            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41720          fi
41721        else
41722          # Otherwise we believe it is a complete path. Use it as it is.
41723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41724$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41725          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41726$as_echo_n "checking for NM... " >&6; }
41727          if test ! -x "$tool_specified"; then
41728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41729$as_echo "not found" >&6; }
41730            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41731          fi
41732          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41733$as_echo "$tool_specified" >&6; }
41734        fi
41735      fi
41736    fi
41737
41738  fi
41739
41740
41741    fi
41742
41743  # Only process if variable expands to non-empty
41744
41745  if test "x$NM" != x; then
41746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41747
41748  # First separate the path from the arguments. This will split at the first
41749  # space.
41750  complete="$NM"
41751  path="${complete%% *}"
41752  tmp="$complete EOL"
41753  arguments="${tmp#* }"
41754
41755  # Input might be given as Windows format, start by converting to
41756  # unix format.
41757  new_path=`$CYGPATH -u "$path"`
41758
41759  # Now try to locate executable using which
41760  new_path=`$WHICH "$new_path" 2> /dev/null`
41761  # bat and cmd files are not always considered executable in cygwin causing which
41762  # to not find them
41763  if test "x$new_path" = x \
41764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41766    new_path=`$CYGPATH -u "$path"`
41767  fi
41768  if test "x$new_path" = x; then
41769    # Oops. Which didn't find the executable.
41770    # The splitting of arguments from the executable at a space might have been incorrect,
41771    # since paths with space are more likely in Windows. Give it another try with the whole
41772    # argument.
41773    path="$complete"
41774    arguments="EOL"
41775    new_path=`$CYGPATH -u "$path"`
41776    new_path=`$WHICH "$new_path" 2> /dev/null`
41777    # bat and cmd files are not always considered executable in cygwin causing which
41778    # to not find them
41779    if test "x$new_path" = x \
41780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41782      new_path=`$CYGPATH -u "$path"`
41783    fi
41784    if test "x$new_path" = x; then
41785      # It's still not found. Now this is an unrecoverable error.
41786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41787$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41788      has_space=`$ECHO "$complete" | $GREP " "`
41789      if test "x$has_space" != x; then
41790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41792      fi
41793      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41794    fi
41795  fi
41796
41797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41800  # "foo.exe" is OK but "foo" is an error.
41801  #
41802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41803  # It is also a way to make sure we got the proper file name for the real test later on.
41804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41805  if test "x$test_shortpath" = x; then
41806    # Short path failed, file does not exist as specified.
41807    # Try adding .exe or .cmd
41808    if test -f "${new_path}.exe"; then
41809      input_to_shortpath="${new_path}.exe"
41810    elif test -f "${new_path}.cmd"; then
41811      input_to_shortpath="${new_path}.cmd"
41812    else
41813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41814$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41817      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41818    fi
41819  else
41820    input_to_shortpath="$new_path"
41821  fi
41822
41823  # Call helper function which possibly converts this using DOS-style short mode.
41824  # If so, the updated path is stored in $new_path.
41825  new_path="$input_to_shortpath"
41826
41827  input_path="$input_to_shortpath"
41828  # Check if we need to convert this using DOS-style short mode. If the path
41829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41830  # take no chances and rewrite it.
41831  # Note: m4 eats our [], so we need to use [ and ] instead.
41832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41833  if test "x$has_forbidden_chars" != x; then
41834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41838      # Going to short mode and back again did indeed matter. Since short mode is
41839      # case insensitive, let's make it lowercase to improve readability.
41840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41841      # Now convert it back to Unix-style (cygpath)
41842      input_path=`$CYGPATH -u "$shortmode_path"`
41843      new_path="$input_path"
41844    fi
41845  fi
41846
41847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41848  if test "x$test_cygdrive_prefix" = x; then
41849    # As a simple fix, exclude /usr/bin since it's not a real path.
41850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41852      # a path prefixed by /cygdrive for fixpath to work.
41853      new_path="$CYGWIN_ROOT_PATH$input_path"
41854    fi
41855  fi
41856
41857  # remove trailing .exe if any
41858  new_path="${new_path/%.exe/}"
41859
41860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41861
41862  # First separate the path from the arguments. This will split at the first
41863  # space.
41864  complete="$NM"
41865  path="${complete%% *}"
41866  tmp="$complete EOL"
41867  arguments="${tmp#* }"
41868
41869  # Input might be given as Windows format, start by converting to
41870  # unix format.
41871  new_path="$path"
41872
41873  windows_path="$new_path"
41874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41875    unix_path=`$CYGPATH -u "$windows_path"`
41876    new_path="$unix_path"
41877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41879    new_path="$unix_path"
41880  fi
41881
41882
41883  # Now try to locate executable using which
41884  new_path=`$WHICH "$new_path" 2> /dev/null`
41885
41886  if test "x$new_path" = x; then
41887    # Oops. Which didn't find the executable.
41888    # The splitting of arguments from the executable at a space might have been incorrect,
41889    # since paths with space are more likely in Windows. Give it another try with the whole
41890    # argument.
41891    path="$complete"
41892    arguments="EOL"
41893    new_path="$path"
41894
41895  windows_path="$new_path"
41896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41897    unix_path=`$CYGPATH -u "$windows_path"`
41898    new_path="$unix_path"
41899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41901    new_path="$unix_path"
41902  fi
41903
41904
41905    new_path=`$WHICH "$new_path" 2> /dev/null`
41906    # bat and cmd files are not always considered executable in MSYS causing which
41907    # to not find them
41908    if test "x$new_path" = x \
41909        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41910        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41911      new_path="$path"
41912
41913  windows_path="$new_path"
41914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41915    unix_path=`$CYGPATH -u "$windows_path"`
41916    new_path="$unix_path"
41917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41919    new_path="$unix_path"
41920  fi
41921
41922    fi
41923
41924    if test "x$new_path" = x; then
41925      # It's still not found. Now this is an unrecoverable error.
41926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41927$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41928      has_space=`$ECHO "$complete" | $GREP " "`
41929      if test "x$has_space" != x; then
41930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41932      fi
41933      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41934    fi
41935  fi
41936
41937  # Now new_path has a complete unix path to the binary
41938  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41939    # Keep paths in /bin as-is, but remove trailing .exe if any
41940    new_path="${new_path/%.exe/}"
41941    # Do not save /bin paths to all_fixpath_prefixes!
41942  else
41943    # Not in mixed or Windows style, start by that.
41944    new_path=`cmd //c echo $new_path`
41945
41946  input_path="$new_path"
41947  # Check if we need to convert this using DOS-style short mode. If the path
41948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41949  # take no chances and rewrite it.
41950  # Note: m4 eats our [], so we need to use [ and ] instead.
41951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41952  if test "x$has_forbidden_chars" != x; then
41953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41955  fi
41956
41957    # Output is in $new_path
41958
41959  windows_path="$new_path"
41960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41961    unix_path=`$CYGPATH -u "$windows_path"`
41962    new_path="$unix_path"
41963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41965    new_path="$unix_path"
41966  fi
41967
41968    # remove trailing .exe if any
41969    new_path="${new_path/%.exe/}"
41970
41971    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41972    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41973  fi
41974
41975    else
41976      # We're on a unix platform. Hooray! :)
41977      # First separate the path from the arguments. This will split at the first
41978      # space.
41979      complete="$NM"
41980      path="${complete%% *}"
41981      tmp="$complete EOL"
41982      arguments="${tmp#* }"
41983
41984      # Cannot rely on the command "which" here since it doesn't always work.
41985      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41986      if test -z "$is_absolute_path"; then
41987        # Path to executable is not absolute. Find it.
41988        IFS_save="$IFS"
41989        IFS=:
41990        for p in $PATH; do
41991          if test -f "$p/$path" && test -x "$p/$path"; then
41992            new_path="$p/$path"
41993            break
41994          fi
41995        done
41996        IFS="$IFS_save"
41997      else
41998        # This is an absolute path, we can use it without further modifications.
41999        new_path="$path"
42000      fi
42001
42002      if test "x$new_path" = x; then
42003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42004$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42005        has_space=`$ECHO "$complete" | $GREP " "`
42006        if test "x$has_space" != x; then
42007          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42008$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42009        fi
42010        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42011      fi
42012    fi
42013
42014    # Now join together the path and the arguments once again
42015    if test "x$arguments" != xEOL; then
42016      new_complete="$new_path ${arguments% *}"
42017    else
42018      new_complete="$new_path"
42019    fi
42020
42021    if test "x$complete" != "x$new_complete"; then
42022      NM="$new_complete"
42023      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42024$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42025    fi
42026  fi
42027
42028    GNM="$NM"
42029
42030  fi
42031
42032  # objcopy is used for moving debug symbols to separate files when
42033  # full debug symbols are enabled.
42034  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42035
42036
42037  # Publish this variable in the help.
42038
42039
42040  if [ -z "${OBJCOPY+x}" ]; then
42041    # The variable is not set by user, try to locate tool using the code snippet
42042    if test -n "$ac_tool_prefix"; then
42043  for ac_prog in gobjcopy objcopy
42044  do
42045    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42048$as_echo_n "checking for $ac_word... " >&6; }
42049if ${ac_cv_prog_OBJCOPY+:} false; then :
42050  $as_echo_n "(cached) " >&6
42051else
42052  if test -n "$OBJCOPY"; then
42053  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42054else
42055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42056for as_dir in $PATH
42057do
42058  IFS=$as_save_IFS
42059  test -z "$as_dir" && as_dir=.
42060    for ac_exec_ext in '' $ac_executable_extensions; do
42061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42062    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42064    break 2
42065  fi
42066done
42067  done
42068IFS=$as_save_IFS
42069
42070fi
42071fi
42072OBJCOPY=$ac_cv_prog_OBJCOPY
42073if test -n "$OBJCOPY"; then
42074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42075$as_echo "$OBJCOPY" >&6; }
42076else
42077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42078$as_echo "no" >&6; }
42079fi
42080
42081
42082    test -n "$OBJCOPY" && break
42083  done
42084fi
42085if test -z "$OBJCOPY"; then
42086  ac_ct_OBJCOPY=$OBJCOPY
42087  for ac_prog in gobjcopy objcopy
42088do
42089  # Extract the first word of "$ac_prog", so it can be a program name with args.
42090set dummy $ac_prog; ac_word=$2
42091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42092$as_echo_n "checking for $ac_word... " >&6; }
42093if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42094  $as_echo_n "(cached) " >&6
42095else
42096  if test -n "$ac_ct_OBJCOPY"; then
42097  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42098else
42099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42100for as_dir in $PATH
42101do
42102  IFS=$as_save_IFS
42103  test -z "$as_dir" && as_dir=.
42104    for ac_exec_ext in '' $ac_executable_extensions; do
42105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42106    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42108    break 2
42109  fi
42110done
42111  done
42112IFS=$as_save_IFS
42113
42114fi
42115fi
42116ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42117if test -n "$ac_ct_OBJCOPY"; then
42118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42119$as_echo "$ac_ct_OBJCOPY" >&6; }
42120else
42121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42122$as_echo "no" >&6; }
42123fi
42124
42125
42126  test -n "$ac_ct_OBJCOPY" && break
42127done
42128
42129  if test "x$ac_ct_OBJCOPY" = x; then
42130    OBJCOPY=""
42131  else
42132    case $cross_compiling:$ac_tool_warned in
42133yes:)
42134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42136ac_tool_warned=yes ;;
42137esac
42138    OBJCOPY=$ac_ct_OBJCOPY
42139  fi
42140fi
42141
42142  else
42143    # The variable is set, but is it from the command line or the environment?
42144
42145    # Try to remove the string !OBJCOPY! from our list.
42146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42148      # If it failed, the variable was not from the command line. Ignore it,
42149      # but warn the user (except for BASH, which is always set by the calling BASH).
42150      if test "xOBJCOPY" != xBASH; then
42151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42152$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42153      fi
42154      # Try to locate tool using the code snippet
42155      if test -n "$ac_tool_prefix"; then
42156  for ac_prog in gobjcopy objcopy
42157  do
42158    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42159set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42161$as_echo_n "checking for $ac_word... " >&6; }
42162if ${ac_cv_prog_OBJCOPY+:} false; then :
42163  $as_echo_n "(cached) " >&6
42164else
42165  if test -n "$OBJCOPY"; then
42166  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42167else
42168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42169for as_dir in $PATH
42170do
42171  IFS=$as_save_IFS
42172  test -z "$as_dir" && as_dir=.
42173    for ac_exec_ext in '' $ac_executable_extensions; do
42174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42175    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42177    break 2
42178  fi
42179done
42180  done
42181IFS=$as_save_IFS
42182
42183fi
42184fi
42185OBJCOPY=$ac_cv_prog_OBJCOPY
42186if test -n "$OBJCOPY"; then
42187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42188$as_echo "$OBJCOPY" >&6; }
42189else
42190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42191$as_echo "no" >&6; }
42192fi
42193
42194
42195    test -n "$OBJCOPY" && break
42196  done
42197fi
42198if test -z "$OBJCOPY"; then
42199  ac_ct_OBJCOPY=$OBJCOPY
42200  for ac_prog in gobjcopy objcopy
42201do
42202  # Extract the first word of "$ac_prog", so it can be a program name with args.
42203set dummy $ac_prog; ac_word=$2
42204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42205$as_echo_n "checking for $ac_word... " >&6; }
42206if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42207  $as_echo_n "(cached) " >&6
42208else
42209  if test -n "$ac_ct_OBJCOPY"; then
42210  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42211else
42212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42213for as_dir in $PATH
42214do
42215  IFS=$as_save_IFS
42216  test -z "$as_dir" && as_dir=.
42217    for ac_exec_ext in '' $ac_executable_extensions; do
42218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42219    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42221    break 2
42222  fi
42223done
42224  done
42225IFS=$as_save_IFS
42226
42227fi
42228fi
42229ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42230if test -n "$ac_ct_OBJCOPY"; then
42231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42232$as_echo "$ac_ct_OBJCOPY" >&6; }
42233else
42234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42235$as_echo "no" >&6; }
42236fi
42237
42238
42239  test -n "$ac_ct_OBJCOPY" && break
42240done
42241
42242  if test "x$ac_ct_OBJCOPY" = x; then
42243    OBJCOPY=""
42244  else
42245    case $cross_compiling:$ac_tool_warned in
42246yes:)
42247{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42248$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42249ac_tool_warned=yes ;;
42250esac
42251    OBJCOPY=$ac_ct_OBJCOPY
42252  fi
42253fi
42254
42255    else
42256      # If it succeeded, then it was overridden by the user. We will use it
42257      # for the tool.
42258
42259      # First remove it from the list of overridden variables, so we can test
42260      # for unknown variables in the end.
42261      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42262
42263      # Check if we try to supply an empty value
42264      if test "x$OBJCOPY" = x; then
42265        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42266$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42267        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42268$as_echo_n "checking for OBJCOPY... " >&6; }
42269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42270$as_echo "disabled" >&6; }
42271      else
42272        # Check if the provided tool contains a complete path.
42273        tool_specified="$OBJCOPY"
42274        tool_basename="${tool_specified##*/}"
42275        if test "x$tool_basename" = "x$tool_specified"; then
42276          # A command without a complete path is provided, search $PATH.
42277          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42278$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42279          # Extract the first word of "$tool_basename", so it can be a program name with args.
42280set dummy $tool_basename; ac_word=$2
42281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42282$as_echo_n "checking for $ac_word... " >&6; }
42283if ${ac_cv_path_OBJCOPY+:} false; then :
42284  $as_echo_n "(cached) " >&6
42285else
42286  case $OBJCOPY in
42287  [\\/]* | ?:[\\/]*)
42288  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42289  ;;
42290  *)
42291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42292for as_dir in $PATH
42293do
42294  IFS=$as_save_IFS
42295  test -z "$as_dir" && as_dir=.
42296    for ac_exec_ext in '' $ac_executable_extensions; do
42297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42298    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42300    break 2
42301  fi
42302done
42303  done
42304IFS=$as_save_IFS
42305
42306  ;;
42307esac
42308fi
42309OBJCOPY=$ac_cv_path_OBJCOPY
42310if test -n "$OBJCOPY"; then
42311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42312$as_echo "$OBJCOPY" >&6; }
42313else
42314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42315$as_echo "no" >&6; }
42316fi
42317
42318
42319          if test "x$OBJCOPY" = x; then
42320            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42321          fi
42322        else
42323          # Otherwise we believe it is a complete path. Use it as it is.
42324          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42325$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42326          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42327$as_echo_n "checking for OBJCOPY... " >&6; }
42328          if test ! -x "$tool_specified"; then
42329            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42330$as_echo "not found" >&6; }
42331            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42332          fi
42333          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42334$as_echo "$tool_specified" >&6; }
42335        fi
42336      fi
42337    fi
42338
42339  fi
42340
42341
42342    # Only call fixup if objcopy was found.
42343    if test -n "$OBJCOPY"; then
42344
42345  # Only process if variable expands to non-empty
42346
42347  if test "x$OBJCOPY" != x; then
42348    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42349
42350  # First separate the path from the arguments. This will split at the first
42351  # space.
42352  complete="$OBJCOPY"
42353  path="${complete%% *}"
42354  tmp="$complete EOL"
42355  arguments="${tmp#* }"
42356
42357  # Input might be given as Windows format, start by converting to
42358  # unix format.
42359  new_path=`$CYGPATH -u "$path"`
42360
42361  # Now try to locate executable using which
42362  new_path=`$WHICH "$new_path" 2> /dev/null`
42363  # bat and cmd files are not always considered executable in cygwin causing which
42364  # to not find them
42365  if test "x$new_path" = x \
42366      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42367      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42368    new_path=`$CYGPATH -u "$path"`
42369  fi
42370  if test "x$new_path" = x; then
42371    # Oops. Which didn't find the executable.
42372    # The splitting of arguments from the executable at a space might have been incorrect,
42373    # since paths with space are more likely in Windows. Give it another try with the whole
42374    # argument.
42375    path="$complete"
42376    arguments="EOL"
42377    new_path=`$CYGPATH -u "$path"`
42378    new_path=`$WHICH "$new_path" 2> /dev/null`
42379    # bat and cmd files are not always considered executable in cygwin causing which
42380    # to not find them
42381    if test "x$new_path" = x \
42382        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42383        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42384      new_path=`$CYGPATH -u "$path"`
42385    fi
42386    if test "x$new_path" = x; then
42387      # It's still not found. Now this is an unrecoverable error.
42388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42389$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42390      has_space=`$ECHO "$complete" | $GREP " "`
42391      if test "x$has_space" != x; then
42392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42394      fi
42395      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42396    fi
42397  fi
42398
42399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42402  # "foo.exe" is OK but "foo" is an error.
42403  #
42404  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42405  # It is also a way to make sure we got the proper file name for the real test later on.
42406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42407  if test "x$test_shortpath" = x; then
42408    # Short path failed, file does not exist as specified.
42409    # Try adding .exe or .cmd
42410    if test -f "${new_path}.exe"; then
42411      input_to_shortpath="${new_path}.exe"
42412    elif test -f "${new_path}.cmd"; then
42413      input_to_shortpath="${new_path}.cmd"
42414    else
42415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42416$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42417      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42418$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42419      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42420    fi
42421  else
42422    input_to_shortpath="$new_path"
42423  fi
42424
42425  # Call helper function which possibly converts this using DOS-style short mode.
42426  # If so, the updated path is stored in $new_path.
42427  new_path="$input_to_shortpath"
42428
42429  input_path="$input_to_shortpath"
42430  # Check if we need to convert this using DOS-style short mode. If the path
42431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42432  # take no chances and rewrite it.
42433  # Note: m4 eats our [], so we need to use [ and ] instead.
42434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42435  if test "x$has_forbidden_chars" != x; then
42436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42440      # Going to short mode and back again did indeed matter. Since short mode is
42441      # case insensitive, let's make it lowercase to improve readability.
42442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42443      # Now convert it back to Unix-style (cygpath)
42444      input_path=`$CYGPATH -u "$shortmode_path"`
42445      new_path="$input_path"
42446    fi
42447  fi
42448
42449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42450  if test "x$test_cygdrive_prefix" = x; then
42451    # As a simple fix, exclude /usr/bin since it's not a real path.
42452    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42454      # a path prefixed by /cygdrive for fixpath to work.
42455      new_path="$CYGWIN_ROOT_PATH$input_path"
42456    fi
42457  fi
42458
42459  # remove trailing .exe if any
42460  new_path="${new_path/%.exe/}"
42461
42462    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42463
42464  # First separate the path from the arguments. This will split at the first
42465  # space.
42466  complete="$OBJCOPY"
42467  path="${complete%% *}"
42468  tmp="$complete EOL"
42469  arguments="${tmp#* }"
42470
42471  # Input might be given as Windows format, start by converting to
42472  # unix format.
42473  new_path="$path"
42474
42475  windows_path="$new_path"
42476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42477    unix_path=`$CYGPATH -u "$windows_path"`
42478    new_path="$unix_path"
42479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42481    new_path="$unix_path"
42482  fi
42483
42484
42485  # Now try to locate executable using which
42486  new_path=`$WHICH "$new_path" 2> /dev/null`
42487
42488  if test "x$new_path" = x; then
42489    # Oops. Which didn't find the executable.
42490    # The splitting of arguments from the executable at a space might have been incorrect,
42491    # since paths with space are more likely in Windows. Give it another try with the whole
42492    # argument.
42493    path="$complete"
42494    arguments="EOL"
42495    new_path="$path"
42496
42497  windows_path="$new_path"
42498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42499    unix_path=`$CYGPATH -u "$windows_path"`
42500    new_path="$unix_path"
42501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42503    new_path="$unix_path"
42504  fi
42505
42506
42507    new_path=`$WHICH "$new_path" 2> /dev/null`
42508    # bat and cmd files are not always considered executable in MSYS causing which
42509    # to not find them
42510    if test "x$new_path" = x \
42511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42513      new_path="$path"
42514
42515  windows_path="$new_path"
42516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42517    unix_path=`$CYGPATH -u "$windows_path"`
42518    new_path="$unix_path"
42519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42521    new_path="$unix_path"
42522  fi
42523
42524    fi
42525
42526    if test "x$new_path" = x; then
42527      # It's still not found. Now this is an unrecoverable error.
42528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42529$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42530      has_space=`$ECHO "$complete" | $GREP " "`
42531      if test "x$has_space" != x; then
42532        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42533$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42534      fi
42535      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42536    fi
42537  fi
42538
42539  # Now new_path has a complete unix path to the binary
42540  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42541    # Keep paths in /bin as-is, but remove trailing .exe if any
42542    new_path="${new_path/%.exe/}"
42543    # Do not save /bin paths to all_fixpath_prefixes!
42544  else
42545    # Not in mixed or Windows style, start by that.
42546    new_path=`cmd //c echo $new_path`
42547
42548  input_path="$new_path"
42549  # Check if we need to convert this using DOS-style short mode. If the path
42550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42551  # take no chances and rewrite it.
42552  # Note: m4 eats our [], so we need to use [ and ] instead.
42553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42554  if test "x$has_forbidden_chars" != x; then
42555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42556    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42557  fi
42558
42559    # Output is in $new_path
42560
42561  windows_path="$new_path"
42562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42563    unix_path=`$CYGPATH -u "$windows_path"`
42564    new_path="$unix_path"
42565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42567    new_path="$unix_path"
42568  fi
42569
42570    # remove trailing .exe if any
42571    new_path="${new_path/%.exe/}"
42572
42573    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42574    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42575  fi
42576
42577    else
42578      # We're on a unix platform. Hooray! :)
42579      # First separate the path from the arguments. This will split at the first
42580      # space.
42581      complete="$OBJCOPY"
42582      path="${complete%% *}"
42583      tmp="$complete EOL"
42584      arguments="${tmp#* }"
42585
42586      # Cannot rely on the command "which" here since it doesn't always work.
42587      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42588      if test -z "$is_absolute_path"; then
42589        # Path to executable is not absolute. Find it.
42590        IFS_save="$IFS"
42591        IFS=:
42592        for p in $PATH; do
42593          if test -f "$p/$path" && test -x "$p/$path"; then
42594            new_path="$p/$path"
42595            break
42596          fi
42597        done
42598        IFS="$IFS_save"
42599      else
42600        # This is an absolute path, we can use it without further modifications.
42601        new_path="$path"
42602      fi
42603
42604      if test "x$new_path" = x; then
42605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42606$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42607        has_space=`$ECHO "$complete" | $GREP " "`
42608        if test "x$has_space" != x; then
42609          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42610$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42611        fi
42612        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42613      fi
42614    fi
42615
42616    # Now join together the path and the arguments once again
42617    if test "x$arguments" != xEOL; then
42618      new_complete="$new_path ${arguments% *}"
42619    else
42620      new_complete="$new_path"
42621    fi
42622
42623    if test "x$complete" != "x$new_complete"; then
42624      OBJCOPY="$new_complete"
42625      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42626$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42627    fi
42628  fi
42629
42630      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42631        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42632        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42633        # - version number is last blank separate word on first line
42634        # - version number formats that have been seen:
42635        #   - <major>.<minor>
42636        #   - <major>.<minor>.<micro>
42637        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42638        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42639         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42640              -e 's/.* //' \
42641              -e '/^[01]\./b bad' \
42642              -e '/^2\./{' \
42643              -e '  s/^2\.//' \
42644              -e '  /^[0-9]$/b bad' \
42645              -e '  /^[0-9]\./b bad' \
42646              -e '  /^1[0-9]$/b bad' \
42647              -e '  /^1[0-9]\./b bad' \
42648              -e '  /^20\./b bad' \
42649              -e '  /^21\.0$/b bad' \
42650              -e '  /^21\.0\./b bad' \
42651              -e '}' \
42652              -e ':good' \
42653              -e 's/.*/VALID_VERSION/p' \
42654              -e 'q' \
42655              -e ':bad' \
42656              -e 's/.*/BAD_VERSION/p' \
42657              -e 'q'`
42658        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42659          OBJCOPY=
42660          { $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
42661$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42662          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42663$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42664          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42665$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42666          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42667$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42668          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42669$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42670        fi
42671      fi
42672    fi
42673  fi
42674
42675
42676
42677  # Publish this variable in the help.
42678
42679
42680  if [ -z "${OBJDUMP+x}" ]; then
42681    # The variable is not set by user, try to locate tool using the code snippet
42682    if test -n "$ac_tool_prefix"; then
42683  for ac_prog in gobjdump objdump
42684  do
42685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42688$as_echo_n "checking for $ac_word... " >&6; }
42689if ${ac_cv_prog_OBJDUMP+:} false; then :
42690  $as_echo_n "(cached) " >&6
42691else
42692  if test -n "$OBJDUMP"; then
42693  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42694else
42695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42696for as_dir in $PATH
42697do
42698  IFS=$as_save_IFS
42699  test -z "$as_dir" && as_dir=.
42700    for ac_exec_ext in '' $ac_executable_extensions; do
42701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42702    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42704    break 2
42705  fi
42706done
42707  done
42708IFS=$as_save_IFS
42709
42710fi
42711fi
42712OBJDUMP=$ac_cv_prog_OBJDUMP
42713if test -n "$OBJDUMP"; then
42714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42715$as_echo "$OBJDUMP" >&6; }
42716else
42717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42718$as_echo "no" >&6; }
42719fi
42720
42721
42722    test -n "$OBJDUMP" && break
42723  done
42724fi
42725if test -z "$OBJDUMP"; then
42726  ac_ct_OBJDUMP=$OBJDUMP
42727  for ac_prog in gobjdump objdump
42728do
42729  # Extract the first word of "$ac_prog", so it can be a program name with args.
42730set dummy $ac_prog; ac_word=$2
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42732$as_echo_n "checking for $ac_word... " >&6; }
42733if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42734  $as_echo_n "(cached) " >&6
42735else
42736  if test -n "$ac_ct_OBJDUMP"; then
42737  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42738else
42739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42740for as_dir in $PATH
42741do
42742  IFS=$as_save_IFS
42743  test -z "$as_dir" && as_dir=.
42744    for ac_exec_ext in '' $ac_executable_extensions; do
42745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42746    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42748    break 2
42749  fi
42750done
42751  done
42752IFS=$as_save_IFS
42753
42754fi
42755fi
42756ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42757if test -n "$ac_ct_OBJDUMP"; then
42758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42759$as_echo "$ac_ct_OBJDUMP" >&6; }
42760else
42761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42762$as_echo "no" >&6; }
42763fi
42764
42765
42766  test -n "$ac_ct_OBJDUMP" && break
42767done
42768
42769  if test "x$ac_ct_OBJDUMP" = x; then
42770    OBJDUMP=""
42771  else
42772    case $cross_compiling:$ac_tool_warned in
42773yes:)
42774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42776ac_tool_warned=yes ;;
42777esac
42778    OBJDUMP=$ac_ct_OBJDUMP
42779  fi
42780fi
42781
42782  else
42783    # The variable is set, but is it from the command line or the environment?
42784
42785    # Try to remove the string !OBJDUMP! from our list.
42786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42788      # If it failed, the variable was not from the command line. Ignore it,
42789      # but warn the user (except for BASH, which is always set by the calling BASH).
42790      if test "xOBJDUMP" != xBASH; then
42791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42792$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42793      fi
42794      # Try to locate tool using the code snippet
42795      if test -n "$ac_tool_prefix"; then
42796  for ac_prog in gobjdump objdump
42797  do
42798    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42799set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42801$as_echo_n "checking for $ac_word... " >&6; }
42802if ${ac_cv_prog_OBJDUMP+:} false; then :
42803  $as_echo_n "(cached) " >&6
42804else
42805  if test -n "$OBJDUMP"; then
42806  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42807else
42808as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42809for as_dir in $PATH
42810do
42811  IFS=$as_save_IFS
42812  test -z "$as_dir" && as_dir=.
42813    for ac_exec_ext in '' $ac_executable_extensions; do
42814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42815    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42817    break 2
42818  fi
42819done
42820  done
42821IFS=$as_save_IFS
42822
42823fi
42824fi
42825OBJDUMP=$ac_cv_prog_OBJDUMP
42826if test -n "$OBJDUMP"; then
42827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42828$as_echo "$OBJDUMP" >&6; }
42829else
42830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42831$as_echo "no" >&6; }
42832fi
42833
42834
42835    test -n "$OBJDUMP" && break
42836  done
42837fi
42838if test -z "$OBJDUMP"; then
42839  ac_ct_OBJDUMP=$OBJDUMP
42840  for ac_prog in gobjdump objdump
42841do
42842  # Extract the first word of "$ac_prog", so it can be a program name with args.
42843set dummy $ac_prog; ac_word=$2
42844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42845$as_echo_n "checking for $ac_word... " >&6; }
42846if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42847  $as_echo_n "(cached) " >&6
42848else
42849  if test -n "$ac_ct_OBJDUMP"; then
42850  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42851else
42852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42853for as_dir in $PATH
42854do
42855  IFS=$as_save_IFS
42856  test -z "$as_dir" && as_dir=.
42857    for ac_exec_ext in '' $ac_executable_extensions; do
42858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42859    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42861    break 2
42862  fi
42863done
42864  done
42865IFS=$as_save_IFS
42866
42867fi
42868fi
42869ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42870if test -n "$ac_ct_OBJDUMP"; then
42871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42872$as_echo "$ac_ct_OBJDUMP" >&6; }
42873else
42874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42875$as_echo "no" >&6; }
42876fi
42877
42878
42879  test -n "$ac_ct_OBJDUMP" && break
42880done
42881
42882  if test "x$ac_ct_OBJDUMP" = x; then
42883    OBJDUMP=""
42884  else
42885    case $cross_compiling:$ac_tool_warned in
42886yes:)
42887{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42888$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42889ac_tool_warned=yes ;;
42890esac
42891    OBJDUMP=$ac_ct_OBJDUMP
42892  fi
42893fi
42894
42895    else
42896      # If it succeeded, then it was overridden by the user. We will use it
42897      # for the tool.
42898
42899      # First remove it from the list of overridden variables, so we can test
42900      # for unknown variables in the end.
42901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42902
42903      # Check if we try to supply an empty value
42904      if test "x$OBJDUMP" = x; then
42905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42906$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42908$as_echo_n "checking for OBJDUMP... " >&6; }
42909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42910$as_echo "disabled" >&6; }
42911      else
42912        # Check if the provided tool contains a complete path.
42913        tool_specified="$OBJDUMP"
42914        tool_basename="${tool_specified##*/}"
42915        if test "x$tool_basename" = "x$tool_specified"; then
42916          # A command without a complete path is provided, search $PATH.
42917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42918$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42919          # Extract the first word of "$tool_basename", so it can be a program name with args.
42920set dummy $tool_basename; ac_word=$2
42921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42922$as_echo_n "checking for $ac_word... " >&6; }
42923if ${ac_cv_path_OBJDUMP+:} false; then :
42924  $as_echo_n "(cached) " >&6
42925else
42926  case $OBJDUMP in
42927  [\\/]* | ?:[\\/]*)
42928  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42929  ;;
42930  *)
42931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42932for as_dir in $PATH
42933do
42934  IFS=$as_save_IFS
42935  test -z "$as_dir" && as_dir=.
42936    for ac_exec_ext in '' $ac_executable_extensions; do
42937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42938    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42940    break 2
42941  fi
42942done
42943  done
42944IFS=$as_save_IFS
42945
42946  ;;
42947esac
42948fi
42949OBJDUMP=$ac_cv_path_OBJDUMP
42950if test -n "$OBJDUMP"; then
42951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42952$as_echo "$OBJDUMP" >&6; }
42953else
42954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42955$as_echo "no" >&6; }
42956fi
42957
42958
42959          if test "x$OBJDUMP" = x; then
42960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42961          fi
42962        else
42963          # Otherwise we believe it is a complete path. Use it as it is.
42964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42965$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42967$as_echo_n "checking for OBJDUMP... " >&6; }
42968          if test ! -x "$tool_specified"; then
42969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42970$as_echo "not found" >&6; }
42971            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42972          fi
42973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42974$as_echo "$tool_specified" >&6; }
42975        fi
42976      fi
42977    fi
42978
42979  fi
42980
42981
42982  if test "x$OBJDUMP" != x; then
42983    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42984    # bails if argument is missing.
42985
42986  # Only process if variable expands to non-empty
42987
42988  if test "x$OBJDUMP" != x; then
42989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42990
42991  # First separate the path from the arguments. This will split at the first
42992  # space.
42993  complete="$OBJDUMP"
42994  path="${complete%% *}"
42995  tmp="$complete EOL"
42996  arguments="${tmp#* }"
42997
42998  # Input might be given as Windows format, start by converting to
42999  # unix format.
43000  new_path=`$CYGPATH -u "$path"`
43001
43002  # Now try to locate executable using which
43003  new_path=`$WHICH "$new_path" 2> /dev/null`
43004  # bat and cmd files are not always considered executable in cygwin causing which
43005  # to not find them
43006  if test "x$new_path" = x \
43007      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43008      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43009    new_path=`$CYGPATH -u "$path"`
43010  fi
43011  if test "x$new_path" = x; then
43012    # Oops. Which didn't find the executable.
43013    # The splitting of arguments from the executable at a space might have been incorrect,
43014    # since paths with space are more likely in Windows. Give it another try with the whole
43015    # argument.
43016    path="$complete"
43017    arguments="EOL"
43018    new_path=`$CYGPATH -u "$path"`
43019    new_path=`$WHICH "$new_path" 2> /dev/null`
43020    # bat and cmd files are not always considered executable in cygwin causing which
43021    # to not find them
43022    if test "x$new_path" = x \
43023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43025      new_path=`$CYGPATH -u "$path"`
43026    fi
43027    if test "x$new_path" = x; then
43028      # It's still not found. Now this is an unrecoverable error.
43029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43030$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43031      has_space=`$ECHO "$complete" | $GREP " "`
43032      if test "x$has_space" != x; then
43033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43035      fi
43036      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43037    fi
43038  fi
43039
43040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43043  # "foo.exe" is OK but "foo" is an error.
43044  #
43045  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43046  # It is also a way to make sure we got the proper file name for the real test later on.
43047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43048  if test "x$test_shortpath" = x; then
43049    # Short path failed, file does not exist as specified.
43050    # Try adding .exe or .cmd
43051    if test -f "${new_path}.exe"; then
43052      input_to_shortpath="${new_path}.exe"
43053    elif test -f "${new_path}.cmd"; then
43054      input_to_shortpath="${new_path}.cmd"
43055    else
43056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43057$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43060      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43061    fi
43062  else
43063    input_to_shortpath="$new_path"
43064  fi
43065
43066  # Call helper function which possibly converts this using DOS-style short mode.
43067  # If so, the updated path is stored in $new_path.
43068  new_path="$input_to_shortpath"
43069
43070  input_path="$input_to_shortpath"
43071  # Check if we need to convert this using DOS-style short mode. If the path
43072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43073  # take no chances and rewrite it.
43074  # Note: m4 eats our [], so we need to use [ and ] instead.
43075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43076  if test "x$has_forbidden_chars" != x; then
43077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43081      # Going to short mode and back again did indeed matter. Since short mode is
43082      # case insensitive, let's make it lowercase to improve readability.
43083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43084      # Now convert it back to Unix-style (cygpath)
43085      input_path=`$CYGPATH -u "$shortmode_path"`
43086      new_path="$input_path"
43087    fi
43088  fi
43089
43090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43091  if test "x$test_cygdrive_prefix" = x; then
43092    # As a simple fix, exclude /usr/bin since it's not a real path.
43093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43095      # a path prefixed by /cygdrive for fixpath to work.
43096      new_path="$CYGWIN_ROOT_PATH$input_path"
43097    fi
43098  fi
43099
43100  # remove trailing .exe if any
43101  new_path="${new_path/%.exe/}"
43102
43103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43104
43105  # First separate the path from the arguments. This will split at the first
43106  # space.
43107  complete="$OBJDUMP"
43108  path="${complete%% *}"
43109  tmp="$complete EOL"
43110  arguments="${tmp#* }"
43111
43112  # Input might be given as Windows format, start by converting to
43113  # unix format.
43114  new_path="$path"
43115
43116  windows_path="$new_path"
43117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43118    unix_path=`$CYGPATH -u "$windows_path"`
43119    new_path="$unix_path"
43120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43122    new_path="$unix_path"
43123  fi
43124
43125
43126  # Now try to locate executable using which
43127  new_path=`$WHICH "$new_path" 2> /dev/null`
43128
43129  if test "x$new_path" = x; then
43130    # Oops. Which didn't find the executable.
43131    # The splitting of arguments from the executable at a space might have been incorrect,
43132    # since paths with space are more likely in Windows. Give it another try with the whole
43133    # argument.
43134    path="$complete"
43135    arguments="EOL"
43136    new_path="$path"
43137
43138  windows_path="$new_path"
43139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43140    unix_path=`$CYGPATH -u "$windows_path"`
43141    new_path="$unix_path"
43142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43144    new_path="$unix_path"
43145  fi
43146
43147
43148    new_path=`$WHICH "$new_path" 2> /dev/null`
43149    # bat and cmd files are not always considered executable in MSYS causing which
43150    # to not find them
43151    if test "x$new_path" = x \
43152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43154      new_path="$path"
43155
43156  windows_path="$new_path"
43157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43158    unix_path=`$CYGPATH -u "$windows_path"`
43159    new_path="$unix_path"
43160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43162    new_path="$unix_path"
43163  fi
43164
43165    fi
43166
43167    if test "x$new_path" = x; then
43168      # It's still not found. Now this is an unrecoverable error.
43169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43170$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43171      has_space=`$ECHO "$complete" | $GREP " "`
43172      if test "x$has_space" != x; then
43173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43175      fi
43176      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43177    fi
43178  fi
43179
43180  # Now new_path has a complete unix path to the binary
43181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43182    # Keep paths in /bin as-is, but remove trailing .exe if any
43183    new_path="${new_path/%.exe/}"
43184    # Do not save /bin paths to all_fixpath_prefixes!
43185  else
43186    # Not in mixed or Windows style, start by that.
43187    new_path=`cmd //c echo $new_path`
43188
43189  input_path="$new_path"
43190  # Check if we need to convert this using DOS-style short mode. If the path
43191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43192  # take no chances and rewrite it.
43193  # Note: m4 eats our [], so we need to use [ and ] instead.
43194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43195  if test "x$has_forbidden_chars" != x; then
43196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43198  fi
43199
43200    # Output is in $new_path
43201
43202  windows_path="$new_path"
43203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43204    unix_path=`$CYGPATH -u "$windows_path"`
43205    new_path="$unix_path"
43206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43208    new_path="$unix_path"
43209  fi
43210
43211    # remove trailing .exe if any
43212    new_path="${new_path/%.exe/}"
43213
43214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43216  fi
43217
43218    else
43219      # We're on a unix platform. Hooray! :)
43220      # First separate the path from the arguments. This will split at the first
43221      # space.
43222      complete="$OBJDUMP"
43223      path="${complete%% *}"
43224      tmp="$complete EOL"
43225      arguments="${tmp#* }"
43226
43227      # Cannot rely on the command "which" here since it doesn't always work.
43228      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43229      if test -z "$is_absolute_path"; then
43230        # Path to executable is not absolute. Find it.
43231        IFS_save="$IFS"
43232        IFS=:
43233        for p in $PATH; do
43234          if test -f "$p/$path" && test -x "$p/$path"; then
43235            new_path="$p/$path"
43236            break
43237          fi
43238        done
43239        IFS="$IFS_save"
43240      else
43241        # This is an absolute path, we can use it without further modifications.
43242        new_path="$path"
43243      fi
43244
43245      if test "x$new_path" = x; then
43246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43247$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43248        has_space=`$ECHO "$complete" | $GREP " "`
43249        if test "x$has_space" != x; then
43250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43252        fi
43253        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43254      fi
43255    fi
43256
43257    # Now join together the path and the arguments once again
43258    if test "x$arguments" != xEOL; then
43259      new_complete="$new_path ${arguments% *}"
43260    else
43261      new_complete="$new_path"
43262    fi
43263
43264    if test "x$complete" != "x$new_complete"; then
43265      OBJDUMP="$new_complete"
43266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43267$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43268    fi
43269  fi
43270
43271  fi
43272
43273
43274  # Restore old path.
43275  PATH="$OLD_PATH"
43276
43277  # Restore the flags to the user specified values.
43278  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43279  CFLAGS="$ORG_CFLAGS"
43280  CXXFLAGS="$ORG_CXXFLAGS"
43281
43282
43283# Finally do some processing after the detection phase
43284
43285  if test "x$COMPILE_TYPE" = "xcross"; then
43286    # Now we need to find a C/C++ compiler that can build executables for the
43287    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43288    # used once. Also, we need to do this without adding a tools dir to the
43289    # path, otherwise we might pick up cross-compilers which don't use standard
43290    # naming.
43291
43292    OLDPATH="$PATH"
43293
43294
43295# Check whether --with-build-devkit was given.
43296if test "${with_build_devkit+set}" = set; then :
43297  withval=$with_build_devkit;
43298fi
43299
43300    if test "x$with_build_devkit" = "xyes"; then
43301      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43302    elif test -n "$with_build_devkit"; then
43303      if test ! -d "$with_build_devkit"; then
43304        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43305      else
43306
43307  # Only process if variable expands to non-empty
43308
43309  if test "x$with_build_devkit" != x; then
43310    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43311
43312  # Input might be given as Windows format, start by converting to
43313  # unix format.
43314  path="$with_build_devkit"
43315  new_path=`$CYGPATH -u "$path"`
43316
43317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43320  # "foo.exe" is OK but "foo" is an error.
43321  #
43322  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43323  # It is also a way to make sure we got the proper file name for the real test later on.
43324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43325  if test "x$test_shortpath" = x; then
43326    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43327$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43328    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43329  fi
43330
43331  # Call helper function which possibly converts this using DOS-style short mode.
43332  # If so, the updated path is stored in $new_path.
43333
43334  input_path="$new_path"
43335  # Check if we need to convert this using DOS-style short mode. If the path
43336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43337  # take no chances and rewrite it.
43338  # Note: m4 eats our [], so we need to use [ and ] instead.
43339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43340  if test "x$has_forbidden_chars" != x; then
43341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43345      # Going to short mode and back again did indeed matter. Since short mode is
43346      # case insensitive, let's make it lowercase to improve readability.
43347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43348      # Now convert it back to Unix-style (cygpath)
43349      input_path=`$CYGPATH -u "$shortmode_path"`
43350      new_path="$input_path"
43351    fi
43352  fi
43353
43354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43355  if test "x$test_cygdrive_prefix" = x; then
43356    # As a simple fix, exclude /usr/bin since it's not a real path.
43357    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43359      # a path prefixed by /cygdrive for fixpath to work.
43360      new_path="$CYGWIN_ROOT_PATH$input_path"
43361    fi
43362  fi
43363
43364
43365  if test "x$path" != "x$new_path"; then
43366    with_build_devkit="$new_path"
43367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43368$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43369  fi
43370
43371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43372
43373  path="$with_build_devkit"
43374  has_colon=`$ECHO $path | $GREP ^.:`
43375  new_path="$path"
43376  if test "x$has_colon" = x; then
43377    # Not in mixed or Windows style, start by that.
43378    new_path=`cmd //c echo $path`
43379  fi
43380
43381
43382  input_path="$new_path"
43383  # Check if we need to convert this using DOS-style short mode. If the path
43384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43385  # take no chances and rewrite it.
43386  # Note: m4 eats our [], so we need to use [ and ] instead.
43387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43388  if test "x$has_forbidden_chars" != x; then
43389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43390    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43391  fi
43392
43393
43394  windows_path="$new_path"
43395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43396    unix_path=`$CYGPATH -u "$windows_path"`
43397    new_path="$unix_path"
43398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43400    new_path="$unix_path"
43401  fi
43402
43403  if test "x$path" != "x$new_path"; then
43404    with_build_devkit="$new_path"
43405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43406$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43407  fi
43408
43409  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43410  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43411
43412    else
43413      # We're on a unix platform. Hooray! :)
43414      path="$with_build_devkit"
43415      has_space=`$ECHO "$path" | $GREP " "`
43416      if test "x$has_space" != x; then
43417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43418$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43419        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43420      fi
43421
43422      # Use eval to expand a potential ~
43423      eval path="$path"
43424      if test ! -f "$path" && test ! -d "$path"; then
43425        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43426      fi
43427
43428      if test -d "$path"; then
43429        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43430      else
43431        dir="`$DIRNAME "$path"`"
43432        base="`$BASENAME "$path"`"
43433        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43434      fi
43435    fi
43436  fi
43437
43438        BUILD_DEVKIT_ROOT="$with_build_devkit"
43439        # Check for a meta data info file in the root of the devkit
43440        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43441          # Process devkit.info so that existing devkit variables are not
43442          # modified by this
43443          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43444              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43445              -e "s/\$host/\$build/g" \
43446              $BUILD_DEVKIT_ROOT/devkit.info \
43447              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43448          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43449          # This potentially sets the following:
43450          # A descriptive name of the devkit
43451
43452  if test "x$BUILD_DEVKIT_NAME" = x; then
43453    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43454  fi
43455
43456          # Corresponds to --with-extra-path
43457
43458  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43459    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43460  fi
43461
43462          # Corresponds to --with-toolchain-path
43463
43464  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43465    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43466  fi
43467
43468          # Corresponds to --with-sysroot
43469
43470  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43471    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43472  fi
43473
43474          # Skip the Window specific parts
43475        fi
43476
43477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43478$as_echo_n "checking for build platform devkit... " >&6; }
43479        if test "x$BUILD_DEVKIT_NAME" != x; then
43480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43481$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43482        else
43483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43484$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43485        fi
43486
43487        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43488
43489  if test "x$BUILD_SYSROOT" != "x"; then
43490    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43491      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43492        # Solaris Studio does not have a concept of sysroot. Instead we must
43493        # make sure the default include and lib dirs are appended to each
43494        # compile and link command line. Must also add -I-xbuiltin to enable
43495        # inlining of system functions and intrinsics.
43496        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43497        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43498            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43499            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43500      fi
43501    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43502      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43503      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43504    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43505      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43506      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43507    fi
43508    # Propagate the sysroot args to hotspot
43509    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43510    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43511    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43512    # The global CFLAGS and LDFLAGS variables need these for configure to function
43513    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43514    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43515    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43516    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43517  fi
43518
43519  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43520    # We also need -iframework<path>/System/Library/Frameworks
43521    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43522    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43523    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43524    # set this here so it doesn't have to be peppered throughout the forest
43525    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43526    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43527  fi
43528
43529
43530
43531
43532
43533         # Fallback default of just /bin if DEVKIT_PATH is not defined
43534        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43535          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43536        fi
43537        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43538      fi
43539    fi
43540
43541    # FIXME: we should list the discovered compilers as an exclude pattern!
43542    # If we do that, we can do this detection before POST_DETECTION, and still
43543    # find the build compilers in the tools dir, if needed.
43544
43545
43546
43547  # Publish this variable in the help.
43548
43549
43550  if [ -z "${BUILD_CC+x}" ]; then
43551    # The variable is not set by user, try to locate tool using the code snippet
43552    for ac_prog in cl cc gcc
43553do
43554  # Extract the first word of "$ac_prog", so it can be a program name with args.
43555set dummy $ac_prog; ac_word=$2
43556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43557$as_echo_n "checking for $ac_word... " >&6; }
43558if ${ac_cv_path_BUILD_CC+:} false; then :
43559  $as_echo_n "(cached) " >&6
43560else
43561  case $BUILD_CC in
43562  [\\/]* | ?:[\\/]*)
43563  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43564  ;;
43565  *)
43566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43567for as_dir in $PATH
43568do
43569  IFS=$as_save_IFS
43570  test -z "$as_dir" && as_dir=.
43571    for ac_exec_ext in '' $ac_executable_extensions; do
43572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43573    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43575    break 2
43576  fi
43577done
43578  done
43579IFS=$as_save_IFS
43580
43581  ;;
43582esac
43583fi
43584BUILD_CC=$ac_cv_path_BUILD_CC
43585if test -n "$BUILD_CC"; then
43586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43587$as_echo "$BUILD_CC" >&6; }
43588else
43589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43590$as_echo "no" >&6; }
43591fi
43592
43593
43594  test -n "$BUILD_CC" && break
43595done
43596
43597  else
43598    # The variable is set, but is it from the command line or the environment?
43599
43600    # Try to remove the string !BUILD_CC! from our list.
43601    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43602    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43603      # If it failed, the variable was not from the command line. Ignore it,
43604      # but warn the user (except for BASH, which is always set by the calling BASH).
43605      if test "xBUILD_CC" != xBASH; then
43606        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43607$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43608      fi
43609      # Try to locate tool using the code snippet
43610      for ac_prog in cl cc gcc
43611do
43612  # Extract the first word of "$ac_prog", so it can be a program name with args.
43613set dummy $ac_prog; ac_word=$2
43614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43615$as_echo_n "checking for $ac_word... " >&6; }
43616if ${ac_cv_path_BUILD_CC+:} false; then :
43617  $as_echo_n "(cached) " >&6
43618else
43619  case $BUILD_CC in
43620  [\\/]* | ?:[\\/]*)
43621  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43622  ;;
43623  *)
43624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43625for as_dir in $PATH
43626do
43627  IFS=$as_save_IFS
43628  test -z "$as_dir" && as_dir=.
43629    for ac_exec_ext in '' $ac_executable_extensions; do
43630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43631    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43633    break 2
43634  fi
43635done
43636  done
43637IFS=$as_save_IFS
43638
43639  ;;
43640esac
43641fi
43642BUILD_CC=$ac_cv_path_BUILD_CC
43643if test -n "$BUILD_CC"; then
43644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43645$as_echo "$BUILD_CC" >&6; }
43646else
43647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43648$as_echo "no" >&6; }
43649fi
43650
43651
43652  test -n "$BUILD_CC" && break
43653done
43654
43655    else
43656      # If it succeeded, then it was overridden by the user. We will use it
43657      # for the tool.
43658
43659      # First remove it from the list of overridden variables, so we can test
43660      # for unknown variables in the end.
43661      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43662
43663      # Check if we try to supply an empty value
43664      if test "x$BUILD_CC" = x; then
43665        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43666$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43668$as_echo_n "checking for BUILD_CC... " >&6; }
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43670$as_echo "disabled" >&6; }
43671      else
43672        # Check if the provided tool contains a complete path.
43673        tool_specified="$BUILD_CC"
43674        tool_basename="${tool_specified##*/}"
43675        if test "x$tool_basename" = "x$tool_specified"; then
43676          # A command without a complete path is provided, search $PATH.
43677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43678$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43679          # Extract the first word of "$tool_basename", so it can be a program name with args.
43680set dummy $tool_basename; ac_word=$2
43681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43682$as_echo_n "checking for $ac_word... " >&6; }
43683if ${ac_cv_path_BUILD_CC+:} false; then :
43684  $as_echo_n "(cached) " >&6
43685else
43686  case $BUILD_CC in
43687  [\\/]* | ?:[\\/]*)
43688  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43689  ;;
43690  *)
43691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43692for as_dir in $PATH
43693do
43694  IFS=$as_save_IFS
43695  test -z "$as_dir" && as_dir=.
43696    for ac_exec_ext in '' $ac_executable_extensions; do
43697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43698    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43700    break 2
43701  fi
43702done
43703  done
43704IFS=$as_save_IFS
43705
43706  ;;
43707esac
43708fi
43709BUILD_CC=$ac_cv_path_BUILD_CC
43710if test -n "$BUILD_CC"; then
43711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43712$as_echo "$BUILD_CC" >&6; }
43713else
43714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43715$as_echo "no" >&6; }
43716fi
43717
43718
43719          if test "x$BUILD_CC" = x; then
43720            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43721          fi
43722        else
43723          # Otherwise we believe it is a complete path. Use it as it is.
43724          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43725$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43726          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43727$as_echo_n "checking for BUILD_CC... " >&6; }
43728          if test ! -x "$tool_specified"; then
43729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43730$as_echo "not found" >&6; }
43731            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43732          fi
43733          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43734$as_echo "$tool_specified" >&6; }
43735        fi
43736      fi
43737    fi
43738
43739  fi
43740
43741
43742
43743  if test "x$BUILD_CC" = x; then
43744    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43745  fi
43746
43747
43748
43749  # Only process if variable expands to non-empty
43750
43751  if test "x$BUILD_CC" != x; then
43752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43753
43754  # First separate the path from the arguments. This will split at the first
43755  # space.
43756  complete="$BUILD_CC"
43757  path="${complete%% *}"
43758  tmp="$complete EOL"
43759  arguments="${tmp#* }"
43760
43761  # Input might be given as Windows format, start by converting to
43762  # unix format.
43763  new_path=`$CYGPATH -u "$path"`
43764
43765  # Now try to locate executable using which
43766  new_path=`$WHICH "$new_path" 2> /dev/null`
43767  # bat and cmd files are not always considered executable in cygwin causing which
43768  # to not find them
43769  if test "x$new_path" = x \
43770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43772    new_path=`$CYGPATH -u "$path"`
43773  fi
43774  if test "x$new_path" = x; then
43775    # Oops. Which didn't find the executable.
43776    # The splitting of arguments from the executable at a space might have been incorrect,
43777    # since paths with space are more likely in Windows. Give it another try with the whole
43778    # argument.
43779    path="$complete"
43780    arguments="EOL"
43781    new_path=`$CYGPATH -u "$path"`
43782    new_path=`$WHICH "$new_path" 2> /dev/null`
43783    # bat and cmd files are not always considered executable in cygwin causing which
43784    # to not find them
43785    if test "x$new_path" = x \
43786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43788      new_path=`$CYGPATH -u "$path"`
43789    fi
43790    if test "x$new_path" = x; then
43791      # It's still not found. Now this is an unrecoverable error.
43792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43793$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43794      has_space=`$ECHO "$complete" | $GREP " "`
43795      if test "x$has_space" != x; then
43796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43798      fi
43799      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43800    fi
43801  fi
43802
43803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43806  # "foo.exe" is OK but "foo" is an error.
43807  #
43808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43809  # It is also a way to make sure we got the proper file name for the real test later on.
43810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43811  if test "x$test_shortpath" = x; then
43812    # Short path failed, file does not exist as specified.
43813    # Try adding .exe or .cmd
43814    if test -f "${new_path}.exe"; then
43815      input_to_shortpath="${new_path}.exe"
43816    elif test -f "${new_path}.cmd"; then
43817      input_to_shortpath="${new_path}.cmd"
43818    else
43819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43820$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43823      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43824    fi
43825  else
43826    input_to_shortpath="$new_path"
43827  fi
43828
43829  # Call helper function which possibly converts this using DOS-style short mode.
43830  # If so, the updated path is stored in $new_path.
43831  new_path="$input_to_shortpath"
43832
43833  input_path="$input_to_shortpath"
43834  # Check if we need to convert this using DOS-style short mode. If the path
43835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43836  # take no chances and rewrite it.
43837  # Note: m4 eats our [], so we need to use [ and ] instead.
43838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43839  if test "x$has_forbidden_chars" != x; then
43840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43844      # Going to short mode and back again did indeed matter. Since short mode is
43845      # case insensitive, let's make it lowercase to improve readability.
43846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43847      # Now convert it back to Unix-style (cygpath)
43848      input_path=`$CYGPATH -u "$shortmode_path"`
43849      new_path="$input_path"
43850    fi
43851  fi
43852
43853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43854  if test "x$test_cygdrive_prefix" = x; then
43855    # As a simple fix, exclude /usr/bin since it's not a real path.
43856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43858      # a path prefixed by /cygdrive for fixpath to work.
43859      new_path="$CYGWIN_ROOT_PATH$input_path"
43860    fi
43861  fi
43862
43863  # remove trailing .exe if any
43864  new_path="${new_path/%.exe/}"
43865
43866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43867
43868  # First separate the path from the arguments. This will split at the first
43869  # space.
43870  complete="$BUILD_CC"
43871  path="${complete%% *}"
43872  tmp="$complete EOL"
43873  arguments="${tmp#* }"
43874
43875  # Input might be given as Windows format, start by converting to
43876  # unix format.
43877  new_path="$path"
43878
43879  windows_path="$new_path"
43880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43881    unix_path=`$CYGPATH -u "$windows_path"`
43882    new_path="$unix_path"
43883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43885    new_path="$unix_path"
43886  fi
43887
43888
43889  # Now try to locate executable using which
43890  new_path=`$WHICH "$new_path" 2> /dev/null`
43891
43892  if test "x$new_path" = x; then
43893    # Oops. Which didn't find the executable.
43894    # The splitting of arguments from the executable at a space might have been incorrect,
43895    # since paths with space are more likely in Windows. Give it another try with the whole
43896    # argument.
43897    path="$complete"
43898    arguments="EOL"
43899    new_path="$path"
43900
43901  windows_path="$new_path"
43902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43903    unix_path=`$CYGPATH -u "$windows_path"`
43904    new_path="$unix_path"
43905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43907    new_path="$unix_path"
43908  fi
43909
43910
43911    new_path=`$WHICH "$new_path" 2> /dev/null`
43912    # bat and cmd files are not always considered executable in MSYS causing which
43913    # to not find them
43914    if test "x$new_path" = x \
43915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43917      new_path="$path"
43918
43919  windows_path="$new_path"
43920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43921    unix_path=`$CYGPATH -u "$windows_path"`
43922    new_path="$unix_path"
43923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43925    new_path="$unix_path"
43926  fi
43927
43928    fi
43929
43930    if test "x$new_path" = x; then
43931      # It's still not found. Now this is an unrecoverable error.
43932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43933$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43934      has_space=`$ECHO "$complete" | $GREP " "`
43935      if test "x$has_space" != x; then
43936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43938      fi
43939      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43940    fi
43941  fi
43942
43943  # Now new_path has a complete unix path to the binary
43944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43945    # Keep paths in /bin as-is, but remove trailing .exe if any
43946    new_path="${new_path/%.exe/}"
43947    # Do not save /bin paths to all_fixpath_prefixes!
43948  else
43949    # Not in mixed or Windows style, start by that.
43950    new_path=`cmd //c echo $new_path`
43951
43952  input_path="$new_path"
43953  # Check if we need to convert this using DOS-style short mode. If the path
43954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43955  # take no chances and rewrite it.
43956  # Note: m4 eats our [], so we need to use [ and ] instead.
43957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43958  if test "x$has_forbidden_chars" != x; then
43959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43961  fi
43962
43963    # Output is in $new_path
43964
43965  windows_path="$new_path"
43966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43967    unix_path=`$CYGPATH -u "$windows_path"`
43968    new_path="$unix_path"
43969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43971    new_path="$unix_path"
43972  fi
43973
43974    # remove trailing .exe if any
43975    new_path="${new_path/%.exe/}"
43976
43977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43979  fi
43980
43981    else
43982      # We're on a unix platform. Hooray! :)
43983      # First separate the path from the arguments. This will split at the first
43984      # space.
43985      complete="$BUILD_CC"
43986      path="${complete%% *}"
43987      tmp="$complete EOL"
43988      arguments="${tmp#* }"
43989
43990      # Cannot rely on the command "which" here since it doesn't always work.
43991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43992      if test -z "$is_absolute_path"; then
43993        # Path to executable is not absolute. Find it.
43994        IFS_save="$IFS"
43995        IFS=:
43996        for p in $PATH; do
43997          if test -f "$p/$path" && test -x "$p/$path"; then
43998            new_path="$p/$path"
43999            break
44000          fi
44001        done
44002        IFS="$IFS_save"
44003      else
44004        # This is an absolute path, we can use it without further modifications.
44005        new_path="$path"
44006      fi
44007
44008      if test "x$new_path" = x; then
44009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44010$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44011        has_space=`$ECHO "$complete" | $GREP " "`
44012        if test "x$has_space" != x; then
44013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44015        fi
44016        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44017      fi
44018    fi
44019
44020    # Now join together the path and the arguments once again
44021    if test "x$arguments" != xEOL; then
44022      new_complete="$new_path ${arguments% *}"
44023    else
44024      new_complete="$new_path"
44025    fi
44026
44027    if test "x$complete" != "x$new_complete"; then
44028      BUILD_CC="$new_complete"
44029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44030$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44031    fi
44032  fi
44033
44034
44035
44036
44037  # Publish this variable in the help.
44038
44039
44040  if [ -z "${BUILD_CXX+x}" ]; then
44041    # The variable is not set by user, try to locate tool using the code snippet
44042    for ac_prog in cl CC g++
44043do
44044  # Extract the first word of "$ac_prog", so it can be a program name with args.
44045set dummy $ac_prog; ac_word=$2
44046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44047$as_echo_n "checking for $ac_word... " >&6; }
44048if ${ac_cv_path_BUILD_CXX+:} false; then :
44049  $as_echo_n "(cached) " >&6
44050else
44051  case $BUILD_CXX in
44052  [\\/]* | ?:[\\/]*)
44053  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44054  ;;
44055  *)
44056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44057for as_dir in $PATH
44058do
44059  IFS=$as_save_IFS
44060  test -z "$as_dir" && as_dir=.
44061    for ac_exec_ext in '' $ac_executable_extensions; do
44062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44063    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44065    break 2
44066  fi
44067done
44068  done
44069IFS=$as_save_IFS
44070
44071  ;;
44072esac
44073fi
44074BUILD_CXX=$ac_cv_path_BUILD_CXX
44075if test -n "$BUILD_CXX"; then
44076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44077$as_echo "$BUILD_CXX" >&6; }
44078else
44079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44080$as_echo "no" >&6; }
44081fi
44082
44083
44084  test -n "$BUILD_CXX" && break
44085done
44086
44087  else
44088    # The variable is set, but is it from the command line or the environment?
44089
44090    # Try to remove the string !BUILD_CXX! from our list.
44091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44093      # If it failed, the variable was not from the command line. Ignore it,
44094      # but warn the user (except for BASH, which is always set by the calling BASH).
44095      if test "xBUILD_CXX" != xBASH; then
44096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44097$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44098      fi
44099      # Try to locate tool using the code snippet
44100      for ac_prog in cl CC g++
44101do
44102  # Extract the first word of "$ac_prog", so it can be a program name with args.
44103set dummy $ac_prog; ac_word=$2
44104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44105$as_echo_n "checking for $ac_word... " >&6; }
44106if ${ac_cv_path_BUILD_CXX+:} false; then :
44107  $as_echo_n "(cached) " >&6
44108else
44109  case $BUILD_CXX in
44110  [\\/]* | ?:[\\/]*)
44111  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44112  ;;
44113  *)
44114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44115for as_dir in $PATH
44116do
44117  IFS=$as_save_IFS
44118  test -z "$as_dir" && as_dir=.
44119    for ac_exec_ext in '' $ac_executable_extensions; do
44120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44121    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44123    break 2
44124  fi
44125done
44126  done
44127IFS=$as_save_IFS
44128
44129  ;;
44130esac
44131fi
44132BUILD_CXX=$ac_cv_path_BUILD_CXX
44133if test -n "$BUILD_CXX"; then
44134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44135$as_echo "$BUILD_CXX" >&6; }
44136else
44137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44138$as_echo "no" >&6; }
44139fi
44140
44141
44142  test -n "$BUILD_CXX" && break
44143done
44144
44145    else
44146      # If it succeeded, then it was overridden by the user. We will use it
44147      # for the tool.
44148
44149      # First remove it from the list of overridden variables, so we can test
44150      # for unknown variables in the end.
44151      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44152
44153      # Check if we try to supply an empty value
44154      if test "x$BUILD_CXX" = x; then
44155        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44156$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44158$as_echo_n "checking for BUILD_CXX... " >&6; }
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44160$as_echo "disabled" >&6; }
44161      else
44162        # Check if the provided tool contains a complete path.
44163        tool_specified="$BUILD_CXX"
44164        tool_basename="${tool_specified##*/}"
44165        if test "x$tool_basename" = "x$tool_specified"; then
44166          # A command without a complete path is provided, search $PATH.
44167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44168$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44169          # Extract the first word of "$tool_basename", so it can be a program name with args.
44170set dummy $tool_basename; ac_word=$2
44171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44172$as_echo_n "checking for $ac_word... " >&6; }
44173if ${ac_cv_path_BUILD_CXX+:} false; then :
44174  $as_echo_n "(cached) " >&6
44175else
44176  case $BUILD_CXX in
44177  [\\/]* | ?:[\\/]*)
44178  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44179  ;;
44180  *)
44181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44182for as_dir in $PATH
44183do
44184  IFS=$as_save_IFS
44185  test -z "$as_dir" && as_dir=.
44186    for ac_exec_ext in '' $ac_executable_extensions; do
44187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44188    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44190    break 2
44191  fi
44192done
44193  done
44194IFS=$as_save_IFS
44195
44196  ;;
44197esac
44198fi
44199BUILD_CXX=$ac_cv_path_BUILD_CXX
44200if test -n "$BUILD_CXX"; then
44201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44202$as_echo "$BUILD_CXX" >&6; }
44203else
44204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44205$as_echo "no" >&6; }
44206fi
44207
44208
44209          if test "x$BUILD_CXX" = x; then
44210            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44211          fi
44212        else
44213          # Otherwise we believe it is a complete path. Use it as it is.
44214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44215$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44216          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44217$as_echo_n "checking for BUILD_CXX... " >&6; }
44218          if test ! -x "$tool_specified"; then
44219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44220$as_echo "not found" >&6; }
44221            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44222          fi
44223          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44224$as_echo "$tool_specified" >&6; }
44225        fi
44226      fi
44227    fi
44228
44229  fi
44230
44231
44232
44233  if test "x$BUILD_CXX" = x; then
44234    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44235  fi
44236
44237
44238
44239  # Only process if variable expands to non-empty
44240
44241  if test "x$BUILD_CXX" != x; then
44242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44243
44244  # First separate the path from the arguments. This will split at the first
44245  # space.
44246  complete="$BUILD_CXX"
44247  path="${complete%% *}"
44248  tmp="$complete EOL"
44249  arguments="${tmp#* }"
44250
44251  # Input might be given as Windows format, start by converting to
44252  # unix format.
44253  new_path=`$CYGPATH -u "$path"`
44254
44255  # Now try to locate executable using which
44256  new_path=`$WHICH "$new_path" 2> /dev/null`
44257  # bat and cmd files are not always considered executable in cygwin causing which
44258  # to not find them
44259  if test "x$new_path" = x \
44260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44262    new_path=`$CYGPATH -u "$path"`
44263  fi
44264  if test "x$new_path" = x; then
44265    # Oops. Which didn't find the executable.
44266    # The splitting of arguments from the executable at a space might have been incorrect,
44267    # since paths with space are more likely in Windows. Give it another try with the whole
44268    # argument.
44269    path="$complete"
44270    arguments="EOL"
44271    new_path=`$CYGPATH -u "$path"`
44272    new_path=`$WHICH "$new_path" 2> /dev/null`
44273    # bat and cmd files are not always considered executable in cygwin causing which
44274    # to not find them
44275    if test "x$new_path" = x \
44276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44278      new_path=`$CYGPATH -u "$path"`
44279    fi
44280    if test "x$new_path" = x; then
44281      # It's still not found. Now this is an unrecoverable error.
44282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44283$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44284      has_space=`$ECHO "$complete" | $GREP " "`
44285      if test "x$has_space" != x; then
44286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44288      fi
44289      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44290    fi
44291  fi
44292
44293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44296  # "foo.exe" is OK but "foo" is an error.
44297  #
44298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44299  # It is also a way to make sure we got the proper file name for the real test later on.
44300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44301  if test "x$test_shortpath" = x; then
44302    # Short path failed, file does not exist as specified.
44303    # Try adding .exe or .cmd
44304    if test -f "${new_path}.exe"; then
44305      input_to_shortpath="${new_path}.exe"
44306    elif test -f "${new_path}.cmd"; then
44307      input_to_shortpath="${new_path}.cmd"
44308    else
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44310$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44313      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44314    fi
44315  else
44316    input_to_shortpath="$new_path"
44317  fi
44318
44319  # Call helper function which possibly converts this using DOS-style short mode.
44320  # If so, the updated path is stored in $new_path.
44321  new_path="$input_to_shortpath"
44322
44323  input_path="$input_to_shortpath"
44324  # Check if we need to convert this using DOS-style short mode. If the path
44325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44326  # take no chances and rewrite it.
44327  # Note: m4 eats our [], so we need to use [ and ] instead.
44328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44329  if test "x$has_forbidden_chars" != x; then
44330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44334      # Going to short mode and back again did indeed matter. Since short mode is
44335      # case insensitive, let's make it lowercase to improve readability.
44336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44337      # Now convert it back to Unix-style (cygpath)
44338      input_path=`$CYGPATH -u "$shortmode_path"`
44339      new_path="$input_path"
44340    fi
44341  fi
44342
44343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44344  if test "x$test_cygdrive_prefix" = x; then
44345    # As a simple fix, exclude /usr/bin since it's not a real path.
44346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44348      # a path prefixed by /cygdrive for fixpath to work.
44349      new_path="$CYGWIN_ROOT_PATH$input_path"
44350    fi
44351  fi
44352
44353  # remove trailing .exe if any
44354  new_path="${new_path/%.exe/}"
44355
44356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44357
44358  # First separate the path from the arguments. This will split at the first
44359  # space.
44360  complete="$BUILD_CXX"
44361  path="${complete%% *}"
44362  tmp="$complete EOL"
44363  arguments="${tmp#* }"
44364
44365  # Input might be given as Windows format, start by converting to
44366  # unix format.
44367  new_path="$path"
44368
44369  windows_path="$new_path"
44370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44371    unix_path=`$CYGPATH -u "$windows_path"`
44372    new_path="$unix_path"
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44375    new_path="$unix_path"
44376  fi
44377
44378
44379  # Now try to locate executable using which
44380  new_path=`$WHICH "$new_path" 2> /dev/null`
44381
44382  if test "x$new_path" = x; then
44383    # Oops. Which didn't find the executable.
44384    # The splitting of arguments from the executable at a space might have been incorrect,
44385    # since paths with space are more likely in Windows. Give it another try with the whole
44386    # argument.
44387    path="$complete"
44388    arguments="EOL"
44389    new_path="$path"
44390
44391  windows_path="$new_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    unix_path=`$CYGPATH -u "$windows_path"`
44394    new_path="$unix_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44397    new_path="$unix_path"
44398  fi
44399
44400
44401    new_path=`$WHICH "$new_path" 2> /dev/null`
44402    # bat and cmd files are not always considered executable in MSYS causing which
44403    # to not find them
44404    if test "x$new_path" = x \
44405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44407      new_path="$path"
44408
44409  windows_path="$new_path"
44410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44411    unix_path=`$CYGPATH -u "$windows_path"`
44412    new_path="$unix_path"
44413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44415    new_path="$unix_path"
44416  fi
44417
44418    fi
44419
44420    if test "x$new_path" = x; then
44421      # It's still not found. Now this is an unrecoverable error.
44422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44423$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44424      has_space=`$ECHO "$complete" | $GREP " "`
44425      if test "x$has_space" != x; then
44426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44428      fi
44429      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44430    fi
44431  fi
44432
44433  # Now new_path has a complete unix path to the binary
44434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44435    # Keep paths in /bin as-is, but remove trailing .exe if any
44436    new_path="${new_path/%.exe/}"
44437    # Do not save /bin paths to all_fixpath_prefixes!
44438  else
44439    # Not in mixed or Windows style, start by that.
44440    new_path=`cmd //c echo $new_path`
44441
44442  input_path="$new_path"
44443  # Check if we need to convert this using DOS-style short mode. If the path
44444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44445  # take no chances and rewrite it.
44446  # Note: m4 eats our [], so we need to use [ and ] instead.
44447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44448  if test "x$has_forbidden_chars" != x; then
44449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44451  fi
44452
44453    # Output is in $new_path
44454
44455  windows_path="$new_path"
44456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44457    unix_path=`$CYGPATH -u "$windows_path"`
44458    new_path="$unix_path"
44459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44461    new_path="$unix_path"
44462  fi
44463
44464    # remove trailing .exe if any
44465    new_path="${new_path/%.exe/}"
44466
44467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44469  fi
44470
44471    else
44472      # We're on a unix platform. Hooray! :)
44473      # First separate the path from the arguments. This will split at the first
44474      # space.
44475      complete="$BUILD_CXX"
44476      path="${complete%% *}"
44477      tmp="$complete EOL"
44478      arguments="${tmp#* }"
44479
44480      # Cannot rely on the command "which" here since it doesn't always work.
44481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44482      if test -z "$is_absolute_path"; then
44483        # Path to executable is not absolute. Find it.
44484        IFS_save="$IFS"
44485        IFS=:
44486        for p in $PATH; do
44487          if test -f "$p/$path" && test -x "$p/$path"; then
44488            new_path="$p/$path"
44489            break
44490          fi
44491        done
44492        IFS="$IFS_save"
44493      else
44494        # This is an absolute path, we can use it without further modifications.
44495        new_path="$path"
44496      fi
44497
44498      if test "x$new_path" = x; then
44499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44500$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44501        has_space=`$ECHO "$complete" | $GREP " "`
44502        if test "x$has_space" != x; then
44503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44505        fi
44506        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44507      fi
44508    fi
44509
44510    # Now join together the path and the arguments once again
44511    if test "x$arguments" != xEOL; then
44512      new_complete="$new_path ${arguments% *}"
44513    else
44514      new_complete="$new_path"
44515    fi
44516
44517    if test "x$complete" != "x$new_complete"; then
44518      BUILD_CXX="$new_complete"
44519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44520$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44521    fi
44522  fi
44523
44524
44525
44526  # Publish this variable in the help.
44527
44528
44529  if [ -z "${BUILD_NM+x}" ]; then
44530    # The variable is not set by user, try to locate tool using the code snippet
44531    for ac_prog in nm gcc-nm
44532do
44533  # Extract the first word of "$ac_prog", so it can be a program name with args.
44534set dummy $ac_prog; ac_word=$2
44535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44536$as_echo_n "checking for $ac_word... " >&6; }
44537if ${ac_cv_path_BUILD_NM+:} false; then :
44538  $as_echo_n "(cached) " >&6
44539else
44540  case $BUILD_NM in
44541  [\\/]* | ?:[\\/]*)
44542  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44543  ;;
44544  *)
44545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44546for as_dir in $PATH
44547do
44548  IFS=$as_save_IFS
44549  test -z "$as_dir" && as_dir=.
44550    for ac_exec_ext in '' $ac_executable_extensions; do
44551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44552    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44554    break 2
44555  fi
44556done
44557  done
44558IFS=$as_save_IFS
44559
44560  ;;
44561esac
44562fi
44563BUILD_NM=$ac_cv_path_BUILD_NM
44564if test -n "$BUILD_NM"; then
44565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44566$as_echo "$BUILD_NM" >&6; }
44567else
44568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44569$as_echo "no" >&6; }
44570fi
44571
44572
44573  test -n "$BUILD_NM" && break
44574done
44575
44576  else
44577    # The variable is set, but is it from the command line or the environment?
44578
44579    # Try to remove the string !BUILD_NM! from our list.
44580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44582      # If it failed, the variable was not from the command line. Ignore it,
44583      # but warn the user (except for BASH, which is always set by the calling BASH).
44584      if test "xBUILD_NM" != xBASH; then
44585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44586$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44587      fi
44588      # Try to locate tool using the code snippet
44589      for ac_prog in nm gcc-nm
44590do
44591  # Extract the first word of "$ac_prog", so it can be a program name with args.
44592set dummy $ac_prog; ac_word=$2
44593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44594$as_echo_n "checking for $ac_word... " >&6; }
44595if ${ac_cv_path_BUILD_NM+:} false; then :
44596  $as_echo_n "(cached) " >&6
44597else
44598  case $BUILD_NM in
44599  [\\/]* | ?:[\\/]*)
44600  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44601  ;;
44602  *)
44603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44604for as_dir in $PATH
44605do
44606  IFS=$as_save_IFS
44607  test -z "$as_dir" && as_dir=.
44608    for ac_exec_ext in '' $ac_executable_extensions; do
44609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44610    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44612    break 2
44613  fi
44614done
44615  done
44616IFS=$as_save_IFS
44617
44618  ;;
44619esac
44620fi
44621BUILD_NM=$ac_cv_path_BUILD_NM
44622if test -n "$BUILD_NM"; then
44623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44624$as_echo "$BUILD_NM" >&6; }
44625else
44626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44627$as_echo "no" >&6; }
44628fi
44629
44630
44631  test -n "$BUILD_NM" && break
44632done
44633
44634    else
44635      # If it succeeded, then it was overridden by the user. We will use it
44636      # for the tool.
44637
44638      # First remove it from the list of overridden variables, so we can test
44639      # for unknown variables in the end.
44640      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44641
44642      # Check if we try to supply an empty value
44643      if test "x$BUILD_NM" = x; then
44644        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44645$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44646        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44647$as_echo_n "checking for BUILD_NM... " >&6; }
44648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44649$as_echo "disabled" >&6; }
44650      else
44651        # Check if the provided tool contains a complete path.
44652        tool_specified="$BUILD_NM"
44653        tool_basename="${tool_specified##*/}"
44654        if test "x$tool_basename" = "x$tool_specified"; then
44655          # A command without a complete path is provided, search $PATH.
44656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44657$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44658          # Extract the first word of "$tool_basename", so it can be a program name with args.
44659set dummy $tool_basename; ac_word=$2
44660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44661$as_echo_n "checking for $ac_word... " >&6; }
44662if ${ac_cv_path_BUILD_NM+:} false; then :
44663  $as_echo_n "(cached) " >&6
44664else
44665  case $BUILD_NM in
44666  [\\/]* | ?:[\\/]*)
44667  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44668  ;;
44669  *)
44670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44671for as_dir in $PATH
44672do
44673  IFS=$as_save_IFS
44674  test -z "$as_dir" && as_dir=.
44675    for ac_exec_ext in '' $ac_executable_extensions; do
44676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44677    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44679    break 2
44680  fi
44681done
44682  done
44683IFS=$as_save_IFS
44684
44685  ;;
44686esac
44687fi
44688BUILD_NM=$ac_cv_path_BUILD_NM
44689if test -n "$BUILD_NM"; then
44690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44691$as_echo "$BUILD_NM" >&6; }
44692else
44693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44694$as_echo "no" >&6; }
44695fi
44696
44697
44698          if test "x$BUILD_NM" = x; then
44699            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44700          fi
44701        else
44702          # Otherwise we believe it is a complete path. Use it as it is.
44703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44704$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44705          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44706$as_echo_n "checking for BUILD_NM... " >&6; }
44707          if test ! -x "$tool_specified"; then
44708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44709$as_echo "not found" >&6; }
44710            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44711          fi
44712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44713$as_echo "$tool_specified" >&6; }
44714        fi
44715      fi
44716    fi
44717
44718  fi
44719
44720
44721
44722  # Only process if variable expands to non-empty
44723
44724  if test "x$BUILD_NM" != x; then
44725    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44726
44727  # First separate the path from the arguments. This will split at the first
44728  # space.
44729  complete="$BUILD_NM"
44730  path="${complete%% *}"
44731  tmp="$complete EOL"
44732  arguments="${tmp#* }"
44733
44734  # Input might be given as Windows format, start by converting to
44735  # unix format.
44736  new_path=`$CYGPATH -u "$path"`
44737
44738  # Now try to locate executable using which
44739  new_path=`$WHICH "$new_path" 2> /dev/null`
44740  # bat and cmd files are not always considered executable in cygwin causing which
44741  # to not find them
44742  if test "x$new_path" = x \
44743      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44744      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44745    new_path=`$CYGPATH -u "$path"`
44746  fi
44747  if test "x$new_path" = x; then
44748    # Oops. Which didn't find the executable.
44749    # The splitting of arguments from the executable at a space might have been incorrect,
44750    # since paths with space are more likely in Windows. Give it another try with the whole
44751    # argument.
44752    path="$complete"
44753    arguments="EOL"
44754    new_path=`$CYGPATH -u "$path"`
44755    new_path=`$WHICH "$new_path" 2> /dev/null`
44756    # bat and cmd files are not always considered executable in cygwin causing which
44757    # to not find them
44758    if test "x$new_path" = x \
44759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44761      new_path=`$CYGPATH -u "$path"`
44762    fi
44763    if test "x$new_path" = x; then
44764      # It's still not found. Now this is an unrecoverable error.
44765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44766$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44767      has_space=`$ECHO "$complete" | $GREP " "`
44768      if test "x$has_space" != x; then
44769        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44770$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44771      fi
44772      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44773    fi
44774  fi
44775
44776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44779  # "foo.exe" is OK but "foo" is an error.
44780  #
44781  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44782  # It is also a way to make sure we got the proper file name for the real test later on.
44783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44784  if test "x$test_shortpath" = x; then
44785    # Short path failed, file does not exist as specified.
44786    # Try adding .exe or .cmd
44787    if test -f "${new_path}.exe"; then
44788      input_to_shortpath="${new_path}.exe"
44789    elif test -f "${new_path}.cmd"; then
44790      input_to_shortpath="${new_path}.cmd"
44791    else
44792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44793$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44794      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44795$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44796      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44797    fi
44798  else
44799    input_to_shortpath="$new_path"
44800  fi
44801
44802  # Call helper function which possibly converts this using DOS-style short mode.
44803  # If so, the updated path is stored in $new_path.
44804  new_path="$input_to_shortpath"
44805
44806  input_path="$input_to_shortpath"
44807  # Check if we need to convert this using DOS-style short mode. If the path
44808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44809  # take no chances and rewrite it.
44810  # Note: m4 eats our [], so we need to use [ and ] instead.
44811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44812  if test "x$has_forbidden_chars" != x; then
44813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44817      # Going to short mode and back again did indeed matter. Since short mode is
44818      # case insensitive, let's make it lowercase to improve readability.
44819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44820      # Now convert it back to Unix-style (cygpath)
44821      input_path=`$CYGPATH -u "$shortmode_path"`
44822      new_path="$input_path"
44823    fi
44824  fi
44825
44826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44827  if test "x$test_cygdrive_prefix" = x; then
44828    # As a simple fix, exclude /usr/bin since it's not a real path.
44829    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44831      # a path prefixed by /cygdrive for fixpath to work.
44832      new_path="$CYGWIN_ROOT_PATH$input_path"
44833    fi
44834  fi
44835
44836  # remove trailing .exe if any
44837  new_path="${new_path/%.exe/}"
44838
44839    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44840
44841  # First separate the path from the arguments. This will split at the first
44842  # space.
44843  complete="$BUILD_NM"
44844  path="${complete%% *}"
44845  tmp="$complete EOL"
44846  arguments="${tmp#* }"
44847
44848  # Input might be given as Windows format, start by converting to
44849  # unix format.
44850  new_path="$path"
44851
44852  windows_path="$new_path"
44853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44854    unix_path=`$CYGPATH -u "$windows_path"`
44855    new_path="$unix_path"
44856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44858    new_path="$unix_path"
44859  fi
44860
44861
44862  # Now try to locate executable using which
44863  new_path=`$WHICH "$new_path" 2> /dev/null`
44864
44865  if test "x$new_path" = x; then
44866    # Oops. Which didn't find the executable.
44867    # The splitting of arguments from the executable at a space might have been incorrect,
44868    # since paths with space are more likely in Windows. Give it another try with the whole
44869    # argument.
44870    path="$complete"
44871    arguments="EOL"
44872    new_path="$path"
44873
44874  windows_path="$new_path"
44875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44876    unix_path=`$CYGPATH -u "$windows_path"`
44877    new_path="$unix_path"
44878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44880    new_path="$unix_path"
44881  fi
44882
44883
44884    new_path=`$WHICH "$new_path" 2> /dev/null`
44885    # bat and cmd files are not always considered executable in MSYS causing which
44886    # to not find them
44887    if test "x$new_path" = x \
44888        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44889        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44890      new_path="$path"
44891
44892  windows_path="$new_path"
44893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44894    unix_path=`$CYGPATH -u "$windows_path"`
44895    new_path="$unix_path"
44896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44898    new_path="$unix_path"
44899  fi
44900
44901    fi
44902
44903    if test "x$new_path" = x; then
44904      # It's still not found. Now this is an unrecoverable error.
44905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44906$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44907      has_space=`$ECHO "$complete" | $GREP " "`
44908      if test "x$has_space" != x; then
44909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44911      fi
44912      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44913    fi
44914  fi
44915
44916  # Now new_path has a complete unix path to the binary
44917  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44918    # Keep paths in /bin as-is, but remove trailing .exe if any
44919    new_path="${new_path/%.exe/}"
44920    # Do not save /bin paths to all_fixpath_prefixes!
44921  else
44922    # Not in mixed or Windows style, start by that.
44923    new_path=`cmd //c echo $new_path`
44924
44925  input_path="$new_path"
44926  # Check if we need to convert this using DOS-style short mode. If the path
44927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44928  # take no chances and rewrite it.
44929  # Note: m4 eats our [], so we need to use [ and ] instead.
44930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44931  if test "x$has_forbidden_chars" != x; then
44932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44934  fi
44935
44936    # Output is in $new_path
44937
44938  windows_path="$new_path"
44939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44940    unix_path=`$CYGPATH -u "$windows_path"`
44941    new_path="$unix_path"
44942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44944    new_path="$unix_path"
44945  fi
44946
44947    # remove trailing .exe if any
44948    new_path="${new_path/%.exe/}"
44949
44950    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44951    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44952  fi
44953
44954    else
44955      # We're on a unix platform. Hooray! :)
44956      # First separate the path from the arguments. This will split at the first
44957      # space.
44958      complete="$BUILD_NM"
44959      path="${complete%% *}"
44960      tmp="$complete EOL"
44961      arguments="${tmp#* }"
44962
44963      # Cannot rely on the command "which" here since it doesn't always work.
44964      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44965      if test -z "$is_absolute_path"; then
44966        # Path to executable is not absolute. Find it.
44967        IFS_save="$IFS"
44968        IFS=:
44969        for p in $PATH; do
44970          if test -f "$p/$path" && test -x "$p/$path"; then
44971            new_path="$p/$path"
44972            break
44973          fi
44974        done
44975        IFS="$IFS_save"
44976      else
44977        # This is an absolute path, we can use it without further modifications.
44978        new_path="$path"
44979      fi
44980
44981      if test "x$new_path" = x; then
44982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44983$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44984        has_space=`$ECHO "$complete" | $GREP " "`
44985        if test "x$has_space" != x; then
44986          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44987$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44988        fi
44989        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44990      fi
44991    fi
44992
44993    # Now join together the path and the arguments once again
44994    if test "x$arguments" != xEOL; then
44995      new_complete="$new_path ${arguments% *}"
44996    else
44997      new_complete="$new_path"
44998    fi
44999
45000    if test "x$complete" != "x$new_complete"; then
45001      BUILD_NM="$new_complete"
45002      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45003$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45004    fi
45005  fi
45006
45007
45008
45009  # Publish this variable in the help.
45010
45011
45012  if [ -z "${BUILD_AR+x}" ]; then
45013    # The variable is not set by user, try to locate tool using the code snippet
45014    for ac_prog in ar gcc-ar
45015do
45016  # Extract the first word of "$ac_prog", so it can be a program name with args.
45017set dummy $ac_prog; ac_word=$2
45018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45019$as_echo_n "checking for $ac_word... " >&6; }
45020if ${ac_cv_path_BUILD_AR+:} false; then :
45021  $as_echo_n "(cached) " >&6
45022else
45023  case $BUILD_AR in
45024  [\\/]* | ?:[\\/]*)
45025  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45026  ;;
45027  *)
45028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45029for as_dir in $PATH
45030do
45031  IFS=$as_save_IFS
45032  test -z "$as_dir" && as_dir=.
45033    for ac_exec_ext in '' $ac_executable_extensions; do
45034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45035    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45037    break 2
45038  fi
45039done
45040  done
45041IFS=$as_save_IFS
45042
45043  ;;
45044esac
45045fi
45046BUILD_AR=$ac_cv_path_BUILD_AR
45047if test -n "$BUILD_AR"; then
45048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45049$as_echo "$BUILD_AR" >&6; }
45050else
45051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45052$as_echo "no" >&6; }
45053fi
45054
45055
45056  test -n "$BUILD_AR" && break
45057done
45058
45059  else
45060    # The variable is set, but is it from the command line or the environment?
45061
45062    # Try to remove the string !BUILD_AR! from our list.
45063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45065      # If it failed, the variable was not from the command line. Ignore it,
45066      # but warn the user (except for BASH, which is always set by the calling BASH).
45067      if test "xBUILD_AR" != xBASH; then
45068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45069$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45070      fi
45071      # Try to locate tool using the code snippet
45072      for ac_prog in ar gcc-ar
45073do
45074  # Extract the first word of "$ac_prog", so it can be a program name with args.
45075set dummy $ac_prog; ac_word=$2
45076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45077$as_echo_n "checking for $ac_word... " >&6; }
45078if ${ac_cv_path_BUILD_AR+:} false; then :
45079  $as_echo_n "(cached) " >&6
45080else
45081  case $BUILD_AR in
45082  [\\/]* | ?:[\\/]*)
45083  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45084  ;;
45085  *)
45086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45087for as_dir in $PATH
45088do
45089  IFS=$as_save_IFS
45090  test -z "$as_dir" && as_dir=.
45091    for ac_exec_ext in '' $ac_executable_extensions; do
45092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45093    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45095    break 2
45096  fi
45097done
45098  done
45099IFS=$as_save_IFS
45100
45101  ;;
45102esac
45103fi
45104BUILD_AR=$ac_cv_path_BUILD_AR
45105if test -n "$BUILD_AR"; then
45106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45107$as_echo "$BUILD_AR" >&6; }
45108else
45109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45110$as_echo "no" >&6; }
45111fi
45112
45113
45114  test -n "$BUILD_AR" && break
45115done
45116
45117    else
45118      # If it succeeded, then it was overridden by the user. We will use it
45119      # for the tool.
45120
45121      # First remove it from the list of overridden variables, so we can test
45122      # for unknown variables in the end.
45123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45124
45125      # Check if we try to supply an empty value
45126      if test "x$BUILD_AR" = x; then
45127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45128$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45130$as_echo_n "checking for BUILD_AR... " >&6; }
45131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45132$as_echo "disabled" >&6; }
45133      else
45134        # Check if the provided tool contains a complete path.
45135        tool_specified="$BUILD_AR"
45136        tool_basename="${tool_specified##*/}"
45137        if test "x$tool_basename" = "x$tool_specified"; then
45138          # A command without a complete path is provided, search $PATH.
45139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45140$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45141          # Extract the first word of "$tool_basename", so it can be a program name with args.
45142set dummy $tool_basename; ac_word=$2
45143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45144$as_echo_n "checking for $ac_word... " >&6; }
45145if ${ac_cv_path_BUILD_AR+:} false; then :
45146  $as_echo_n "(cached) " >&6
45147else
45148  case $BUILD_AR in
45149  [\\/]* | ?:[\\/]*)
45150  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45151  ;;
45152  *)
45153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45154for as_dir in $PATH
45155do
45156  IFS=$as_save_IFS
45157  test -z "$as_dir" && as_dir=.
45158    for ac_exec_ext in '' $ac_executable_extensions; do
45159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45160    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45162    break 2
45163  fi
45164done
45165  done
45166IFS=$as_save_IFS
45167
45168  ;;
45169esac
45170fi
45171BUILD_AR=$ac_cv_path_BUILD_AR
45172if test -n "$BUILD_AR"; then
45173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45174$as_echo "$BUILD_AR" >&6; }
45175else
45176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45177$as_echo "no" >&6; }
45178fi
45179
45180
45181          if test "x$BUILD_AR" = x; then
45182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45183          fi
45184        else
45185          # Otherwise we believe it is a complete path. Use it as it is.
45186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45187$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45189$as_echo_n "checking for BUILD_AR... " >&6; }
45190          if test ! -x "$tool_specified"; then
45191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45192$as_echo "not found" >&6; }
45193            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45194          fi
45195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45196$as_echo "$tool_specified" >&6; }
45197        fi
45198      fi
45199    fi
45200
45201  fi
45202
45203
45204
45205  # Only process if variable expands to non-empty
45206
45207  if test "x$BUILD_AR" != x; then
45208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45209
45210  # First separate the path from the arguments. This will split at the first
45211  # space.
45212  complete="$BUILD_AR"
45213  path="${complete%% *}"
45214  tmp="$complete EOL"
45215  arguments="${tmp#* }"
45216
45217  # Input might be given as Windows format, start by converting to
45218  # unix format.
45219  new_path=`$CYGPATH -u "$path"`
45220
45221  # Now try to locate executable using which
45222  new_path=`$WHICH "$new_path" 2> /dev/null`
45223  # bat and cmd files are not always considered executable in cygwin causing which
45224  # to not find them
45225  if test "x$new_path" = x \
45226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45228    new_path=`$CYGPATH -u "$path"`
45229  fi
45230  if test "x$new_path" = x; then
45231    # Oops. Which didn't find the executable.
45232    # The splitting of arguments from the executable at a space might have been incorrect,
45233    # since paths with space are more likely in Windows. Give it another try with the whole
45234    # argument.
45235    path="$complete"
45236    arguments="EOL"
45237    new_path=`$CYGPATH -u "$path"`
45238    new_path=`$WHICH "$new_path" 2> /dev/null`
45239    # bat and cmd files are not always considered executable in cygwin causing which
45240    # to not find them
45241    if test "x$new_path" = x \
45242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45244      new_path=`$CYGPATH -u "$path"`
45245    fi
45246    if test "x$new_path" = x; then
45247      # It's still not found. Now this is an unrecoverable error.
45248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45249$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45250      has_space=`$ECHO "$complete" | $GREP " "`
45251      if test "x$has_space" != x; then
45252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45254      fi
45255      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45256    fi
45257  fi
45258
45259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45262  # "foo.exe" is OK but "foo" is an error.
45263  #
45264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45265  # It is also a way to make sure we got the proper file name for the real test later on.
45266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45267  if test "x$test_shortpath" = x; then
45268    # Short path failed, file does not exist as specified.
45269    # Try adding .exe or .cmd
45270    if test -f "${new_path}.exe"; then
45271      input_to_shortpath="${new_path}.exe"
45272    elif test -f "${new_path}.cmd"; then
45273      input_to_shortpath="${new_path}.cmd"
45274    else
45275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45276$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45279      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45280    fi
45281  else
45282    input_to_shortpath="$new_path"
45283  fi
45284
45285  # Call helper function which possibly converts this using DOS-style short mode.
45286  # If so, the updated path is stored in $new_path.
45287  new_path="$input_to_shortpath"
45288
45289  input_path="$input_to_shortpath"
45290  # Check if we need to convert this using DOS-style short mode. If the path
45291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45292  # take no chances and rewrite it.
45293  # Note: m4 eats our [], so we need to use [ and ] instead.
45294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45295  if test "x$has_forbidden_chars" != x; then
45296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45300      # Going to short mode and back again did indeed matter. Since short mode is
45301      # case insensitive, let's make it lowercase to improve readability.
45302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45303      # Now convert it back to Unix-style (cygpath)
45304      input_path=`$CYGPATH -u "$shortmode_path"`
45305      new_path="$input_path"
45306    fi
45307  fi
45308
45309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45310  if test "x$test_cygdrive_prefix" = x; then
45311    # As a simple fix, exclude /usr/bin since it's not a real path.
45312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45314      # a path prefixed by /cygdrive for fixpath to work.
45315      new_path="$CYGWIN_ROOT_PATH$input_path"
45316    fi
45317  fi
45318
45319  # remove trailing .exe if any
45320  new_path="${new_path/%.exe/}"
45321
45322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45323
45324  # First separate the path from the arguments. This will split at the first
45325  # space.
45326  complete="$BUILD_AR"
45327  path="${complete%% *}"
45328  tmp="$complete EOL"
45329  arguments="${tmp#* }"
45330
45331  # Input might be given as Windows format, start by converting to
45332  # unix format.
45333  new_path="$path"
45334
45335  windows_path="$new_path"
45336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337    unix_path=`$CYGPATH -u "$windows_path"`
45338    new_path="$unix_path"
45339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45341    new_path="$unix_path"
45342  fi
45343
45344
45345  # Now try to locate executable using which
45346  new_path=`$WHICH "$new_path" 2> /dev/null`
45347
45348  if test "x$new_path" = x; then
45349    # Oops. Which didn't find the executable.
45350    # The splitting of arguments from the executable at a space might have been incorrect,
45351    # since paths with space are more likely in Windows. Give it another try with the whole
45352    # argument.
45353    path="$complete"
45354    arguments="EOL"
45355    new_path="$path"
45356
45357  windows_path="$new_path"
45358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45359    unix_path=`$CYGPATH -u "$windows_path"`
45360    new_path="$unix_path"
45361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45363    new_path="$unix_path"
45364  fi
45365
45366
45367    new_path=`$WHICH "$new_path" 2> /dev/null`
45368    # bat and cmd files are not always considered executable in MSYS causing which
45369    # to not find them
45370    if test "x$new_path" = x \
45371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45373      new_path="$path"
45374
45375  windows_path="$new_path"
45376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45377    unix_path=`$CYGPATH -u "$windows_path"`
45378    new_path="$unix_path"
45379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45381    new_path="$unix_path"
45382  fi
45383
45384    fi
45385
45386    if test "x$new_path" = x; then
45387      # It's still not found. Now this is an unrecoverable error.
45388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45389$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45390      has_space=`$ECHO "$complete" | $GREP " "`
45391      if test "x$has_space" != x; then
45392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45394      fi
45395      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45396    fi
45397  fi
45398
45399  # Now new_path has a complete unix path to the binary
45400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45401    # Keep paths in /bin as-is, but remove trailing .exe if any
45402    new_path="${new_path/%.exe/}"
45403    # Do not save /bin paths to all_fixpath_prefixes!
45404  else
45405    # Not in mixed or Windows style, start by that.
45406    new_path=`cmd //c echo $new_path`
45407
45408  input_path="$new_path"
45409  # Check if we need to convert this using DOS-style short mode. If the path
45410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45411  # take no chances and rewrite it.
45412  # Note: m4 eats our [], so we need to use [ and ] instead.
45413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45414  if test "x$has_forbidden_chars" != x; then
45415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45417  fi
45418
45419    # Output is in $new_path
45420
45421  windows_path="$new_path"
45422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45423    unix_path=`$CYGPATH -u "$windows_path"`
45424    new_path="$unix_path"
45425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45427    new_path="$unix_path"
45428  fi
45429
45430    # remove trailing .exe if any
45431    new_path="${new_path/%.exe/}"
45432
45433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45435  fi
45436
45437    else
45438      # We're on a unix platform. Hooray! :)
45439      # First separate the path from the arguments. This will split at the first
45440      # space.
45441      complete="$BUILD_AR"
45442      path="${complete%% *}"
45443      tmp="$complete EOL"
45444      arguments="${tmp#* }"
45445
45446      # Cannot rely on the command "which" here since it doesn't always work.
45447      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45448      if test -z "$is_absolute_path"; then
45449        # Path to executable is not absolute. Find it.
45450        IFS_save="$IFS"
45451        IFS=:
45452        for p in $PATH; do
45453          if test -f "$p/$path" && test -x "$p/$path"; then
45454            new_path="$p/$path"
45455            break
45456          fi
45457        done
45458        IFS="$IFS_save"
45459      else
45460        # This is an absolute path, we can use it without further modifications.
45461        new_path="$path"
45462      fi
45463
45464      if test "x$new_path" = x; then
45465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45466$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45467        has_space=`$ECHO "$complete" | $GREP " "`
45468        if test "x$has_space" != x; then
45469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45471        fi
45472        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45473      fi
45474    fi
45475
45476    # Now join together the path and the arguments once again
45477    if test "x$arguments" != xEOL; then
45478      new_complete="$new_path ${arguments% *}"
45479    else
45480      new_complete="$new_path"
45481    fi
45482
45483    if test "x$complete" != "x$new_complete"; then
45484      BUILD_AR="$new_complete"
45485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45486$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45487    fi
45488  fi
45489
45490
45491
45492  # Publish this variable in the help.
45493
45494
45495  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45496    # The variable is not set by user, try to locate tool using the code snippet
45497    for ac_prog in objcopy
45498do
45499  # Extract the first word of "$ac_prog", so it can be a program name with args.
45500set dummy $ac_prog; ac_word=$2
45501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45502$as_echo_n "checking for $ac_word... " >&6; }
45503if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45504  $as_echo_n "(cached) " >&6
45505else
45506  case $BUILD_OBJCOPY in
45507  [\\/]* | ?:[\\/]*)
45508  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45509  ;;
45510  *)
45511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45512for as_dir in $PATH
45513do
45514  IFS=$as_save_IFS
45515  test -z "$as_dir" && as_dir=.
45516    for ac_exec_ext in '' $ac_executable_extensions; do
45517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45518    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45520    break 2
45521  fi
45522done
45523  done
45524IFS=$as_save_IFS
45525
45526  ;;
45527esac
45528fi
45529BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45530if test -n "$BUILD_OBJCOPY"; then
45531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45532$as_echo "$BUILD_OBJCOPY" >&6; }
45533else
45534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45535$as_echo "no" >&6; }
45536fi
45537
45538
45539  test -n "$BUILD_OBJCOPY" && break
45540done
45541
45542  else
45543    # The variable is set, but is it from the command line or the environment?
45544
45545    # Try to remove the string !BUILD_OBJCOPY! from our list.
45546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45548      # If it failed, the variable was not from the command line. Ignore it,
45549      # but warn the user (except for BASH, which is always set by the calling BASH).
45550      if test "xBUILD_OBJCOPY" != xBASH; then
45551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45552$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45553      fi
45554      # Try to locate tool using the code snippet
45555      for ac_prog in objcopy
45556do
45557  # Extract the first word of "$ac_prog", so it can be a program name with args.
45558set dummy $ac_prog; ac_word=$2
45559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45560$as_echo_n "checking for $ac_word... " >&6; }
45561if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45562  $as_echo_n "(cached) " >&6
45563else
45564  case $BUILD_OBJCOPY in
45565  [\\/]* | ?:[\\/]*)
45566  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45567  ;;
45568  *)
45569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45570for as_dir in $PATH
45571do
45572  IFS=$as_save_IFS
45573  test -z "$as_dir" && as_dir=.
45574    for ac_exec_ext in '' $ac_executable_extensions; do
45575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45576    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45578    break 2
45579  fi
45580done
45581  done
45582IFS=$as_save_IFS
45583
45584  ;;
45585esac
45586fi
45587BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45588if test -n "$BUILD_OBJCOPY"; then
45589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45590$as_echo "$BUILD_OBJCOPY" >&6; }
45591else
45592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45593$as_echo "no" >&6; }
45594fi
45595
45596
45597  test -n "$BUILD_OBJCOPY" && break
45598done
45599
45600    else
45601      # If it succeeded, then it was overridden by the user. We will use it
45602      # for the tool.
45603
45604      # First remove it from the list of overridden variables, so we can test
45605      # for unknown variables in the end.
45606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45607
45608      # Check if we try to supply an empty value
45609      if test "x$BUILD_OBJCOPY" = x; then
45610        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45611$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45613$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45615$as_echo "disabled" >&6; }
45616      else
45617        # Check if the provided tool contains a complete path.
45618        tool_specified="$BUILD_OBJCOPY"
45619        tool_basename="${tool_specified##*/}"
45620        if test "x$tool_basename" = "x$tool_specified"; then
45621          # A command without a complete path is provided, search $PATH.
45622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45623$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45624          # Extract the first word of "$tool_basename", so it can be a program name with args.
45625set dummy $tool_basename; ac_word=$2
45626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45627$as_echo_n "checking for $ac_word... " >&6; }
45628if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45629  $as_echo_n "(cached) " >&6
45630else
45631  case $BUILD_OBJCOPY in
45632  [\\/]* | ?:[\\/]*)
45633  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45634  ;;
45635  *)
45636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45637for as_dir in $PATH
45638do
45639  IFS=$as_save_IFS
45640  test -z "$as_dir" && as_dir=.
45641    for ac_exec_ext in '' $ac_executable_extensions; do
45642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45643    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45645    break 2
45646  fi
45647done
45648  done
45649IFS=$as_save_IFS
45650
45651  ;;
45652esac
45653fi
45654BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45655if test -n "$BUILD_OBJCOPY"; then
45656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45657$as_echo "$BUILD_OBJCOPY" >&6; }
45658else
45659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45660$as_echo "no" >&6; }
45661fi
45662
45663
45664          if test "x$BUILD_OBJCOPY" = x; then
45665            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45666          fi
45667        else
45668          # Otherwise we believe it is a complete path. Use it as it is.
45669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45670$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45671          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45672$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45673          if test ! -x "$tool_specified"; then
45674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45675$as_echo "not found" >&6; }
45676            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45677          fi
45678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45679$as_echo "$tool_specified" >&6; }
45680        fi
45681      fi
45682    fi
45683
45684  fi
45685
45686
45687
45688  # Only process if variable expands to non-empty
45689
45690  if test "x$BUILD_OBJCOPY" != x; then
45691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45692
45693  # First separate the path from the arguments. This will split at the first
45694  # space.
45695  complete="$BUILD_OBJCOPY"
45696  path="${complete%% *}"
45697  tmp="$complete EOL"
45698  arguments="${tmp#* }"
45699
45700  # Input might be given as Windows format, start by converting to
45701  # unix format.
45702  new_path=`$CYGPATH -u "$path"`
45703
45704  # Now try to locate executable using which
45705  new_path=`$WHICH "$new_path" 2> /dev/null`
45706  # bat and cmd files are not always considered executable in cygwin causing which
45707  # to not find them
45708  if test "x$new_path" = x \
45709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45711    new_path=`$CYGPATH -u "$path"`
45712  fi
45713  if test "x$new_path" = x; then
45714    # Oops. Which didn't find the executable.
45715    # The splitting of arguments from the executable at a space might have been incorrect,
45716    # since paths with space are more likely in Windows. Give it another try with the whole
45717    # argument.
45718    path="$complete"
45719    arguments="EOL"
45720    new_path=`$CYGPATH -u "$path"`
45721    new_path=`$WHICH "$new_path" 2> /dev/null`
45722    # bat and cmd files are not always considered executable in cygwin causing which
45723    # to not find them
45724    if test "x$new_path" = x \
45725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45727      new_path=`$CYGPATH -u "$path"`
45728    fi
45729    if test "x$new_path" = x; then
45730      # It's still not found. Now this is an unrecoverable error.
45731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45732$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45733      has_space=`$ECHO "$complete" | $GREP " "`
45734      if test "x$has_space" != x; then
45735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45737      fi
45738      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45739    fi
45740  fi
45741
45742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45745  # "foo.exe" is OK but "foo" is an error.
45746  #
45747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45748  # It is also a way to make sure we got the proper file name for the real test later on.
45749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45750  if test "x$test_shortpath" = x; then
45751    # Short path failed, file does not exist as specified.
45752    # Try adding .exe or .cmd
45753    if test -f "${new_path}.exe"; then
45754      input_to_shortpath="${new_path}.exe"
45755    elif test -f "${new_path}.cmd"; then
45756      input_to_shortpath="${new_path}.cmd"
45757    else
45758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45759$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45762      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45763    fi
45764  else
45765    input_to_shortpath="$new_path"
45766  fi
45767
45768  # Call helper function which possibly converts this using DOS-style short mode.
45769  # If so, the updated path is stored in $new_path.
45770  new_path="$input_to_shortpath"
45771
45772  input_path="$input_to_shortpath"
45773  # Check if we need to convert this using DOS-style short mode. If the path
45774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45775  # take no chances and rewrite it.
45776  # Note: m4 eats our [], so we need to use [ and ] instead.
45777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45778  if test "x$has_forbidden_chars" != x; then
45779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45783      # Going to short mode and back again did indeed matter. Since short mode is
45784      # case insensitive, let's make it lowercase to improve readability.
45785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45786      # Now convert it back to Unix-style (cygpath)
45787      input_path=`$CYGPATH -u "$shortmode_path"`
45788      new_path="$input_path"
45789    fi
45790  fi
45791
45792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45793  if test "x$test_cygdrive_prefix" = x; then
45794    # As a simple fix, exclude /usr/bin since it's not a real path.
45795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45797      # a path prefixed by /cygdrive for fixpath to work.
45798      new_path="$CYGWIN_ROOT_PATH$input_path"
45799    fi
45800  fi
45801
45802  # remove trailing .exe if any
45803  new_path="${new_path/%.exe/}"
45804
45805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45806
45807  # First separate the path from the arguments. This will split at the first
45808  # space.
45809  complete="$BUILD_OBJCOPY"
45810  path="${complete%% *}"
45811  tmp="$complete EOL"
45812  arguments="${tmp#* }"
45813
45814  # Input might be given as Windows format, start by converting to
45815  # unix format.
45816  new_path="$path"
45817
45818  windows_path="$new_path"
45819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45820    unix_path=`$CYGPATH -u "$windows_path"`
45821    new_path="$unix_path"
45822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45824    new_path="$unix_path"
45825  fi
45826
45827
45828  # Now try to locate executable using which
45829  new_path=`$WHICH "$new_path" 2> /dev/null`
45830
45831  if test "x$new_path" = x; then
45832    # Oops. Which didn't find the executable.
45833    # The splitting of arguments from the executable at a space might have been incorrect,
45834    # since paths with space are more likely in Windows. Give it another try with the whole
45835    # argument.
45836    path="$complete"
45837    arguments="EOL"
45838    new_path="$path"
45839
45840  windows_path="$new_path"
45841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45842    unix_path=`$CYGPATH -u "$windows_path"`
45843    new_path="$unix_path"
45844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45846    new_path="$unix_path"
45847  fi
45848
45849
45850    new_path=`$WHICH "$new_path" 2> /dev/null`
45851    # bat and cmd files are not always considered executable in MSYS causing which
45852    # to not find them
45853    if test "x$new_path" = x \
45854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45856      new_path="$path"
45857
45858  windows_path="$new_path"
45859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860    unix_path=`$CYGPATH -u "$windows_path"`
45861    new_path="$unix_path"
45862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45864    new_path="$unix_path"
45865  fi
45866
45867    fi
45868
45869    if test "x$new_path" = x; then
45870      # It's still not found. Now this is an unrecoverable error.
45871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45872$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45873      has_space=`$ECHO "$complete" | $GREP " "`
45874      if test "x$has_space" != x; then
45875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45877      fi
45878      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45879    fi
45880  fi
45881
45882  # Now new_path has a complete unix path to the binary
45883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45884    # Keep paths in /bin as-is, but remove trailing .exe if any
45885    new_path="${new_path/%.exe/}"
45886    # Do not save /bin paths to all_fixpath_prefixes!
45887  else
45888    # Not in mixed or Windows style, start by that.
45889    new_path=`cmd //c echo $new_path`
45890
45891  input_path="$new_path"
45892  # Check if we need to convert this using DOS-style short mode. If the path
45893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45894  # take no chances and rewrite it.
45895  # Note: m4 eats our [], so we need to use [ and ] instead.
45896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45897  if test "x$has_forbidden_chars" != x; then
45898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45900  fi
45901
45902    # Output is in $new_path
45903
45904  windows_path="$new_path"
45905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45906    unix_path=`$CYGPATH -u "$windows_path"`
45907    new_path="$unix_path"
45908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45910    new_path="$unix_path"
45911  fi
45912
45913    # remove trailing .exe if any
45914    new_path="${new_path/%.exe/}"
45915
45916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45918  fi
45919
45920    else
45921      # We're on a unix platform. Hooray! :)
45922      # First separate the path from the arguments. This will split at the first
45923      # space.
45924      complete="$BUILD_OBJCOPY"
45925      path="${complete%% *}"
45926      tmp="$complete EOL"
45927      arguments="${tmp#* }"
45928
45929      # Cannot rely on the command "which" here since it doesn't always work.
45930      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45931      if test -z "$is_absolute_path"; then
45932        # Path to executable is not absolute. Find it.
45933        IFS_save="$IFS"
45934        IFS=:
45935        for p in $PATH; do
45936          if test -f "$p/$path" && test -x "$p/$path"; then
45937            new_path="$p/$path"
45938            break
45939          fi
45940        done
45941        IFS="$IFS_save"
45942      else
45943        # This is an absolute path, we can use it without further modifications.
45944        new_path="$path"
45945      fi
45946
45947      if test "x$new_path" = x; then
45948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45949$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45950        has_space=`$ECHO "$complete" | $GREP " "`
45951        if test "x$has_space" != x; then
45952          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45954        fi
45955        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45956      fi
45957    fi
45958
45959    # Now join together the path and the arguments once again
45960    if test "x$arguments" != xEOL; then
45961      new_complete="$new_path ${arguments% *}"
45962    else
45963      new_complete="$new_path"
45964    fi
45965
45966    if test "x$complete" != "x$new_complete"; then
45967      BUILD_OBJCOPY="$new_complete"
45968      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45969$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45970    fi
45971  fi
45972
45973
45974
45975  # Publish this variable in the help.
45976
45977
45978  if [ -z "${BUILD_STRIP+x}" ]; then
45979    # The variable is not set by user, try to locate tool using the code snippet
45980    for ac_prog in strip
45981do
45982  # Extract the first word of "$ac_prog", so it can be a program name with args.
45983set dummy $ac_prog; ac_word=$2
45984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45985$as_echo_n "checking for $ac_word... " >&6; }
45986if ${ac_cv_path_BUILD_STRIP+:} false; then :
45987  $as_echo_n "(cached) " >&6
45988else
45989  case $BUILD_STRIP in
45990  [\\/]* | ?:[\\/]*)
45991  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45992  ;;
45993  *)
45994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45995for as_dir in $PATH
45996do
45997  IFS=$as_save_IFS
45998  test -z "$as_dir" && as_dir=.
45999    for ac_exec_ext in '' $ac_executable_extensions; do
46000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46001    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46003    break 2
46004  fi
46005done
46006  done
46007IFS=$as_save_IFS
46008
46009  ;;
46010esac
46011fi
46012BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46013if test -n "$BUILD_STRIP"; then
46014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46015$as_echo "$BUILD_STRIP" >&6; }
46016else
46017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46018$as_echo "no" >&6; }
46019fi
46020
46021
46022  test -n "$BUILD_STRIP" && break
46023done
46024
46025  else
46026    # The variable is set, but is it from the command line or the environment?
46027
46028    # Try to remove the string !BUILD_STRIP! from our list.
46029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46031      # If it failed, the variable was not from the command line. Ignore it,
46032      # but warn the user (except for BASH, which is always set by the calling BASH).
46033      if test "xBUILD_STRIP" != xBASH; then
46034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46035$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46036      fi
46037      # Try to locate tool using the code snippet
46038      for ac_prog in strip
46039do
46040  # Extract the first word of "$ac_prog", so it can be a program name with args.
46041set dummy $ac_prog; ac_word=$2
46042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46043$as_echo_n "checking for $ac_word... " >&6; }
46044if ${ac_cv_path_BUILD_STRIP+:} false; then :
46045  $as_echo_n "(cached) " >&6
46046else
46047  case $BUILD_STRIP in
46048  [\\/]* | ?:[\\/]*)
46049  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46050  ;;
46051  *)
46052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46053for as_dir in $PATH
46054do
46055  IFS=$as_save_IFS
46056  test -z "$as_dir" && as_dir=.
46057    for ac_exec_ext in '' $ac_executable_extensions; do
46058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46059    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46061    break 2
46062  fi
46063done
46064  done
46065IFS=$as_save_IFS
46066
46067  ;;
46068esac
46069fi
46070BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46071if test -n "$BUILD_STRIP"; then
46072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46073$as_echo "$BUILD_STRIP" >&6; }
46074else
46075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46076$as_echo "no" >&6; }
46077fi
46078
46079
46080  test -n "$BUILD_STRIP" && break
46081done
46082
46083    else
46084      # If it succeeded, then it was overridden by the user. We will use it
46085      # for the tool.
46086
46087      # First remove it from the list of overridden variables, so we can test
46088      # for unknown variables in the end.
46089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46090
46091      # Check if we try to supply an empty value
46092      if test "x$BUILD_STRIP" = x; then
46093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46094$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46096$as_echo_n "checking for BUILD_STRIP... " >&6; }
46097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46098$as_echo "disabled" >&6; }
46099      else
46100        # Check if the provided tool contains a complete path.
46101        tool_specified="$BUILD_STRIP"
46102        tool_basename="${tool_specified##*/}"
46103        if test "x$tool_basename" = "x$tool_specified"; then
46104          # A command without a complete path is provided, search $PATH.
46105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46106$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46107          # Extract the first word of "$tool_basename", so it can be a program name with args.
46108set dummy $tool_basename; ac_word=$2
46109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46110$as_echo_n "checking for $ac_word... " >&6; }
46111if ${ac_cv_path_BUILD_STRIP+:} false; then :
46112  $as_echo_n "(cached) " >&6
46113else
46114  case $BUILD_STRIP in
46115  [\\/]* | ?:[\\/]*)
46116  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46117  ;;
46118  *)
46119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46120for as_dir in $PATH
46121do
46122  IFS=$as_save_IFS
46123  test -z "$as_dir" && as_dir=.
46124    for ac_exec_ext in '' $ac_executable_extensions; do
46125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46126    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46128    break 2
46129  fi
46130done
46131  done
46132IFS=$as_save_IFS
46133
46134  ;;
46135esac
46136fi
46137BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46138if test -n "$BUILD_STRIP"; then
46139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46140$as_echo "$BUILD_STRIP" >&6; }
46141else
46142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46143$as_echo "no" >&6; }
46144fi
46145
46146
46147          if test "x$BUILD_STRIP" = x; then
46148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46149          fi
46150        else
46151          # Otherwise we believe it is a complete path. Use it as it is.
46152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46153$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46155$as_echo_n "checking for BUILD_STRIP... " >&6; }
46156          if test ! -x "$tool_specified"; then
46157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46158$as_echo "not found" >&6; }
46159            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46160          fi
46161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46162$as_echo "$tool_specified" >&6; }
46163        fi
46164      fi
46165    fi
46166
46167  fi
46168
46169
46170
46171  # Only process if variable expands to non-empty
46172
46173  if test "x$BUILD_STRIP" != x; then
46174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46175
46176  # First separate the path from the arguments. This will split at the first
46177  # space.
46178  complete="$BUILD_STRIP"
46179  path="${complete%% *}"
46180  tmp="$complete EOL"
46181  arguments="${tmp#* }"
46182
46183  # Input might be given as Windows format, start by converting to
46184  # unix format.
46185  new_path=`$CYGPATH -u "$path"`
46186
46187  # Now try to locate executable using which
46188  new_path=`$WHICH "$new_path" 2> /dev/null`
46189  # bat and cmd files are not always considered executable in cygwin causing which
46190  # to not find them
46191  if test "x$new_path" = x \
46192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46194    new_path=`$CYGPATH -u "$path"`
46195  fi
46196  if test "x$new_path" = x; then
46197    # Oops. Which didn't find the executable.
46198    # The splitting of arguments from the executable at a space might have been incorrect,
46199    # since paths with space are more likely in Windows. Give it another try with the whole
46200    # argument.
46201    path="$complete"
46202    arguments="EOL"
46203    new_path=`$CYGPATH -u "$path"`
46204    new_path=`$WHICH "$new_path" 2> /dev/null`
46205    # bat and cmd files are not always considered executable in cygwin causing which
46206    # to not find them
46207    if test "x$new_path" = x \
46208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46210      new_path=`$CYGPATH -u "$path"`
46211    fi
46212    if test "x$new_path" = x; then
46213      # It's still not found. Now this is an unrecoverable error.
46214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46215$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46216      has_space=`$ECHO "$complete" | $GREP " "`
46217      if test "x$has_space" != x; then
46218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46220      fi
46221      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46222    fi
46223  fi
46224
46225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46228  # "foo.exe" is OK but "foo" is an error.
46229  #
46230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46231  # It is also a way to make sure we got the proper file name for the real test later on.
46232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46233  if test "x$test_shortpath" = x; then
46234    # Short path failed, file does not exist as specified.
46235    # Try adding .exe or .cmd
46236    if test -f "${new_path}.exe"; then
46237      input_to_shortpath="${new_path}.exe"
46238    elif test -f "${new_path}.cmd"; then
46239      input_to_shortpath="${new_path}.cmd"
46240    else
46241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46242$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46245      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46246    fi
46247  else
46248    input_to_shortpath="$new_path"
46249  fi
46250
46251  # Call helper function which possibly converts this using DOS-style short mode.
46252  # If so, the updated path is stored in $new_path.
46253  new_path="$input_to_shortpath"
46254
46255  input_path="$input_to_shortpath"
46256  # Check if we need to convert this using DOS-style short mode. If the path
46257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46258  # take no chances and rewrite it.
46259  # Note: m4 eats our [], so we need to use [ and ] instead.
46260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46261  if test "x$has_forbidden_chars" != x; then
46262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46266      # Going to short mode and back again did indeed matter. Since short mode is
46267      # case insensitive, let's make it lowercase to improve readability.
46268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46269      # Now convert it back to Unix-style (cygpath)
46270      input_path=`$CYGPATH -u "$shortmode_path"`
46271      new_path="$input_path"
46272    fi
46273  fi
46274
46275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46276  if test "x$test_cygdrive_prefix" = x; then
46277    # As a simple fix, exclude /usr/bin since it's not a real path.
46278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46280      # a path prefixed by /cygdrive for fixpath to work.
46281      new_path="$CYGWIN_ROOT_PATH$input_path"
46282    fi
46283  fi
46284
46285  # remove trailing .exe if any
46286  new_path="${new_path/%.exe/}"
46287
46288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46289
46290  # First separate the path from the arguments. This will split at the first
46291  # space.
46292  complete="$BUILD_STRIP"
46293  path="${complete%% *}"
46294  tmp="$complete EOL"
46295  arguments="${tmp#* }"
46296
46297  # Input might be given as Windows format, start by converting to
46298  # unix format.
46299  new_path="$path"
46300
46301  windows_path="$new_path"
46302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46303    unix_path=`$CYGPATH -u "$windows_path"`
46304    new_path="$unix_path"
46305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46307    new_path="$unix_path"
46308  fi
46309
46310
46311  # Now try to locate executable using which
46312  new_path=`$WHICH "$new_path" 2> /dev/null`
46313
46314  if test "x$new_path" = x; then
46315    # Oops. Which didn't find the executable.
46316    # The splitting of arguments from the executable at a space might have been incorrect,
46317    # since paths with space are more likely in Windows. Give it another try with the whole
46318    # argument.
46319    path="$complete"
46320    arguments="EOL"
46321    new_path="$path"
46322
46323  windows_path="$new_path"
46324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46325    unix_path=`$CYGPATH -u "$windows_path"`
46326    new_path="$unix_path"
46327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46329    new_path="$unix_path"
46330  fi
46331
46332
46333    new_path=`$WHICH "$new_path" 2> /dev/null`
46334    # bat and cmd files are not always considered executable in MSYS causing which
46335    # to not find them
46336    if test "x$new_path" = x \
46337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46339      new_path="$path"
46340
46341  windows_path="$new_path"
46342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46343    unix_path=`$CYGPATH -u "$windows_path"`
46344    new_path="$unix_path"
46345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46347    new_path="$unix_path"
46348  fi
46349
46350    fi
46351
46352    if test "x$new_path" = x; then
46353      # It's still not found. Now this is an unrecoverable error.
46354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46355$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46356      has_space=`$ECHO "$complete" | $GREP " "`
46357      if test "x$has_space" != x; then
46358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46360      fi
46361      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46362    fi
46363  fi
46364
46365  # Now new_path has a complete unix path to the binary
46366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46367    # Keep paths in /bin as-is, but remove trailing .exe if any
46368    new_path="${new_path/%.exe/}"
46369    # Do not save /bin paths to all_fixpath_prefixes!
46370  else
46371    # Not in mixed or Windows style, start by that.
46372    new_path=`cmd //c echo $new_path`
46373
46374  input_path="$new_path"
46375  # Check if we need to convert this using DOS-style short mode. If the path
46376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46377  # take no chances and rewrite it.
46378  # Note: m4 eats our [], so we need to use [ and ] instead.
46379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46380  if test "x$has_forbidden_chars" != x; then
46381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46383  fi
46384
46385    # Output is in $new_path
46386
46387  windows_path="$new_path"
46388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46389    unix_path=`$CYGPATH -u "$windows_path"`
46390    new_path="$unix_path"
46391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46393    new_path="$unix_path"
46394  fi
46395
46396    # remove trailing .exe if any
46397    new_path="${new_path/%.exe/}"
46398
46399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46401  fi
46402
46403    else
46404      # We're on a unix platform. Hooray! :)
46405      # First separate the path from the arguments. This will split at the first
46406      # space.
46407      complete="$BUILD_STRIP"
46408      path="${complete%% *}"
46409      tmp="$complete EOL"
46410      arguments="${tmp#* }"
46411
46412      # Cannot rely on the command "which" here since it doesn't always work.
46413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46414      if test -z "$is_absolute_path"; then
46415        # Path to executable is not absolute. Find it.
46416        IFS_save="$IFS"
46417        IFS=:
46418        for p in $PATH; do
46419          if test -f "$p/$path" && test -x "$p/$path"; then
46420            new_path="$p/$path"
46421            break
46422          fi
46423        done
46424        IFS="$IFS_save"
46425      else
46426        # This is an absolute path, we can use it without further modifications.
46427        new_path="$path"
46428      fi
46429
46430      if test "x$new_path" = x; then
46431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46432$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46433        has_space=`$ECHO "$complete" | $GREP " "`
46434        if test "x$has_space" != x; then
46435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46437        fi
46438        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46439      fi
46440    fi
46441
46442    # Now join together the path and the arguments once again
46443    if test "x$arguments" != xEOL; then
46444      new_complete="$new_path ${arguments% *}"
46445    else
46446      new_complete="$new_path"
46447    fi
46448
46449    if test "x$complete" != "x$new_complete"; then
46450      BUILD_STRIP="$new_complete"
46451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46452$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46453    fi
46454  fi
46455
46456    # Assume the C compiler is the assembler
46457    BUILD_AS="$BUILD_CC -c"
46458    # Just like for the target compiler, use the compiler as linker
46459    BUILD_LD="$BUILD_CC"
46460    BUILD_LDCXX="$BUILD_CXX"
46461
46462    PATH="$OLDPATH"
46463  else
46464    # If we are not cross compiling, use the normal target compilers for
46465    # building the build platform executables.
46466    BUILD_CC="$CC"
46467    BUILD_CXX="$CXX"
46468    BUILD_LD="$LD"
46469    BUILD_LDCXX="$LDCXX"
46470    BUILD_NM="$NM"
46471    BUILD_AS="$AS"
46472    BUILD_OBJCOPY="$OBJCOPY"
46473    BUILD_STRIP="$STRIP"
46474    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46475    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46476    BUILD_AR="$AR"
46477  fi
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46491    # For hotspot, we need these in Windows mixed path,
46492    # so rewrite them all. Need added .exe suffix.
46493    HOTSPOT_CXX="$CXX.exe"
46494    HOTSPOT_LD="$LD.exe"
46495    HOTSPOT_MT="$MT.exe"
46496    HOTSPOT_RC="$RC.exe"
46497
46498  unix_path="$HOTSPOT_CXX"
46499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46500    windows_path=`$CYGPATH -m "$unix_path"`
46501    HOTSPOT_CXX="$windows_path"
46502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46503    windows_path=`cmd //c echo $unix_path`
46504    HOTSPOT_CXX="$windows_path"
46505  fi
46506
46507
46508  unix_path="$HOTSPOT_LD"
46509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46510    windows_path=`$CYGPATH -m "$unix_path"`
46511    HOTSPOT_LD="$windows_path"
46512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46513    windows_path=`cmd //c echo $unix_path`
46514    HOTSPOT_LD="$windows_path"
46515  fi
46516
46517
46518  unix_path="$HOTSPOT_MT"
46519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46520    windows_path=`$CYGPATH -m "$unix_path"`
46521    HOTSPOT_MT="$windows_path"
46522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46523    windows_path=`cmd //c echo $unix_path`
46524    HOTSPOT_MT="$windows_path"
46525  fi
46526
46527
46528  unix_path="$HOTSPOT_RC"
46529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46530    windows_path=`$CYGPATH -m "$unix_path"`
46531    HOTSPOT_RC="$windows_path"
46532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46533    windows_path=`cmd //c echo $unix_path`
46534    HOTSPOT_RC="$windows_path"
46535  fi
46536
46537
46538
46539  else
46540    HOTSPOT_CXX="$CXX"
46541    HOTSPOT_LD="$LD"
46542  fi
46543
46544
46545
46546  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46547    USE_CLANG=true
46548  fi
46549
46550
46551
46552
46553
46554  # The package path is used only on macosx?
46555  # FIXME: clean this up, and/or move it elsewhere.
46556  PACKAGE_PATH=/opt/local
46557
46558
46559  # Check for extra potential brokenness.
46560  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46561    # On Windows, double-check that we got the right compiler.
46562    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46563    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46564    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46565      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46566        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
46567      fi
46568    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46569      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46570        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46571      fi
46572    fi
46573  fi
46574
46575  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46576    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46577    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46578    # This is later checked when setting flags.
46579
46580    # "-Og" suppported for GCC 4.8 and later
46581    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629    # Execute function body
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671
46672
46673
46674
46675
46676
46677
46678    # Execute function body
46679
46680  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46681$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46682  supports=yes
46683
46684  saved_cflags="$CFLAGS"
46685  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46686  ac_ext=c
46687ac_cpp='$CPP $CPPFLAGS'
46688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46690ac_compiler_gnu=$ac_cv_c_compiler_gnu
46691
46692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46693/* end confdefs.h.  */
46694int i;
46695_ACEOF
46696if ac_fn_c_try_compile "$LINENO"; then :
46697
46698else
46699  supports=no
46700fi
46701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46702  ac_ext=cpp
46703ac_cpp='$CXXCPP $CPPFLAGS'
46704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46707
46708  CFLAGS="$saved_cflags"
46709
46710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46711$as_echo "$supports" >&6; }
46712  if test "x$supports" = "xyes" ; then
46713    :
46714    C_COMP_SUPPORTS="yes"
46715  else
46716    :
46717    C_COMP_SUPPORTS="no"
46718  fi
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778    # Execute function body
46779
46780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46781$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46782  supports=yes
46783
46784  saved_cxxflags="$CXXFLAGS"
46785  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46786  ac_ext=cpp
46787ac_cpp='$CXXCPP $CPPFLAGS'
46788ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46789ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46790ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46791
46792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46793/* end confdefs.h.  */
46794int i;
46795_ACEOF
46796if ac_fn_cxx_try_compile "$LINENO"; then :
46797
46798else
46799  supports=no
46800fi
46801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46802  ac_ext=cpp
46803ac_cpp='$CXXCPP $CPPFLAGS'
46804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46807
46808  CXXFLAGS="$saved_cxxflags"
46809
46810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46811$as_echo "$supports" >&6; }
46812  if test "x$supports" = "xyes" ; then
46813    :
46814    CXX_COMP_SUPPORTS="yes"
46815  else
46816    :
46817    CXX_COMP_SUPPORTS="no"
46818  fi
46819
46820
46821
46822
46823
46824
46825
46826
46827
46828
46829
46830
46831
46832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46833$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46834  supports=no
46835  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46836
46837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46838$as_echo "$supports" >&6; }
46839  if test "x$supports" = "xyes" ; then
46840    :
46841    HAS_CFLAG_OPTIMIZE_DEBUG=true
46842  else
46843    :
46844    HAS_CFLAG_OPTIMIZE_DEBUG=false
46845  fi
46846
46847
46848
46849
46850
46851
46852
46853    # "-z relro" supported in GNU binutils 2.17 and later
46854    LINKER_RELRO_FLAG="-Wl,-z,relro"
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902    # Execute function body
46903
46904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46905$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46906  supports=yes
46907
46908  saved_ldflags="$LDFLAGS"
46909  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46910  ac_ext=c
46911ac_cpp='$CPP $CPPFLAGS'
46912ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46913ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46914ac_compiler_gnu=$ac_cv_c_compiler_gnu
46915
46916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46917/* end confdefs.h.  */
46918
46919int
46920main ()
46921{
46922
46923  ;
46924  return 0;
46925}
46926_ACEOF
46927if ac_fn_c_try_link "$LINENO"; then :
46928
46929else
46930  supports=no
46931fi
46932rm -f core conftest.err conftest.$ac_objext \
46933    conftest$ac_exeext conftest.$ac_ext
46934  ac_ext=cpp
46935ac_cpp='$CXXCPP $CPPFLAGS'
46936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46939
46940  LDFLAGS="$saved_ldflags"
46941
46942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46943$as_echo "$supports" >&6; }
46944  if test "x$supports" = "xyes" ; then
46945    :
46946    HAS_LINKER_RELRO=true
46947  else
46948    :
46949    HAS_LINKER_RELRO=false
46950  fi
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964    # "-z now" supported in GNU binutils 2.11 and later
46965    LINKER_NOW_FLAG="-Wl,-z,now"
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013    # Execute function body
47014
47015  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47016$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47017  supports=yes
47018
47019  saved_ldflags="$LDFLAGS"
47020  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47021  ac_ext=c
47022ac_cpp='$CPP $CPPFLAGS'
47023ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47024ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47025ac_compiler_gnu=$ac_cv_c_compiler_gnu
47026
47027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47028/* end confdefs.h.  */
47029
47030int
47031main ()
47032{
47033
47034  ;
47035  return 0;
47036}
47037_ACEOF
47038if ac_fn_c_try_link "$LINENO"; then :
47039
47040else
47041  supports=no
47042fi
47043rm -f core conftest.err conftest.$ac_objext \
47044    conftest$ac_exeext conftest.$ac_ext
47045  ac_ext=cpp
47046ac_cpp='$CXXCPP $CPPFLAGS'
47047ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47048ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47049ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47050
47051  LDFLAGS="$saved_ldflags"
47052
47053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47054$as_echo "$supports" >&6; }
47055  if test "x$supports" = "xyes" ; then
47056    :
47057    HAS_LINKER_NOW=true
47058  else
47059    :
47060    HAS_LINKER_NOW=false
47061  fi
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074  fi
47075
47076  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47077  # in executable.'
47078  USING_BROKEN_SUSE_LD=no
47079  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47081$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47082    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47083    $ECHO "int main() { }" > main.c
47084    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47086$as_echo "no" >&6; }
47087      USING_BROKEN_SUSE_LD=no
47088    else
47089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47090$as_echo "yes" >&6; }
47091      USING_BROKEN_SUSE_LD=yes
47092    fi
47093    rm -rf version-script.map main.c a.out
47094  fi
47095
47096
47097  # Setup hotspot lecagy names for toolchains
47098  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47099  if test "x$TOOLCHAIN_TYPE" = xclang; then
47100    HOTSPOT_TOOLCHAIN_TYPE=gcc
47101  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47102    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47103  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47104    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47105  fi
47106
47107
47108
47109# Setup the JTReg Regression Test Harness.
47110
47111
47112# Check whether --with-jtreg was given.
47113if test "${with_jtreg+set}" = set; then :
47114  withval=$with_jtreg;
47115else
47116  with_jtreg=no
47117fi
47118
47119
47120  if test "x$with_jtreg" = xno; then
47121    # jtreg disabled
47122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47123$as_echo_n "checking for jtreg... " >&6; }
47124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47125$as_echo "no" >&6; }
47126  else
47127    if test "x$with_jtreg" != xyes; then
47128      # with path specified.
47129      JT_HOME="$with_jtreg"
47130    fi
47131
47132    if test "x$JT_HOME" != x; then
47133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47134$as_echo_n "checking for jtreg... " >&6; }
47135
47136      # use JT_HOME enviroment var.
47137
47138  # Only process if variable expands to non-empty
47139
47140  if test "x$JT_HOME" != x; then
47141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47142
47143  # Input might be given as Windows format, start by converting to
47144  # unix format.
47145  path="$JT_HOME"
47146  new_path=`$CYGPATH -u "$path"`
47147
47148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47151  # "foo.exe" is OK but "foo" is an error.
47152  #
47153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47154  # It is also a way to make sure we got the proper file name for the real test later on.
47155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47156  if test "x$test_shortpath" = x; then
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47158$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47159    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47160  fi
47161
47162  # Call helper function which possibly converts this using DOS-style short mode.
47163  # If so, the updated path is stored in $new_path.
47164
47165  input_path="$new_path"
47166  # Check if we need to convert this using DOS-style short mode. If the path
47167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47168  # take no chances and rewrite it.
47169  # Note: m4 eats our [], so we need to use [ and ] instead.
47170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47171  if test "x$has_forbidden_chars" != x; then
47172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47176      # Going to short mode and back again did indeed matter. Since short mode is
47177      # case insensitive, let's make it lowercase to improve readability.
47178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47179      # Now convert it back to Unix-style (cygpath)
47180      input_path=`$CYGPATH -u "$shortmode_path"`
47181      new_path="$input_path"
47182    fi
47183  fi
47184
47185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47186  if test "x$test_cygdrive_prefix" = x; then
47187    # As a simple fix, exclude /usr/bin since it's not a real path.
47188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47190      # a path prefixed by /cygdrive for fixpath to work.
47191      new_path="$CYGWIN_ROOT_PATH$input_path"
47192    fi
47193  fi
47194
47195
47196  if test "x$path" != "x$new_path"; then
47197    JT_HOME="$new_path"
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47199$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47200  fi
47201
47202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47203
47204  path="$JT_HOME"
47205  has_colon=`$ECHO $path | $GREP ^.:`
47206  new_path="$path"
47207  if test "x$has_colon" = x; then
47208    # Not in mixed or Windows style, start by that.
47209    new_path=`cmd //c echo $path`
47210  fi
47211
47212
47213  input_path="$new_path"
47214  # Check if we need to convert this using DOS-style short mode. If the path
47215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47216  # take no chances and rewrite it.
47217  # Note: m4 eats our [], so we need to use [ and ] instead.
47218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47219  if test "x$has_forbidden_chars" != x; then
47220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47222  fi
47223
47224
47225  windows_path="$new_path"
47226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47227    unix_path=`$CYGPATH -u "$windows_path"`
47228    new_path="$unix_path"
47229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47231    new_path="$unix_path"
47232  fi
47233
47234  if test "x$path" != "x$new_path"; then
47235    JT_HOME="$new_path"
47236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47237$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47238  fi
47239
47240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47242
47243    else
47244      # We're on a unix platform. Hooray! :)
47245      path="$JT_HOME"
47246      has_space=`$ECHO "$path" | $GREP " "`
47247      if test "x$has_space" != x; then
47248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47249$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47251      fi
47252
47253      # Use eval to expand a potential ~
47254      eval path="$path"
47255      if test ! -f "$path" && test ! -d "$path"; then
47256        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47257      fi
47258
47259      if test -d "$path"; then
47260        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47261      else
47262        dir="`$DIRNAME "$path"`"
47263        base="`$BASENAME "$path"`"
47264        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47265      fi
47266    fi
47267  fi
47268
47269
47270      # jtreg win32 script works for everybody
47271      JTREGEXE="$JT_HOME/bin/jtreg"
47272
47273      if test ! -f "$JTREGEXE"; then
47274        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47275      fi
47276
47277      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47278$as_echo "$JTREGEXE" >&6; }
47279    else
47280      # try to find jtreg on path
47281
47282
47283
47284  # Publish this variable in the help.
47285
47286
47287  if [ -z "${JTREGEXE+x}" ]; then
47288    # The variable is not set by user, try to locate tool using the code snippet
47289    for ac_prog in jtreg
47290do
47291  # Extract the first word of "$ac_prog", so it can be a program name with args.
47292set dummy $ac_prog; ac_word=$2
47293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47294$as_echo_n "checking for $ac_word... " >&6; }
47295if ${ac_cv_path_JTREGEXE+:} false; then :
47296  $as_echo_n "(cached) " >&6
47297else
47298  case $JTREGEXE in
47299  [\\/]* | ?:[\\/]*)
47300  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47301  ;;
47302  *)
47303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47304for as_dir in $PATH
47305do
47306  IFS=$as_save_IFS
47307  test -z "$as_dir" && as_dir=.
47308    for ac_exec_ext in '' $ac_executable_extensions; do
47309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47310    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47312    break 2
47313  fi
47314done
47315  done
47316IFS=$as_save_IFS
47317
47318  ;;
47319esac
47320fi
47321JTREGEXE=$ac_cv_path_JTREGEXE
47322if test -n "$JTREGEXE"; then
47323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47324$as_echo "$JTREGEXE" >&6; }
47325else
47326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47327$as_echo "no" >&6; }
47328fi
47329
47330
47331  test -n "$JTREGEXE" && break
47332done
47333
47334  else
47335    # The variable is set, but is it from the command line or the environment?
47336
47337    # Try to remove the string !JTREGEXE! from our list.
47338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47340      # If it failed, the variable was not from the command line. Ignore it,
47341      # but warn the user (except for BASH, which is always set by the calling BASH).
47342      if test "xJTREGEXE" != xBASH; then
47343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47344$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47345      fi
47346      # Try to locate tool using the code snippet
47347      for ac_prog in jtreg
47348do
47349  # Extract the first word of "$ac_prog", so it can be a program name with args.
47350set dummy $ac_prog; ac_word=$2
47351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47352$as_echo_n "checking for $ac_word... " >&6; }
47353if ${ac_cv_path_JTREGEXE+:} false; then :
47354  $as_echo_n "(cached) " >&6
47355else
47356  case $JTREGEXE in
47357  [\\/]* | ?:[\\/]*)
47358  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47359  ;;
47360  *)
47361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47362for as_dir in $PATH
47363do
47364  IFS=$as_save_IFS
47365  test -z "$as_dir" && as_dir=.
47366    for ac_exec_ext in '' $ac_executable_extensions; do
47367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47368    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47370    break 2
47371  fi
47372done
47373  done
47374IFS=$as_save_IFS
47375
47376  ;;
47377esac
47378fi
47379JTREGEXE=$ac_cv_path_JTREGEXE
47380if test -n "$JTREGEXE"; then
47381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47382$as_echo "$JTREGEXE" >&6; }
47383else
47384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47385$as_echo "no" >&6; }
47386fi
47387
47388
47389  test -n "$JTREGEXE" && break
47390done
47391
47392    else
47393      # If it succeeded, then it was overridden by the user. We will use it
47394      # for the tool.
47395
47396      # First remove it from the list of overridden variables, so we can test
47397      # for unknown variables in the end.
47398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47399
47400      # Check if we try to supply an empty value
47401      if test "x$JTREGEXE" = x; then
47402        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47403$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47404        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47405$as_echo_n "checking for JTREGEXE... " >&6; }
47406        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47407$as_echo "disabled" >&6; }
47408      else
47409        # Check if the provided tool contains a complete path.
47410        tool_specified="$JTREGEXE"
47411        tool_basename="${tool_specified##*/}"
47412        if test "x$tool_basename" = "x$tool_specified"; then
47413          # A command without a complete path is provided, search $PATH.
47414          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47415$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47416          # Extract the first word of "$tool_basename", so it can be a program name with args.
47417set dummy $tool_basename; ac_word=$2
47418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47419$as_echo_n "checking for $ac_word... " >&6; }
47420if ${ac_cv_path_JTREGEXE+:} false; then :
47421  $as_echo_n "(cached) " >&6
47422else
47423  case $JTREGEXE in
47424  [\\/]* | ?:[\\/]*)
47425  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47426  ;;
47427  *)
47428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47429for as_dir in $PATH
47430do
47431  IFS=$as_save_IFS
47432  test -z "$as_dir" && as_dir=.
47433    for ac_exec_ext in '' $ac_executable_extensions; do
47434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47435    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47437    break 2
47438  fi
47439done
47440  done
47441IFS=$as_save_IFS
47442
47443  ;;
47444esac
47445fi
47446JTREGEXE=$ac_cv_path_JTREGEXE
47447if test -n "$JTREGEXE"; then
47448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47449$as_echo "$JTREGEXE" >&6; }
47450else
47451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47452$as_echo "no" >&6; }
47453fi
47454
47455
47456          if test "x$JTREGEXE" = x; then
47457            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47458          fi
47459        else
47460          # Otherwise we believe it is a complete path. Use it as it is.
47461          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47462$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47463          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47464$as_echo_n "checking for JTREGEXE... " >&6; }
47465          if test ! -x "$tool_specified"; then
47466            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47467$as_echo "not found" >&6; }
47468            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47469          fi
47470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47471$as_echo "$tool_specified" >&6; }
47472        fi
47473      fi
47474    fi
47475
47476  fi
47477
47478
47479
47480  if test "x$JTREGEXE" = x; then
47481    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47482  fi
47483
47484
47485      JT_HOME="`$DIRNAME $JTREGEXE`"
47486    fi
47487  fi
47488
47489
47490
47491
47492
47493
47494  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47495  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47496  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47497  #                              commands produced by the link step (currently AIX only)
47498  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47499    COMPILER_TARGET_BITS_FLAG="-q"
47500    COMPILER_COMMAND_FILE_FLAG="-f"
47501    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47502  else
47503    COMPILER_TARGET_BITS_FLAG="-m"
47504    COMPILER_COMMAND_FILE_FLAG="@"
47505    COMPILER_BINDCMD_FILE_FLAG=""
47506
47507    # The solstudio linker does not support @-files.
47508    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47509      COMPILER_COMMAND_FILE_FLAG=
47510    fi
47511
47512    # Check if @file is supported by gcc
47513    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47514      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47515$as_echo_n "checking if @file is supported by gcc... " >&6; }
47516      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47517      $ECHO "" "--version" > command.file
47518      if $CXX @command.file 2>&5 >&5; then
47519        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47520$as_echo "yes" >&6; }
47521        COMPILER_COMMAND_FILE_FLAG="@"
47522      else
47523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47524$as_echo "no" >&6; }
47525        COMPILER_COMMAND_FILE_FLAG=
47526      fi
47527      rm -rf command.file
47528    fi
47529  fi
47530
47531
47532
47533
47534  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47535  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47536    ARFLAGS="-r"
47537  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47538    ARFLAGS="-X64"
47539  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47540    # lib.exe is used as AR to create static libraries.
47541    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47542  else
47543    ARFLAGS=""
47544  fi
47545
47546
47547  ## Setup strip.
47548  # FIXME: should this really be per platform, or should it be per toolchain type?
47549  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47550  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47551  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47552    STRIPFLAGS="-g"
47553  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47554    STRIPFLAGS="-x"
47555  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47556    STRIPFLAGS="-S"
47557  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47558    STRIPFLAGS="-X32_64"
47559  fi
47560
47561
47562
47563  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47564    CC_OUT_OPTION=-Fo
47565    EXE_OUT_OPTION=-out:
47566    LD_OUT_OPTION=-out:
47567    AR_OUT_OPTION=-out:
47568  else
47569    # The option used to specify the target .o,.a or .so file.
47570    # When compiling, how to specify the to be created object file.
47571    CC_OUT_OPTION='-o$(SPACE)'
47572    # When linking, how to specify the to be created executable.
47573    EXE_OUT_OPTION='-o$(SPACE)'
47574    # When linking, how to specify the to be created dynamically linkable library.
47575    LD_OUT_OPTION='-o$(SPACE)'
47576    # When archiving, how to specify the to be create static archive for object files.
47577    AR_OUT_OPTION='rcs$(SPACE)'
47578  fi
47579
47580
47581
47582
47583
47584  # On Windows, we need to set RC flags.
47585  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47586    RC_FLAGS="-nologo -l0x409"
47587    JVM_RCFLAGS="-nologo"
47588    if test "x$DEBUG_LEVEL" = xrelease; then
47589      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47590      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47591    fi
47592
47593    # The version variables used to create RC_FLAGS may be overridden
47594    # in a custom configure script, or possibly the command line.
47595    # Let those variables be expanded at make time in spec.gmk.
47596    # The \$ are escaped to the shell, and the $(...) variables
47597    # are evaluated by make.
47598    RC_FLAGS="$RC_FLAGS \
47599        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47600        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47601        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47602        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47603        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47604        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47605        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47606
47607    JVM_RCFLAGS="$JVM_RCFLAGS \
47608        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47609        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47610        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47611        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47612        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47613        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47614        -D\"HS_FNAME=jvm.dll\" \
47615        -D\"HS_INTERNAL_NAME=jvm\""
47616  fi
47617
47618
47619
47620  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47621    # silence copyright notice and other headers.
47622    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47623  fi
47624
47625
47626# Now we can test some aspects on the target using configure macros.
47627
47628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47629$as_echo_n "checking for ANSI C header files... " >&6; }
47630if ${ac_cv_header_stdc+:} false; then :
47631  $as_echo_n "(cached) " >&6
47632else
47633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47634/* end confdefs.h.  */
47635#include <stdlib.h>
47636#include <stdarg.h>
47637#include <string.h>
47638#include <float.h>
47639
47640int
47641main ()
47642{
47643
47644  ;
47645  return 0;
47646}
47647_ACEOF
47648if ac_fn_cxx_try_compile "$LINENO"; then :
47649  ac_cv_header_stdc=yes
47650else
47651  ac_cv_header_stdc=no
47652fi
47653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47654
47655if test $ac_cv_header_stdc = yes; then
47656  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47658/* end confdefs.h.  */
47659#include <string.h>
47660
47661_ACEOF
47662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47663  $EGREP "memchr" >/dev/null 2>&1; then :
47664
47665else
47666  ac_cv_header_stdc=no
47667fi
47668rm -f conftest*
47669
47670fi
47671
47672if test $ac_cv_header_stdc = yes; then
47673  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47675/* end confdefs.h.  */
47676#include <stdlib.h>
47677
47678_ACEOF
47679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47680  $EGREP "free" >/dev/null 2>&1; then :
47681
47682else
47683  ac_cv_header_stdc=no
47684fi
47685rm -f conftest*
47686
47687fi
47688
47689if test $ac_cv_header_stdc = yes; then
47690  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47691  if test "$cross_compiling" = yes; then :
47692  :
47693else
47694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47695/* end confdefs.h.  */
47696#include <ctype.h>
47697#include <stdlib.h>
47698#if ((' ' & 0x0FF) == 0x020)
47699# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47700# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47701#else
47702# define ISLOWER(c) \
47703		   (('a' <= (c) && (c) <= 'i') \
47704		     || ('j' <= (c) && (c) <= 'r') \
47705		     || ('s' <= (c) && (c) <= 'z'))
47706# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47707#endif
47708
47709#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47710int
47711main ()
47712{
47713  int i;
47714  for (i = 0; i < 256; i++)
47715    if (XOR (islower (i), ISLOWER (i))
47716	|| toupper (i) != TOUPPER (i))
47717      return 2;
47718  return 0;
47719}
47720_ACEOF
47721if ac_fn_cxx_try_run "$LINENO"; then :
47722
47723else
47724  ac_cv_header_stdc=no
47725fi
47726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47727  conftest.$ac_objext conftest.beam conftest.$ac_ext
47728fi
47729
47730fi
47731fi
47732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47733$as_echo "$ac_cv_header_stdc" >&6; }
47734if test $ac_cv_header_stdc = yes; then
47735
47736$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47737
47738fi
47739
47740# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47741for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47742		  inttypes.h stdint.h unistd.h
47743do :
47744  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47745ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47746"
47747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47748  cat >>confdefs.h <<_ACEOF
47749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47750_ACEOF
47751
47752fi
47753
47754done
47755
47756
47757
47758  ###############################################################################
47759  #
47760  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47761  # (The JVM can use 32 or 64 bit Java pointers but that decision
47762  # is made at runtime.)
47763  #
47764
47765  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47766    # Always specify -m flag on Solaris
47767    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47768
47769  # When we add flags to the "official" CFLAGS etc, we need to
47770  # keep track of these additions in ADDED_CFLAGS etc. These
47771  # will later be checked to make sure only controlled additions
47772  # have been made to CFLAGS etc.
47773  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47774  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47775  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47776
47777  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47778  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47779  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47780
47781  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47782  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47783  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47784
47785  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47786  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47787  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47788
47789  elif test "x$COMPILE_TYPE" = xreduced; then
47790    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47791      # Specify -m if running reduced on unix platforms
47792
47793  # When we add flags to the "official" CFLAGS etc, we need to
47794  # keep track of these additions in ADDED_CFLAGS etc. These
47795  # will later be checked to make sure only controlled additions
47796  # have been made to CFLAGS etc.
47797  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47798  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47799  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47800
47801  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47802  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47803  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47804
47805  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47806  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47807  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47808
47809  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47810  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47811  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47812
47813    fi
47814  fi
47815  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47816    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47817    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47818    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47819  fi
47820
47821  # Make compilation sanity check
47822  for ac_header in stdio.h
47823do :
47824  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47825if test "x$ac_cv_header_stdio_h" = xyes; then :
47826  cat >>confdefs.h <<_ACEOF
47827#define HAVE_STDIO_H 1
47828_ACEOF
47829
47830else
47831
47832    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47833$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47834    if test "x$COMPILE_TYPE" = xreduced; then
47835
47836  # Print a helpful message on how to acquire the necessary build dependency.
47837  # reduced is the help tag: freetype, cups, alsa etc
47838  MISSING_DEPENDENCY=reduced
47839
47840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47841    cygwin_help $MISSING_DEPENDENCY
47842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47843    msys_help $MISSING_DEPENDENCY
47844  else
47845    PKGHANDLER_COMMAND=
47846
47847    case $PKGHANDLER in
47848      apt-get)
47849        apt_help     $MISSING_DEPENDENCY ;;
47850      yum)
47851        yum_help     $MISSING_DEPENDENCY ;;
47852      port)
47853        port_help    $MISSING_DEPENDENCY ;;
47854      pkgutil)
47855        pkgutil_help $MISSING_DEPENDENCY ;;
47856      pkgadd)
47857        pkgadd_help  $MISSING_DEPENDENCY ;;
47858    esac
47859
47860    if test "x$PKGHANDLER_COMMAND" != x; then
47861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47862    fi
47863  fi
47864
47865      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47866$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47867    elif test "x$COMPILE_TYPE" = xcross; then
47868      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47869$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47870    fi
47871    as_fn_error $? "Cannot continue." "$LINENO" 5
47872
47873fi
47874
47875done
47876
47877
47878  # The cast to long int works around a bug in the HP C Compiler
47879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47881# This bug is HP SR number 8606223364.
47882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47883$as_echo_n "checking size of int *... " >&6; }
47884if ${ac_cv_sizeof_int_p+:} false; then :
47885  $as_echo_n "(cached) " >&6
47886else
47887  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47888
47889else
47890  if test "$ac_cv_type_int_p" = yes; then
47891     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47893as_fn_error 77 "cannot compute sizeof (int *)
47894See \`config.log' for more details" "$LINENO" 5; }
47895   else
47896     ac_cv_sizeof_int_p=0
47897   fi
47898fi
47899
47900fi
47901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47902$as_echo "$ac_cv_sizeof_int_p" >&6; }
47903
47904
47905
47906cat >>confdefs.h <<_ACEOF
47907#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47908_ACEOF
47909
47910
47911
47912  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47913  if test "x$ac_cv_sizeof_int_p" = x; then
47914    # The test failed, lets stick to the assumed value.
47915    { $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
47916$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47917  else
47918    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47919
47920    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47921      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47922      # Let's try to implicitely set the compilers target architecture and retry the test
47923      { $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
47924$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;}
47925      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47926$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47927
47928  # When we add flags to the "official" CFLAGS etc, we need to
47929  # keep track of these additions in ADDED_CFLAGS etc. These
47930  # will later be checked to make sure only controlled additions
47931  # have been made to CFLAGS etc.
47932  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47933  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47934  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47935
47936  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47937  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47938  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47939
47940  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47941  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47942  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47943
47944  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47945  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47946  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47947
47948
47949      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47950      unset ac_cv_sizeof_int_p
47951      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47952      cat >>confdefs.h <<_ACEOF
47953#undef SIZEOF_INT_P
47954_ACEOF
47955
47956      # The cast to long int works around a bug in the HP C Compiler
47957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47959# This bug is HP SR number 8606223364.
47960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47961$as_echo_n "checking size of int *... " >&6; }
47962if ${ac_cv_sizeof_int_p+:} false; then :
47963  $as_echo_n "(cached) " >&6
47964else
47965  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47966
47967else
47968  if test "$ac_cv_type_int_p" = yes; then
47969     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47971as_fn_error 77 "cannot compute sizeof (int *)
47972See \`config.log' for more details" "$LINENO" 5; }
47973   else
47974     ac_cv_sizeof_int_p=0
47975   fi
47976fi
47977
47978fi
47979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47980$as_echo "$ac_cv_sizeof_int_p" >&6; }
47981
47982
47983
47984cat >>confdefs.h <<_ACEOF
47985#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47986_ACEOF
47987
47988
47989
47990      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47991
47992      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47993        { $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
47994$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;}
47995        if test "x$COMPILE_TYPE" = xreduced; then
47996
47997  # Print a helpful message on how to acquire the necessary build dependency.
47998  # reduced is the help tag: freetype, cups, alsa etc
47999  MISSING_DEPENDENCY=reduced
48000
48001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48002    cygwin_help $MISSING_DEPENDENCY
48003  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48004    msys_help $MISSING_DEPENDENCY
48005  else
48006    PKGHANDLER_COMMAND=
48007
48008    case $PKGHANDLER in
48009      apt-get)
48010        apt_help     $MISSING_DEPENDENCY ;;
48011      yum)
48012        yum_help     $MISSING_DEPENDENCY ;;
48013      port)
48014        port_help    $MISSING_DEPENDENCY ;;
48015      pkgutil)
48016        pkgutil_help $MISSING_DEPENDENCY ;;
48017      pkgadd)
48018        pkgadd_help  $MISSING_DEPENDENCY ;;
48019    esac
48020
48021    if test "x$PKGHANDLER_COMMAND" != x; then
48022      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48023    fi
48024  fi
48025
48026          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48027$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48028        elif test "x$COMPILE_TYPE" = xcross; then
48029          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48030$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48031        fi
48032        as_fn_error $? "Cannot continue." "$LINENO" 5
48033      fi
48034    fi
48035  fi
48036
48037  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48038$as_echo_n "checking for target address size... " >&6; }
48039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48040$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48041
48042
48043  ###############################################################################
48044  #
48045  # Is the target little of big endian?
48046  #
48047   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48048$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48049if ${ac_cv_c_bigendian+:} false; then :
48050  $as_echo_n "(cached) " >&6
48051else
48052  ac_cv_c_bigendian=unknown
48053    # See if we're dealing with a universal compiler.
48054    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48055/* end confdefs.h.  */
48056#ifndef __APPLE_CC__
48057	       not a universal capable compiler
48058	     #endif
48059	     typedef int dummy;
48060
48061_ACEOF
48062if ac_fn_cxx_try_compile "$LINENO"; then :
48063
48064	# Check for potential -arch flags.  It is not universal unless
48065	# there are at least two -arch flags with different values.
48066	ac_arch=
48067	ac_prev=
48068	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48069	 if test -n "$ac_prev"; then
48070	   case $ac_word in
48071	     i?86 | x86_64 | ppc | ppc64)
48072	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48073		 ac_arch=$ac_word
48074	       else
48075		 ac_cv_c_bigendian=universal
48076		 break
48077	       fi
48078	       ;;
48079	   esac
48080	   ac_prev=
48081	 elif test "x$ac_word" = "x-arch"; then
48082	   ac_prev=arch
48083	 fi
48084       done
48085fi
48086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48087    if test $ac_cv_c_bigendian = unknown; then
48088      # See if sys/param.h defines the BYTE_ORDER macro.
48089      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48090/* end confdefs.h.  */
48091#include <sys/types.h>
48092	     #include <sys/param.h>
48093
48094int
48095main ()
48096{
48097#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48098		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48099		     && LITTLE_ENDIAN)
48100	      bogus endian macros
48101	     #endif
48102
48103  ;
48104  return 0;
48105}
48106_ACEOF
48107if ac_fn_cxx_try_compile "$LINENO"; then :
48108  # It does; now see whether it defined to BIG_ENDIAN or not.
48109	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48110/* end confdefs.h.  */
48111#include <sys/types.h>
48112		#include <sys/param.h>
48113
48114int
48115main ()
48116{
48117#if BYTE_ORDER != BIG_ENDIAN
48118		 not big endian
48119		#endif
48120
48121  ;
48122  return 0;
48123}
48124_ACEOF
48125if ac_fn_cxx_try_compile "$LINENO"; then :
48126  ac_cv_c_bigendian=yes
48127else
48128  ac_cv_c_bigendian=no
48129fi
48130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48131fi
48132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48133    fi
48134    if test $ac_cv_c_bigendian = unknown; then
48135      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48136      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48137/* end confdefs.h.  */
48138#include <limits.h>
48139
48140int
48141main ()
48142{
48143#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48144	      bogus endian macros
48145	     #endif
48146
48147  ;
48148  return 0;
48149}
48150_ACEOF
48151if ac_fn_cxx_try_compile "$LINENO"; then :
48152  # It does; now see whether it defined to _BIG_ENDIAN or not.
48153	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48154/* end confdefs.h.  */
48155#include <limits.h>
48156
48157int
48158main ()
48159{
48160#ifndef _BIG_ENDIAN
48161		 not big endian
48162		#endif
48163
48164  ;
48165  return 0;
48166}
48167_ACEOF
48168if ac_fn_cxx_try_compile "$LINENO"; then :
48169  ac_cv_c_bigendian=yes
48170else
48171  ac_cv_c_bigendian=no
48172fi
48173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48174fi
48175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48176    fi
48177    if test $ac_cv_c_bigendian = unknown; then
48178      # Compile a test program.
48179      if test "$cross_compiling" = yes; then :
48180  # Try to guess by grepping values from an object file.
48181	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48182/* end confdefs.h.  */
48183short int ascii_mm[] =
48184		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48185		short int ascii_ii[] =
48186		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48187		int use_ascii (int i) {
48188		  return ascii_mm[i] + ascii_ii[i];
48189		}
48190		short int ebcdic_ii[] =
48191		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48192		short int ebcdic_mm[] =
48193		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48194		int use_ebcdic (int i) {
48195		  return ebcdic_mm[i] + ebcdic_ii[i];
48196		}
48197		extern int foo;
48198
48199int
48200main ()
48201{
48202return use_ascii (foo) == use_ebcdic (foo);
48203  ;
48204  return 0;
48205}
48206_ACEOF
48207if ac_fn_cxx_try_compile "$LINENO"; then :
48208  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48209	      ac_cv_c_bigendian=yes
48210	    fi
48211	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48212	      if test "$ac_cv_c_bigendian" = unknown; then
48213		ac_cv_c_bigendian=no
48214	      else
48215		# finding both strings is unlikely to happen, but who knows?
48216		ac_cv_c_bigendian=unknown
48217	      fi
48218	    fi
48219fi
48220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48221else
48222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48223/* end confdefs.h.  */
48224$ac_includes_default
48225int
48226main ()
48227{
48228
48229	     /* Are we little or big endian?  From Harbison&Steele.  */
48230	     union
48231	     {
48232	       long int l;
48233	       char c[sizeof (long int)];
48234	     } u;
48235	     u.l = 1;
48236	     return u.c[sizeof (long int) - 1] == 1;
48237
48238  ;
48239  return 0;
48240}
48241_ACEOF
48242if ac_fn_cxx_try_run "$LINENO"; then :
48243  ac_cv_c_bigendian=no
48244else
48245  ac_cv_c_bigendian=yes
48246fi
48247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48248  conftest.$ac_objext conftest.beam conftest.$ac_ext
48249fi
48250
48251    fi
48252fi
48253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48254$as_echo "$ac_cv_c_bigendian" >&6; }
48255 case $ac_cv_c_bigendian in #(
48256   yes)
48257     ENDIAN="big";; #(
48258   no)
48259     ENDIAN="little" ;; #(
48260   universal)
48261     ENDIAN="universal_endianness"
48262     ;; #(
48263   *)
48264     ENDIAN="unknown" ;;
48265 esac
48266
48267
48268  if test "x$ENDIAN" = xuniversal_endianness; then
48269    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48270  fi
48271  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48272    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
48273  fi
48274
48275
48276# Configure flags for the tools
48277
48278  ###############################################################################
48279  #
48280  # How to compile shared libraries.
48281  #
48282
48283  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48284    PICFLAG="-fPIC"
48285    C_FLAG_REORDER=''
48286    CXX_FLAG_REORDER=''
48287
48288    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48289      # Linking is different on MacOSX
48290      if test "x$STATIC_BUILD" = xtrue; then
48291        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48292      else
48293        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48294        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48295      fi
48296      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48297      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48298      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48299      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48300    else
48301      # Default works for linux, might work on other platforms as well.
48302      SHARED_LIBRARY_FLAGS='-shared'
48303      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48304      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48305      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48306      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48307    fi
48308  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48309    C_FLAG_REORDER=''
48310    CXX_FLAG_REORDER=''
48311
48312    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48313      # Linking is different on MacOSX
48314      PICFLAG=''
48315      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48316      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48317      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48318      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48319      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48320
48321      if test "x$STATIC_BUILD" = xfalse; then
48322        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48323      fi
48324    else
48325      # Default works for linux, might work on other platforms as well.
48326      PICFLAG='-fPIC'
48327      SHARED_LIBRARY_FLAGS='-shared'
48328      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48329      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48330      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48331      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48332    fi
48333  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48334    PICFLAG="-KPIC"
48335    C_FLAG_REORDER='-xF'
48336    CXX_FLAG_REORDER='-xF'
48337    SHARED_LIBRARY_FLAGS="-G"
48338    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48339    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48340    SET_SHARED_LIBRARY_NAME='-h $1'
48341    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48342  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48343    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48344    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48345    # will have to patch this single instruction with a call to some out-of-order code which
48346    # does the load from the TOC. This is of course slow. But in that case we also would have
48347    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48348    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48349    # can be patched directly by the linker and does not require a jump to out-of-order code.
48350    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48351    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48352    # loads for accessing a global variable). But there are rumors that this may be seen as a
48353    # 'performance feature' because of improved code locality of the symbols used in a
48354    # compilation unit.
48355    PICFLAG="-qpic"
48356    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48357    C_FLAG_REORDER=''
48358    CXX_FLAG_REORDER=''
48359    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48360    SET_EXECUTABLE_ORIGIN=""
48361    SET_SHARED_LIBRARY_ORIGIN=''
48362    SET_SHARED_LIBRARY_NAME=''
48363    SET_SHARED_LIBRARY_MAPFILE=''
48364  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48365    PICFLAG=""
48366    C_FLAG_REORDER=''
48367    CXX_FLAG_REORDER=''
48368    SHARED_LIBRARY_FLAGS="-dll"
48369    SET_EXECUTABLE_ORIGIN=''
48370    SET_SHARED_LIBRARY_ORIGIN=''
48371    SET_SHARED_LIBRARY_NAME=''
48372    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48373  fi
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383  # The (cross) compiler is now configured, we can now test capabilities
48384  # of the target platform.
48385
48386
48387
48388  ###############################################################################
48389  #
48390  # Setup the opt flags for different compilers
48391  # and different operating systems.
48392  #
48393
48394  # FIXME: this was indirectly the old default, but just inherited.
48395  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48396  #   C_FLAG_DEPS="-MMD -MF"
48397  # fi
48398
48399  # Generate make dependency files
48400  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48401    C_FLAG_DEPS="-MMD -MF"
48402  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48403    C_FLAG_DEPS="-MMD -MF"
48404  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48405    C_FLAG_DEPS="-xMMD -xMF"
48406  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48407    C_FLAG_DEPS="-qmakedep=gcc -MF"
48408  fi
48409  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48410
48411
48412
48413  # Debug symbols
48414  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48415    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48416      # reduce from default "-g2" option to save space
48417      CFLAGS_DEBUG_SYMBOLS="-g1"
48418      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48419    else
48420      CFLAGS_DEBUG_SYMBOLS="-g"
48421      CXXFLAGS_DEBUG_SYMBOLS="-g"
48422    fi
48423  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48424    CFLAGS_DEBUG_SYMBOLS="-g"
48425    CXXFLAGS_DEBUG_SYMBOLS="-g"
48426  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48427    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48428    # -g0 enables debug symbols without disabling inlining.
48429    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48430  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48431    CFLAGS_DEBUG_SYMBOLS="-g"
48432    CXXFLAGS_DEBUG_SYMBOLS="-g"
48433  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48434    CFLAGS_DEBUG_SYMBOLS="-Zi"
48435    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48436  fi
48437
48438
48439
48440  # Debug symbols for JVM_CFLAGS
48441  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48442    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48443    if test "x$DEBUG_LEVEL" = xslowdebug; then
48444      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48445    else
48446      # -g0 does not disable inlining, which -g does.
48447      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48448    fi
48449  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48450    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48451  else
48452    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48453  fi
48454
48455
48456  # bounds, memory and behavior checking options
48457  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48458    case $DEBUG_LEVEL in
48459    release )
48460      # no adjustment
48461      ;;
48462    fastdebug )
48463      # no adjustment
48464      ;;
48465    slowdebug )
48466      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48467      # get's added conditionally on whether we produce debug symbols or not.
48468      # This is most likely not really correct.
48469
48470      # Add runtime stack smashing and undefined behavior checks.
48471      # Not all versions of gcc support -fstack-protector
48472      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515    # Execute function body
48516
48517
48518
48519
48520
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
48564    # Execute function body
48565
48566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48567$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48568  supports=yes
48569
48570  saved_cflags="$CFLAGS"
48571  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48572  ac_ext=c
48573ac_cpp='$CPP $CPPFLAGS'
48574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48576ac_compiler_gnu=$ac_cv_c_compiler_gnu
48577
48578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48579/* end confdefs.h.  */
48580int i;
48581_ACEOF
48582if ac_fn_c_try_compile "$LINENO"; then :
48583
48584else
48585  supports=no
48586fi
48587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48588  ac_ext=cpp
48589ac_cpp='$CXXCPP $CPPFLAGS'
48590ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48591ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48592ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48593
48594  CFLAGS="$saved_cflags"
48595
48596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48597$as_echo "$supports" >&6; }
48598  if test "x$supports" = "xyes" ; then
48599    :
48600    C_COMP_SUPPORTS="yes"
48601  else
48602    :
48603    C_COMP_SUPPORTS="no"
48604  fi
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664    # Execute function body
48665
48666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48667$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48668  supports=yes
48669
48670  saved_cxxflags="$CXXFLAGS"
48671  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48672  ac_ext=cpp
48673ac_cpp='$CXXCPP $CPPFLAGS'
48674ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48675ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48676ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48677
48678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48679/* end confdefs.h.  */
48680int i;
48681_ACEOF
48682if ac_fn_cxx_try_compile "$LINENO"; then :
48683
48684else
48685  supports=no
48686fi
48687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48688  ac_ext=cpp
48689ac_cpp='$CXXCPP $CPPFLAGS'
48690ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48691ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48692ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48693
48694  CXXFLAGS="$saved_cxxflags"
48695
48696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48697$as_echo "$supports" >&6; }
48698  if test "x$supports" = "xyes" ; then
48699    :
48700    CXX_COMP_SUPPORTS="yes"
48701  else
48702    :
48703    CXX_COMP_SUPPORTS="no"
48704  fi
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48719$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48720  supports=no
48721  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48722
48723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48724$as_echo "$supports" >&6; }
48725  if test "x$supports" = "xyes" ; then
48726    :
48727
48728  else
48729    :
48730    STACK_PROTECTOR_CFLAG=""
48731  fi
48732
48733
48734
48735
48736
48737
48738
48739      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48740      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48741      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48742        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48743      fi
48744      ;;
48745    esac
48746  fi
48747
48748  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48749    if test "x$DEBUG_LEVEL" != xrelease; then
48750      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48751        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48752      fi
48753    fi
48754  fi
48755
48756  # Optimization levels
48757  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48758    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48759
48760    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48761      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48762      C_O_FLAG_HIGHEST_JVM="-xO4"
48763      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48764      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48765      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48766      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48767      C_O_FLAG_DEBUG_JVM=""
48768      C_O_FLAG_NONE="-xregs=no%frameptr"
48769      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48770      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48771      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48772      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48773      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48774      CXX_O_FLAG_DEBUG_JVM=""
48775      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48776      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48777        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48778        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48779      fi
48780    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48781      C_O_FLAG_HIGHEST_JVM="-xO4"
48782      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48783      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48784      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48785      C_O_FLAG_DEBUG=""
48786      C_O_FLAG_DEBUG_JVM=""
48787      C_O_FLAG_NONE=""
48788      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48789      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48790      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48791      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48792      CXX_O_FLAG_DEBUG=""
48793      CXX_O_FLAG_DEBUG_JVM=""
48794      CXX_O_FLAG_NONE=""
48795    fi
48796  else
48797    # The remaining toolchains share opt flags between CC and CXX;
48798    # setup for C and duplicate afterwards.
48799    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48800      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48801        # On MacOSX we optimize for size, something
48802        # we should do for all platforms?
48803        C_O_FLAG_HIGHEST_JVM="-Os"
48804        C_O_FLAG_HIGHEST="-Os"
48805        C_O_FLAG_HI="-Os"
48806        C_O_FLAG_NORM="-Os"
48807        C_O_FLAG_SIZE="-Os"
48808      else
48809        C_O_FLAG_HIGHEST_JVM="-O3"
48810        C_O_FLAG_HIGHEST="-O3"
48811        C_O_FLAG_HI="-O3"
48812        C_O_FLAG_NORM="-O2"
48813        C_O_FLAG_SIZE="-Os"
48814      fi
48815      C_O_FLAG_DEBUG="-O0"
48816      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48817        C_O_FLAG_DEBUG_JVM=""
48818      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48819        C_O_FLAG_DEBUG_JVM="-O0"
48820      fi
48821      C_O_FLAG_NONE="-O0"
48822    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48823      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48824        # On MacOSX we optimize for size, something
48825        # we should do for all platforms?
48826        C_O_FLAG_HIGHEST_JVM="-Os"
48827        C_O_FLAG_HIGHEST="-Os"
48828        C_O_FLAG_HI="-Os"
48829        C_O_FLAG_NORM="-Os"
48830        C_O_FLAG_SIZE="-Os"
48831      else
48832        C_O_FLAG_HIGHEST_JVM="-O3"
48833        C_O_FLAG_HIGHEST="-O3"
48834        C_O_FLAG_HI="-O3"
48835        C_O_FLAG_NORM="-O2"
48836        C_O_FLAG_SIZE="-Os"
48837      fi
48838      C_O_FLAG_DEBUG="-O0"
48839      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48840        C_O_FLAG_DEBUG_JVM=""
48841      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48842        C_O_FLAG_DEBUG_JVM="-O0"
48843      fi
48844      C_O_FLAG_NONE="-O0"
48845    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48846      C_O_FLAG_HIGHEST_JVM="-O3"
48847      C_O_FLAG_HIGHEST="-O3"
48848      C_O_FLAG_HI="-O3 -qstrict"
48849      C_O_FLAG_NORM="-O2"
48850      C_O_FLAG_DEBUG="-qnoopt"
48851      # FIXME: Value below not verified.
48852      C_O_FLAG_DEBUG_JVM=""
48853      C_O_FLAG_NONE="-qnoopt"
48854    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48855      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48856      C_O_FLAG_HIGHEST="-O2"
48857      C_O_FLAG_HI="-O1"
48858      C_O_FLAG_NORM="-O1"
48859      C_O_FLAG_DEBUG="-Od"
48860      C_O_FLAG_DEBUG_JVM=""
48861      C_O_FLAG_NONE="-Od"
48862      C_O_FLAG_SIZE="-Os"
48863    fi
48864    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48865    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48866    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48867    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48868    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48869    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48870    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48871    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48872  fi
48873
48874  # Adjust optimization flags according to debug level.
48875  case $DEBUG_LEVEL in
48876    release )
48877      # no adjustment
48878      ;;
48879    fastdebug )
48880      # Not quite so much optimization
48881      C_O_FLAG_HI="$C_O_FLAG_NORM"
48882      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48883      ;;
48884    slowdebug )
48885      # Disable optimization
48886      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48887      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48888      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48889      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48890      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48891      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48892      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48893      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48894      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48895      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48896      ;;
48897  esac
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917  # Special extras...
48918  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48919    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48920      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48921      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48922    fi
48923    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48924    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48925  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48926    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48927    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48928  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48929    CXXSTD_CXXFLAG="-std=gnu++98"
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972    # Execute function body
48973
48974  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48975$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48976  supports=yes
48977
48978  saved_cxxflags="$CXXFLAGS"
48979  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48980  ac_ext=cpp
48981ac_cpp='$CXXCPP $CPPFLAGS'
48982ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48983ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48984ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48985
48986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48987/* end confdefs.h.  */
48988int i;
48989_ACEOF
48990if ac_fn_cxx_try_compile "$LINENO"; then :
48991
48992else
48993  supports=no
48994fi
48995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48996  ac_ext=cpp
48997ac_cpp='$CXXCPP $CPPFLAGS'
48998ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48999ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49000ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49001
49002  CXXFLAGS="$saved_cxxflags"
49003
49004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49005$as_echo "$supports" >&6; }
49006  if test "x$supports" = "xyes" ; then
49007    :
49008
49009  else
49010    :
49011    CXXSTD_CXXFLAG=""
49012  fi
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49026
49027  fi
49028  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49029    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49030    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49031    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49032    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49033    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49034  fi
49035
49036  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49037    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49038    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49039    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49040  fi
49041
49042  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49043  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49044  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49045
49046  ###############################################################################
49047  #
49048  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49049  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49050  #
49051
49052  # Setup compiler/platform specific flags into
49053  #    CFLAGS_JDK    - C Compiler flags
49054  #    CXXFLAGS_JDK  - C++ Compiler flags
49055  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49056  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49057    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49058    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49059    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49060    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49061      # Force compatibility with i586 on 32 bit intel platforms.
49062      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49063      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49064    fi
49065    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49066        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49067    case $OPENJDK_TARGET_CPU_ARCH in
49068      arm )
49069        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49070        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49071        ;;
49072      ppc )
49073        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49074        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49075        ;;
49076      * )
49077        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49078        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49079        ;;
49080    esac
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123    # Execute function body
49124
49125  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49126  REFERENCE_VERSION=6
49127
49128  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49129    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49130  fi
49131
49132  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49133    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49134  fi
49135
49136  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49137  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49138
49139  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49140    :
49141
49142  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49143  # runs afoul of the more aggressive versions of these optimisations.
49144  # Notably, value range propagation now assumes that the this pointer of C++
49145  # member functions is non-null.
49146  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189    # Execute function body
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238    # Execute function body
49239
49240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49241$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49242  supports=yes
49243
49244  saved_cflags="$CFLAGS"
49245  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49246  ac_ext=c
49247ac_cpp='$CPP $CPPFLAGS'
49248ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49249ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49250ac_compiler_gnu=$ac_cv_c_compiler_gnu
49251
49252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49253/* end confdefs.h.  */
49254int i;
49255_ACEOF
49256if ac_fn_c_try_compile "$LINENO"; then :
49257
49258else
49259  supports=no
49260fi
49261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49262  ac_ext=cpp
49263ac_cpp='$CXXCPP $CPPFLAGS'
49264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49267
49268  CFLAGS="$saved_cflags"
49269
49270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49271$as_echo "$supports" >&6; }
49272  if test "x$supports" = "xyes" ; then
49273    :
49274    C_COMP_SUPPORTS="yes"
49275  else
49276    :
49277    C_COMP_SUPPORTS="no"
49278  fi
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338    # Execute function body
49339
49340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49341$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49342  supports=yes
49343
49344  saved_cxxflags="$CXXFLAGS"
49345  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49346  ac_ext=cpp
49347ac_cpp='$CXXCPP $CPPFLAGS'
49348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49351
49352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49353/* end confdefs.h.  */
49354int i;
49355_ACEOF
49356if ac_fn_cxx_try_compile "$LINENO"; then :
49357
49358else
49359  supports=no
49360fi
49361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49362  ac_ext=cpp
49363ac_cpp='$CXXCPP $CPPFLAGS'
49364ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49365ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49366ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49367
49368  CXXFLAGS="$saved_cxxflags"
49369
49370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49371$as_echo "$supports" >&6; }
49372  if test "x$supports" = "xyes" ; then
49373    :
49374    CXX_COMP_SUPPORTS="yes"
49375  else
49376    :
49377    CXX_COMP_SUPPORTS="no"
49378  fi
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49393$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49394  supports=no
49395  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49396
49397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49398$as_echo "$supports" >&6; }
49399  if test "x$supports" = "xyes" ; then
49400    :
49401
49402  else
49403    :
49404    NO_NULL_POINTER_CHECK_CFLAG=""
49405  fi
49406
49407
49408
49409
49410
49411
49412
49413  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456    # Execute function body
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505    # Execute function body
49506
49507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49508$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49509  supports=yes
49510
49511  saved_cflags="$CFLAGS"
49512  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49513  ac_ext=c
49514ac_cpp='$CPP $CPPFLAGS'
49515ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49516ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49517ac_compiler_gnu=$ac_cv_c_compiler_gnu
49518
49519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49520/* end confdefs.h.  */
49521int i;
49522_ACEOF
49523if ac_fn_c_try_compile "$LINENO"; then :
49524
49525else
49526  supports=no
49527fi
49528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49529  ac_ext=cpp
49530ac_cpp='$CXXCPP $CPPFLAGS'
49531ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49532ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49533ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49534
49535  CFLAGS="$saved_cflags"
49536
49537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49538$as_echo "$supports" >&6; }
49539  if test "x$supports" = "xyes" ; then
49540    :
49541    C_COMP_SUPPORTS="yes"
49542  else
49543    :
49544    C_COMP_SUPPORTS="no"
49545  fi
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605    # Execute function body
49606
49607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49608$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49609  supports=yes
49610
49611  saved_cxxflags="$CXXFLAGS"
49612  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49613  ac_ext=cpp
49614ac_cpp='$CXXCPP $CPPFLAGS'
49615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49618
49619  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49620/* end confdefs.h.  */
49621int i;
49622_ACEOF
49623if ac_fn_cxx_try_compile "$LINENO"; then :
49624
49625else
49626  supports=no
49627fi
49628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49629  ac_ext=cpp
49630ac_cpp='$CXXCPP $CPPFLAGS'
49631ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49632ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49633ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49634
49635  CXXFLAGS="$saved_cxxflags"
49636
49637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49638$as_echo "$supports" >&6; }
49639  if test "x$supports" = "xyes" ; then
49640    :
49641    CXX_COMP_SUPPORTS="yes"
49642  else
49643    :
49644    CXX_COMP_SUPPORTS="no"
49645  fi
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49660$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49661  supports=no
49662  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49663
49664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49665$as_echo "$supports" >&6; }
49666  if test "x$supports" = "xyes" ; then
49667    :
49668
49669  else
49670    :
49671    NO_LIFETIME_DSE_CFLAG=""
49672  fi
49673
49674
49675
49676
49677
49678
49679  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49680
49681
49682
49683  else
49684    :
49685
49686  fi
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49700    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49701
49702    # Restrict the debug information created by Clang to avoid
49703    # too big object files and speed the build up a little bit
49704    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49705    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49706    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49707      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49708        # Force compatibility with i586 on 32 bit intel platforms.
49709        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49710        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49711      fi
49712      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49713      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49714          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49715      case $OPENJDK_TARGET_CPU_ARCH in
49716        ppc )
49717          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49718          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49719          ;;
49720        * )
49721          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49722          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49723          ;;
49724      esac
49725    fi
49726  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49727    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49728    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49729    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49730      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49731    fi
49732
49733    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49734    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49735  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49736    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49737    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49738    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49739  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49740    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49741        -MD -Zc:wchar_t- -W3 -wd4800 \
49742        -DWIN32_LEAN_AND_MEAN \
49743        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49744        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49745        -DWIN32 -DIAL"
49746    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49747      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49748    else
49749      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49750    fi
49751    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49752    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49753    # studio.
49754    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49755      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49756      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49757      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49758    fi
49759  fi
49760
49761  ###############################################################################
49762
49763  # Adjust flags according to debug level.
49764  case $DEBUG_LEVEL in
49765    fastdebug | slowdebug )
49766      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49767      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49768      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49769      ;;
49770    release )
49771      ;;
49772    * )
49773      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49774      ;;
49775  esac
49776
49777  # Set some common defines. These works for all compilers, but assume
49778  # -D is universally accepted.
49779
49780  # Setup endianness
49781  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49782    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49783    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49784    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49785    #   Note: -Dmacro         is the same as    #define macro 1
49786    #         -Dmacro=        is the same as    #define macro
49787    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49788      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49789    else
49790      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49791    fi
49792  else
49793    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49794    # are defined in the system?
49795    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49796      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49797    else
49798      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49799    fi
49800  fi
49801
49802  # Setup target OS define. Use OS target name but in upper case.
49803  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49804  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49805
49806  # Setup target CPU
49807  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49808      $OPENJDK_TARGET_ADD_LP64 \
49809      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49810
49811  # Setup debug/release defines
49812  if test "x$DEBUG_LEVEL" = xrelease; then
49813    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49814    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49815      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49816    fi
49817  else
49818    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49819  fi
49820
49821  # Set some additional per-OS defines.
49822  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49823    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49824    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49825        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49826  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49827    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49828    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49829        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49830  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49831    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49832    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49833    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49834    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49835        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49836        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49837        -fno-omit-frame-pointer"
49838  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49839    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49840    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49841    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49842        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49843        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49844  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49845    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49846  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49847    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49848    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49849  fi
49850
49851  # Set some additional per-CPU defines.
49852  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49853    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49854  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49855    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49856  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49857    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49858      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49859      # fixes `relocation truncated to fit' error for gcc 4.1.
49860      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49861      # Use ppc64 instructions, but schedule for power5
49862      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49863    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49864      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49865    fi
49866  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49867    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49868      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49869      # Little endian machine uses ELFv2 ABI.
49870      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49871      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49872      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49873    fi
49874  fi
49875
49876  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49877    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49878  fi
49879
49880  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49881    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49882      # Solaris does not have _LP64=1 in the old build.
49883      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49884      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49885    fi
49886  fi
49887
49888  # Set JVM_CFLAGS warning handling
49889  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49890    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49891        -Wunused-value -Woverloaded-virtual"
49892
49893    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936    # Execute function body
49937
49938  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49939  REFERENCE_VERSION=4.8
49940
49941  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49942    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49943  fi
49944
49945  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49946    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49947  fi
49948
49949  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49950  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49951
49952  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49953    :
49954
49955            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49956            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49957
49958
49959  else
49960    :
49961
49962  fi
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975    fi
49976    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49977      # Non-zero builds have stricter warnings
49978      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49979    else
49980      if test "x$TOOLCHAIN_TYPE" = xclang; then
49981        # Some versions of llvm do not like -Wundef
49982        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49983      fi
49984    fi
49985  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49986    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49987        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49988  fi
49989
49990  # Additional macosx handling
49991  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49992    # Setting these parameters makes it an error to link to macosx APIs that are
49993    # newer than the given OS version and makes the linked binaries compatible
49994    # even if built on a newer version of the OS.
49995    # The expected format is X.Y.Z
49996    MACOSX_VERSION_MIN=10.7.0
49997
49998
49999    # The macro takes the version with no dots, ex: 1070
50000    # Let the flags variables get resolved in make for easier override on make
50001    # command line.
50002    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50003    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50004  fi
50005
50006  # Setup some hard coded includes
50007  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50008      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50009      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50010      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50011      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50012      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50013
50014  # The shared libraries are compiled using the picflag.
50015  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50016      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50017  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50018      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50019
50020  # Executable flags
50021  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50022  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50023
50024
50025
50026
50027
50028
50029  # Setup LDFLAGS et al.
50030  #
50031
50032  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50033    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50034    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50035    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50036    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50037      LDFLAGS_SAFESH="-safeseh"
50038      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50039      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50040      # NOTE: Old build added -machine. Probably not needed.
50041      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50042    else
50043      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50044    fi
50045  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50046      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50047      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50048        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50049        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50050    fi
50051  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50052    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50053    # We have previously set HAS_GNU_HASH if this is the case
50054    if test -n "$HAS_GNU_HASH"; then
50055      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50056      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50057      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50058    fi
50059      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50060        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50061    fi
50062    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50063      # And since we now know that the linker is gnu, then add -z defs, to forbid
50064      # undefined symbols in object files.
50065      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50066      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50067      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50068      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50069      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50070      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50071        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50072      fi
50073      case $DEBUG_LEVEL in
50074        release )
50075          # tell linker to optimize libraries.
50076          # Should this be supplied to the OSS linker as well?
50077          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50078          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50079          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50080          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50081            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50082          fi
50083          ;;
50084        slowdebug )
50085          # Hotspot always let the linker optimize
50086          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50087          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50088            # do relocations at load
50089            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50090            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50091            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50092          fi
50093          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50094            # mark relocations read only
50095            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50096            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50097            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50098          fi
50099          ;;
50100        fastdebug )
50101          # Hotspot always let the linker optimize
50102          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50103          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50104            # mark relocations read only
50105            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50106            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50107            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50108          fi
50109          ;;
50110        * )
50111          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50112          ;;
50113        esac
50114    fi
50115  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50116    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50117    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50118    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50119    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50120    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50121    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50122      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50123    fi
50124  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50125    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50126    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50127    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50128  fi
50129
50130  # Customize LDFLAGS for executables
50131
50132  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50133
50134  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50135    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50136      LDFLAGS_STACK_SIZE=1048576
50137    else
50138      LDFLAGS_STACK_SIZE=327680
50139    fi
50140    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50141  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50142    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50143  fi
50144
50145  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50146
50147  # Customize LDFLAGS for libs
50148  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50149
50150  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50151  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50152    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50153        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50154    JDKLIB_LIBS=""
50155  else
50156    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50157        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50158
50159    if test "xTARGET" = "xTARGET"; then
50160    # On some platforms (mac) the linker warns about non existing -L dirs.
50161    # Add server first if available. Linking aginst client does not always produce the same results.
50162      # Only add client/minimal dir if client/minimal is being built.
50163    # Default to server for other variants.
50164      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50165        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50166      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50167        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50168      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50169        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50170    else
50171        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50172    fi
50173    elif test "xTARGET" = "xBUILD"; then
50174      # When building a buildjdk, it's always only the server variant
50175      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50176          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50177    fi
50178
50179    JDKLIB_LIBS="-ljava -ljvm"
50180    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50181      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50182    fi
50183
50184  fi
50185
50186  # Set JVM_LIBS (per os)
50187  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50188    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50189  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50190    # FIXME: This hard-coded path is not really proper.
50191    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50192      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50193    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50194      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50195    fi
50196    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50197        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50198  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50199    JVM_LIBS="$JVM_LIBS -lm"
50200  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50201    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50202  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50203    JVM_LIBS="$JVM_LIBS -lm"
50204  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50205    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50206        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50207        wsock32.lib winmm.lib version.lib psapi.lib"
50208    fi
50209
50210  # Set JVM_ASFLAGS
50211  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50212    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50213      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50214    fi
50215  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50216    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50217  fi
50218
50219  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235  # Special extras...
50236  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50237    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50238      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50239      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50240    fi
50241    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50242    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50243  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50244    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50245    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50246  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50247    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290    # Execute function body
50291
50292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50293$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50294  supports=yes
50295
50296  saved_cxxflags="$CXXFLAGS"
50297  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50298  ac_ext=cpp
50299ac_cpp='$CXXCPP $CPPFLAGS'
50300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50303
50304  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50305/* end confdefs.h.  */
50306int i;
50307_ACEOF
50308if ac_fn_cxx_try_compile "$LINENO"; then :
50309
50310else
50311  supports=no
50312fi
50313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50314  ac_ext=cpp
50315ac_cpp='$CXXCPP $CPPFLAGS'
50316ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50317ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50318ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50319
50320  CXXFLAGS="$saved_cxxflags"
50321
50322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50323$as_echo "$supports" >&6; }
50324  if test "x$supports" = "xyes" ; then
50325    :
50326
50327  else
50328    :
50329    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50330  fi
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50344
50345  fi
50346  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50347    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50348    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50349    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50350    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50351    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50352  fi
50353
50354  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50355    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50356    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50357    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50358  fi
50359
50360  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50361  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50362  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50363
50364  ###############################################################################
50365  #
50366  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50367  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50368  #
50369
50370  # Setup compiler/platform specific flags into
50371  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50372  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50373  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50374  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50375    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50376    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50377    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50378    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50379      # Force compatibility with i586 on 32 bit intel platforms.
50380      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50381      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50382    fi
50383    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50384        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50385    case $OPENJDK_BUILD_CPU_ARCH in
50386      arm )
50387        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50388        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50389        ;;
50390      ppc )
50391        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50392        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50393        ;;
50394      * )
50395        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50396        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50397        ;;
50398    esac
50399
50400
50401
50402
50403
50404
50405
50406
50407
50408
50409
50410
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436
50437
50438
50439
50440
50441    # Execute function body
50442
50443  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50444  REFERENCE_VERSION=6
50445
50446  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50447    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50448  fi
50449
50450  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50451    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50452  fi
50453
50454  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50455  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50456
50457  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50458    :
50459
50460  else
50461    :
50462
50463  fi
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475
50476  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50477    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50478
50479    # Restrict the debug information created by Clang to avoid
50480    # too big object files and speed the build up a little bit
50481    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50482    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50483    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50484      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50485        # Force compatibility with i586 on 32 bit intel platforms.
50486        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50487        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50488      fi
50489      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50490      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50491          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50492      case $OPENJDK_BUILD_CPU_ARCH in
50493        ppc )
50494          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50495          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50496          ;;
50497        * )
50498          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50499          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50500          ;;
50501      esac
50502    fi
50503  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50504    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50505    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50506    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50507      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50508    fi
50509
50510    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50511    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50512  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50513    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50514    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50515    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50516  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50517    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50518        -MD -Zc:wchar_t- -W3 -wd4800 \
50519        -DWIN32_LEAN_AND_MEAN \
50520        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50521        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50522        -DWIN32 -DIAL"
50523    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50524      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50525    else
50526      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50527    fi
50528    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50529    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50530    # studio.
50531    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50532      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50533      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50534      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50535    fi
50536  fi
50537
50538  ###############################################################################
50539
50540  # Adjust flags according to debug level.
50541  case $DEBUG_LEVEL in
50542    fastdebug | slowdebug )
50543      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50544      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50545      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50546      ;;
50547    release )
50548      ;;
50549    * )
50550      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50551      ;;
50552  esac
50553
50554  # Set some common defines. These works for all compilers, but assume
50555  # -D is universally accepted.
50556
50557  # Setup endianness
50558  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50559    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50560    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50561    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50562    #   Note: -Dmacro         is the same as    #define macro 1
50563    #         -Dmacro=        is the same as    #define macro
50564    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50565      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50566    else
50567      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50568    fi
50569  else
50570    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50571    # are defined in the system?
50572    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50573      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50574    else
50575      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50576    fi
50577  fi
50578
50579  # Setup target OS define. Use OS target name but in upper case.
50580  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50581  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50582
50583  # Setup target CPU
50584  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50585      $OPENJDK_BUILD_ADD_LP64 \
50586      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50587
50588  # Setup debug/release defines
50589  if test "x$DEBUG_LEVEL" = xrelease; then
50590    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50591    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50592      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50593    fi
50594  else
50595    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50596  fi
50597
50598  # Set some additional per-OS defines.
50599  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50600    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50601    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50602        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50603  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50605    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50606        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50607  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50608    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50610    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50611    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50612        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50613        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50614        -fno-omit-frame-pointer"
50615  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50616    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50617    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50618    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50619        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50620        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50621  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50622    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50623  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50624    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50625    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50626  fi
50627
50628  # Set some additional per-CPU defines.
50629  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50630    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50631  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50632    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50633  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50634    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50635      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50636      # fixes `relocation truncated to fit' error for gcc 4.1.
50637      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50638      # Use ppc64 instructions, but schedule for power5
50639      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50640    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50641      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50642    fi
50643  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50644    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50645      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50646      # Little endian machine uses ELFv2 ABI.
50647      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50648      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50649      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50650    fi
50651  fi
50652
50653  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50654    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50655  fi
50656
50657  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50658    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50659      # Solaris does not have _LP64=1 in the old build.
50660      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50661      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50662    fi
50663  fi
50664
50665  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50666  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50667    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50668        -Wunused-value -Woverloaded-virtual"
50669
50670    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713    # Execute function body
50714
50715  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50716  REFERENCE_VERSION=4.8
50717
50718  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50719    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50720  fi
50721
50722  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50723    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50724  fi
50725
50726  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50727  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50728
50729  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50730    :
50731
50732            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50733            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50734
50735
50736  else
50737    :
50738
50739  fi
50740
50741
50742
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752    fi
50753    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50754      # Non-zero builds have stricter warnings
50755      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50756    else
50757      if test "x$TOOLCHAIN_TYPE" = xclang; then
50758        # Some versions of llvm do not like -Wundef
50759        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50760      fi
50761    fi
50762  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50763    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50764        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50765  fi
50766
50767  # Additional macosx handling
50768  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50769    # Setting these parameters makes it an error to link to macosx APIs that are
50770    # newer than the given OS version and makes the linked binaries compatible
50771    # even if built on a newer version of the OS.
50772    # The expected format is X.Y.Z
50773    MACOSX_VERSION_MIN=10.7.0
50774
50775
50776    # The macro takes the version with no dots, ex: 1070
50777    # Let the flags variables get resolved in make for easier override on make
50778    # command line.
50779    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50780    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50781  fi
50782
50783  # Setup some hard coded includes
50784  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50785      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50786      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50787      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50788      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50789      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50790
50791  # The shared libraries are compiled using the picflag.
50792  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50793      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50794  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50795      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50796
50797  # Executable flags
50798  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50799  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50800
50801
50802
50803
50804
50805
50806  # Setup LDFLAGS et al.
50807  #
50808
50809  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50810    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50811    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50812    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50813    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50814      LDFLAGS_SAFESH="-safeseh"
50815      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50816      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50817      # NOTE: Old build added -machine. Probably not needed.
50818      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50819    else
50820      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50821    fi
50822  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50823      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50824      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50825        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50826        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50827    fi
50828  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50829    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50830    # We have previously set HAS_GNU_HASH if this is the case
50831    if test -n "$HAS_GNU_HASH"; then
50832      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50833      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50834      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50835    fi
50836      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50837        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50838    fi
50839    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50840      # And since we now know that the linker is gnu, then add -z defs, to forbid
50841      # undefined symbols in object files.
50842      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50843      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50844      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50845      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50846      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50847      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50848        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50849      fi
50850      case $DEBUG_LEVEL in
50851        release )
50852          # tell linker to optimize libraries.
50853          # Should this be supplied to the OSS linker as well?
50854          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50855          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50856          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50857          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50858            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50859          fi
50860          ;;
50861        slowdebug )
50862          # Hotspot always let the linker optimize
50863          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50864          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50865            # do relocations at load
50866            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50867            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50868            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50869          fi
50870          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50871            # mark relocations read only
50872            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50873            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50874            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50875          fi
50876          ;;
50877        fastdebug )
50878          # Hotspot always let the linker optimize
50879          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50880          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50881            # mark relocations read only
50882            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50883            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50884            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50885          fi
50886          ;;
50887        * )
50888          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50889          ;;
50890        esac
50891    fi
50892  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50893    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50894    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50895    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50896    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50897    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50898    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50899      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50900    fi
50901  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50902    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50903    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50904    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50905  fi
50906
50907  # Customize LDFLAGS for executables
50908
50909  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50910
50911  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50912    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50913      LDFLAGS_STACK_SIZE=1048576
50914    else
50915      LDFLAGS_STACK_SIZE=327680
50916    fi
50917    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50918  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50919    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50920  fi
50921
50922  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50923
50924  # Customize LDFLAGS for libs
50925  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50926
50927  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50928  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50929    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50930        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50931    OPENJDK_BUILD_JDKLIB_LIBS=""
50932  else
50933    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50934        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50935
50936    if test "xBUILD" = "xTARGET"; then
50937    # On some platforms (mac) the linker warns about non existing -L dirs.
50938    # Add server first if available. Linking aginst client does not always produce the same results.
50939      # Only add client/minimal dir if client/minimal is being built.
50940    # Default to server for other variants.
50941      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50942        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50943      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50944        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50945      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50946        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50947    else
50948        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50949    fi
50950    elif test "xBUILD" = "xBUILD"; then
50951      # When building a buildjdk, it's always only the server variant
50952      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50953          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50954    fi
50955
50956    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50957    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50958      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50959    fi
50960
50961  fi
50962
50963  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50964  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50965    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50966  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50967    # FIXME: This hard-coded path is not really proper.
50968    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50969      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50970    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50971      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50972    fi
50973    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50974        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50975  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50976    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50977  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50978    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50979  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50980    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50981  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50982    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50983        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50984        wsock32.lib winmm.lib version.lib psapi.lib"
50985    fi
50986
50987  # Set OPENJDK_BUILD_JVM_ASFLAGS
50988  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50989    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50990      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50991    fi
50992  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50993    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50994  fi
50995
50996  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50997
50998
50999
51000
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012  # Tests are only ever compiled for TARGET
51013  # Flags for compiling test libraries
51014  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51015  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51016
51017  # Flags for compiling test executables
51018  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51019  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51020
51021
51022
51023
51024
51025
51026  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51027  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51028
51029
51030
51031
51032
51033
51034  # Some Zero and Shark settings.
51035  # ZERO_ARCHFLAG tells the compiler which mode to build for
51036  case "${OPENJDK_TARGET_CPU}" in
51037    s390)
51038      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51039      ;;
51040    *)
51041      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51042  esac
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080
51081
51082
51083
51084
51085    # Execute function body
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097
51098
51099
51100
51101
51102
51103
51104
51105
51106
51107
51108
51109
51110
51111
51112
51113
51114
51115
51116
51117
51118
51119
51120
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133
51134    # Execute function body
51135
51136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51137$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51138  supports=yes
51139
51140  saved_cflags="$CFLAGS"
51141  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51142  ac_ext=c
51143ac_cpp='$CPP $CPPFLAGS'
51144ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51145ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51146ac_compiler_gnu=$ac_cv_c_compiler_gnu
51147
51148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51149/* end confdefs.h.  */
51150int i;
51151_ACEOF
51152if ac_fn_c_try_compile "$LINENO"; then :
51153
51154else
51155  supports=no
51156fi
51157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51158  ac_ext=cpp
51159ac_cpp='$CXXCPP $CPPFLAGS'
51160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51163
51164  CFLAGS="$saved_cflags"
51165
51166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51167$as_echo "$supports" >&6; }
51168  if test "x$supports" = "xyes" ; then
51169    :
51170    C_COMP_SUPPORTS="yes"
51171  else
51172    :
51173    C_COMP_SUPPORTS="no"
51174  fi
51175
51176
51177
51178
51179
51180
51181
51182
51183
51184
51185
51186
51187
51188
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234    # Execute function body
51235
51236  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51237$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51238  supports=yes
51239
51240  saved_cxxflags="$CXXFLAGS"
51241  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51242  ac_ext=cpp
51243ac_cpp='$CXXCPP $CPPFLAGS'
51244ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51245ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51246ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51247
51248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51249/* end confdefs.h.  */
51250int i;
51251_ACEOF
51252if ac_fn_cxx_try_compile "$LINENO"; then :
51253
51254else
51255  supports=no
51256fi
51257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51258  ac_ext=cpp
51259ac_cpp='$CXXCPP $CPPFLAGS'
51260ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51261ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51262ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51263
51264  CXXFLAGS="$saved_cxxflags"
51265
51266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51267$as_echo "$supports" >&6; }
51268  if test "x$supports" = "xyes" ; then
51269    :
51270    CXX_COMP_SUPPORTS="yes"
51271  else
51272    :
51273    CXX_COMP_SUPPORTS="no"
51274  fi
51275
51276
51277
51278
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51289$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51290  supports=no
51291  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51292
51293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51294$as_echo "$supports" >&6; }
51295  if test "x$supports" = "xyes" ; then
51296    :
51297
51298  else
51299    :
51300    ZERO_ARCHFLAG=""
51301  fi
51302
51303
51304
51305
51306
51307
51308
51309
51310  # Check that the compiler supports -mX (or -qX on AIX) flags
51311  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51312
51313
51314
51315
51316
51317
51318
51319
51320
51321
51322
51323
51324
51325
51326
51327
51328
51329
51330
51331
51332
51333
51334
51335
51336
51337
51338
51339
51340
51341
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357
51358
51359    # Execute function body
51360
51361
51362
51363
51364
51365
51366
51367
51368
51369
51370
51371
51372
51373
51374
51375
51376
51377
51378
51379
51380
51381
51382
51383
51384
51385
51386
51387
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408    # Execute function body
51409
51410  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51411$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51412  supports=yes
51413
51414  saved_cflags="$CFLAGS"
51415  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51416  ac_ext=c
51417ac_cpp='$CPP $CPPFLAGS'
51418ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51419ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51420ac_compiler_gnu=$ac_cv_c_compiler_gnu
51421
51422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51423/* end confdefs.h.  */
51424int i;
51425_ACEOF
51426if ac_fn_c_try_compile "$LINENO"; then :
51427
51428else
51429  supports=no
51430fi
51431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51432  ac_ext=cpp
51433ac_cpp='$CXXCPP $CPPFLAGS'
51434ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51435ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51436ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51437
51438  CFLAGS="$saved_cflags"
51439
51440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51441$as_echo "$supports" >&6; }
51442  if test "x$supports" = "xyes" ; then
51443    :
51444    C_COMP_SUPPORTS="yes"
51445  else
51446    :
51447    C_COMP_SUPPORTS="no"
51448  fi
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508    # Execute function body
51509
51510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51511$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51512  supports=yes
51513
51514  saved_cxxflags="$CXXFLAGS"
51515  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51516  ac_ext=cpp
51517ac_cpp='$CXXCPP $CPPFLAGS'
51518ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51519ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51520ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51521
51522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51523/* end confdefs.h.  */
51524int i;
51525_ACEOF
51526if ac_fn_cxx_try_compile "$LINENO"; then :
51527
51528else
51529  supports=no
51530fi
51531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51532  ac_ext=cpp
51533ac_cpp='$CXXCPP $CPPFLAGS'
51534ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51535ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51536ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51537
51538  CXXFLAGS="$saved_cxxflags"
51539
51540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51541$as_echo "$supports" >&6; }
51542  if test "x$supports" = "xyes" ; then
51543    :
51544    CXX_COMP_SUPPORTS="yes"
51545  else
51546    :
51547    CXX_COMP_SUPPORTS="no"
51548  fi
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51563$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51564  supports=no
51565  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51566
51567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51568$as_echo "$supports" >&6; }
51569  if test "x$supports" = "xyes" ; then
51570    :
51571    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51572  else
51573    :
51574    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51575  fi
51576
51577
51578
51579
51580
51581
51582
51583
51584  # Check whether --enable-warnings-as-errors was given.
51585if test "${enable_warnings_as_errors+set}" = set; then :
51586  enableval=$enable_warnings_as_errors;
51587fi
51588
51589
51590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51591$as_echo_n "checking if native warnings are errors... " >&6; }
51592  if test "x$enable_warnings_as_errors" = "xyes"; then
51593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51594$as_echo "yes (explicitely set)" >&6; }
51595    WARNINGS_AS_ERRORS=true
51596  elif test "x$enable_warnings_as_errors" = "xno"; then
51597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51598$as_echo "no" >&6; }
51599    WARNINGS_AS_ERRORS=false
51600  elif test "x$enable_warnings_as_errors" = "x"; then
51601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51602$as_echo "yes (default)" >&6; }
51603    WARNINGS_AS_ERRORS=true
51604  else
51605    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51606  fi
51607
51608  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51609    # Set legacy hotspot variable
51610    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51611  else
51612    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51613  fi
51614
51615
51616
51617
51618  case "${TOOLCHAIN_TYPE}" in
51619    microsoft)
51620      DISABLE_WARNING_PREFIX="-wd"
51621      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51622      ;;
51623    solstudio)
51624      DISABLE_WARNING_PREFIX="-erroff="
51625      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51626      ;;
51627    gcc)
51628      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51629
51630
51631
51632
51633
51634
51635
51636
51637
51638
51639
51640
51641
51642
51643
51644
51645
51646
51647
51648
51649
51650
51651
51652
51653
51654
51655
51656
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676    # Execute function body
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725    # Execute function body
51726
51727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51728$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51729  supports=yes
51730
51731  saved_cflags="$CFLAGS"
51732  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51733  ac_ext=c
51734ac_cpp='$CPP $CPPFLAGS'
51735ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51736ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51737ac_compiler_gnu=$ac_cv_c_compiler_gnu
51738
51739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51740/* end confdefs.h.  */
51741int i;
51742_ACEOF
51743if ac_fn_c_try_compile "$LINENO"; then :
51744
51745else
51746  supports=no
51747fi
51748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51749  ac_ext=cpp
51750ac_cpp='$CXXCPP $CPPFLAGS'
51751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51754
51755  CFLAGS="$saved_cflags"
51756
51757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51758$as_echo "$supports" >&6; }
51759  if test "x$supports" = "xyes" ; then
51760    :
51761    C_COMP_SUPPORTS="yes"
51762  else
51763    :
51764    C_COMP_SUPPORTS="no"
51765  fi
51766
51767
51768
51769
51770
51771
51772
51773
51774
51775
51776
51777
51778
51779
51780
51781
51782
51783
51784
51785
51786
51787
51788
51789
51790
51791
51792
51793
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825    # Execute function body
51826
51827  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51828$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51829  supports=yes
51830
51831  saved_cxxflags="$CXXFLAGS"
51832  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51833  ac_ext=cpp
51834ac_cpp='$CXXCPP $CPPFLAGS'
51835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51838
51839  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51840/* end confdefs.h.  */
51841int i;
51842_ACEOF
51843if ac_fn_cxx_try_compile "$LINENO"; then :
51844
51845else
51846  supports=no
51847fi
51848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51849  ac_ext=cpp
51850ac_cpp='$CXXCPP $CPPFLAGS'
51851ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51852ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51853ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51854
51855  CXXFLAGS="$saved_cxxflags"
51856
51857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51858$as_echo "$supports" >&6; }
51859  if test "x$supports" = "xyes" ; then
51860    :
51861    CXX_COMP_SUPPORTS="yes"
51862  else
51863    :
51864    CXX_COMP_SUPPORTS="no"
51865  fi
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51880$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51881  supports=no
51882  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51883
51884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51885$as_echo "$supports" >&6; }
51886  if test "x$supports" = "xyes" ; then
51887    :
51888    GCC_CAN_DISABLE_WARNINGS=true
51889  else
51890    :
51891    GCC_CAN_DISABLE_WARNINGS=false
51892
51893  fi
51894
51895
51896
51897
51898
51899
51900      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51901        DISABLE_WARNING_PREFIX="-Wno-"
51902      else
51903        DISABLE_WARNING_PREFIX=
51904      fi
51905      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51906      # Repeate the check for the BUILD_CC
51907      CC_OLD="$CC"
51908      CC="$BUILD_CC"
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956    # Execute function body
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005    # Execute function body
52006
52007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52008$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52009  supports=yes
52010
52011  saved_cflags="$CFLAGS"
52012  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52013  ac_ext=c
52014ac_cpp='$CPP $CPPFLAGS'
52015ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52016ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52017ac_compiler_gnu=$ac_cv_c_compiler_gnu
52018
52019  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52020/* end confdefs.h.  */
52021int i;
52022_ACEOF
52023if ac_fn_c_try_compile "$LINENO"; then :
52024
52025else
52026  supports=no
52027fi
52028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52029  ac_ext=cpp
52030ac_cpp='$CXXCPP $CPPFLAGS'
52031ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52032ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52033ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52034
52035  CFLAGS="$saved_cflags"
52036
52037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52038$as_echo "$supports" >&6; }
52039  if test "x$supports" = "xyes" ; then
52040    :
52041    C_COMP_SUPPORTS="yes"
52042  else
52043    :
52044    C_COMP_SUPPORTS="no"
52045  fi
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077
52078
52079
52080
52081
52082
52083
52084
52085
52086
52087
52088
52089
52090
52091
52092
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105    # Execute function body
52106
52107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52108$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52109  supports=yes
52110
52111  saved_cxxflags="$CXXFLAGS"
52112  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52113  ac_ext=cpp
52114ac_cpp='$CXXCPP $CPPFLAGS'
52115ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52116ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52117ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52118
52119  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52120/* end confdefs.h.  */
52121int i;
52122_ACEOF
52123if ac_fn_cxx_try_compile "$LINENO"; then :
52124
52125else
52126  supports=no
52127fi
52128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52129  ac_ext=cpp
52130ac_cpp='$CXXCPP $CPPFLAGS'
52131ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52132ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52133ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52134
52135  CXXFLAGS="$saved_cxxflags"
52136
52137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52138$as_echo "$supports" >&6; }
52139  if test "x$supports" = "xyes" ; then
52140    :
52141    CXX_COMP_SUPPORTS="yes"
52142  else
52143    :
52144    CXX_COMP_SUPPORTS="no"
52145  fi
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52160$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52161  supports=no
52162  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52163
52164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52165$as_echo "$supports" >&6; }
52166  if test "x$supports" = "xyes" ; then
52167    :
52168    BUILD_CC_CAN_DISABLE_WARNINGS=true
52169  else
52170    :
52171    BUILD_CC_CAN_DISABLE_WARNINGS=false
52172
52173  fi
52174
52175
52176
52177
52178
52179
52180      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52181        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52182      else
52183        BUILD_CC_DISABLE_WARNING_PREFIX=
52184      fi
52185      CC="$CC_OLD"
52186      ;;
52187    clang)
52188      DISABLE_WARNING_PREFIX="-Wno-"
52189      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52190      ;;
52191    xlc)
52192      DISABLE_WARNING_PREFIX="-qsuppress="
52193      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52194      ;;
52195  esac
52196
52197
52198
52199
52200
52201# Setup debug symbols (need objcopy from the toolchain for that)
52202
52203  #
52204  # NATIVE_DEBUG_SYMBOLS
52205  # This must be done after the toolchain is setup, since we're looking at objcopy.
52206  #
52207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52208$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52209
52210# Check whether --with-native-debug-symbols was given.
52211if test "${with_native_debug_symbols+set}" = set; then :
52212  withval=$with_native_debug_symbols;
52213        if test "x$OPENJDK_TARGET_OS" = xaix; then
52214          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52215            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52216          fi
52217        fi
52218
52219else
52220
52221        if test "x$OPENJDK_TARGET_OS" = xaix; then
52222          # AIX doesn't support 'zipped' so use 'internal' as default
52223          with_native_debug_symbols="internal"
52224        else
52225          if test "x$STATIC_BUILD" = xtrue; then
52226            with_native_debug_symbols="none"
52227          else
52228            with_native_debug_symbols="zipped"
52229          fi
52230        fi
52231
52232fi
52233
52234  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52236$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52237
52238  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52239
52240    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52241      if test "x$OBJCOPY" = x; then
52242        # enabling of enable-debug-symbols and can't find objcopy
52243        # this is an error
52244        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52245      fi
52246    fi
52247
52248    COMPILE_WITH_DEBUG_SYMBOLS=true
52249    COPY_DEBUG_SYMBOLS=true
52250    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52251
52252    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52253    DEBUG_BINARIES=false
52254    STRIP_POLICY=min_strip
52255
52256  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52257    COMPILE_WITH_DEBUG_SYMBOLS=false
52258    COPY_DEBUG_SYMBOLS=false
52259    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52260
52261    DEBUG_BINARIES=false
52262    STRIP_POLICY=no_strip
52263  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52264    COMPILE_WITH_DEBUG_SYMBOLS=true
52265    COPY_DEBUG_SYMBOLS=false
52266    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52267
52268    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52269    DEBUG_BINARIES=true
52270    STRIP_POLICY=no_strip
52271    STRIP=""
52272
52273  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52274
52275    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52276      if test "x$OBJCOPY" = x; then
52277        # enabling of enable-debug-symbols and can't find objcopy
52278        # this is an error
52279        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52280      fi
52281    fi
52282
52283    COMPILE_WITH_DEBUG_SYMBOLS=true
52284    COPY_DEBUG_SYMBOLS=true
52285    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52286
52287    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52288    DEBUG_BINARIES=false
52289    STRIP_POLICY=min_strip
52290  else
52291    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52292  fi
52293
52294  # --enable-debug-symbols is deprecated.
52295  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52296
52297  # Check whether --enable-debug-symbols was given.
52298if test "${enable_debug_symbols+set}" = set; then :
52299  enableval=$enable_debug_symbols;
52300fi
52301
52302  if test "x$enable_debug_symbols" != x; then
52303    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52304$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52305
52306    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52307      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52308$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52309    fi
52310
52311  fi
52312
52313
52314  # --enable-zip-debug-info is deprecated.
52315  # Please use --with-native-debug-symbols=zipped .
52316
52317  # Check whether --enable-zip-debug-info was given.
52318if test "${enable_zip_debug_info+set}" = set; then :
52319  enableval=$enable_zip_debug_info;
52320fi
52321
52322  if test "x$enable_zip_debug_info" != x; then
52323    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52324$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52325
52326    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52327      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52328$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52329    fi
52330
52331  fi
52332
52333
52334
52335
52336
52337
52338  # Legacy values
52339
52340
52341
52342
52343  # Check whether --enable-native-coverage was given.
52344if test "${enable_native_coverage+set}" = set; then :
52345  enableval=$enable_native_coverage;
52346fi
52347
52348  GCOV_ENABLED="false"
52349  if test "x$enable_native_coverage" = "xyes"; then
52350    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52352$as_echo_n "checking if native coverage is enabled... " >&6; }
52353      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52354$as_echo "yes" >&6; }
52355      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52356      GCOV_LDFLAGS="-fprofile-arcs"
52357      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52358      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52359      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52360      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52361      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52362      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52363      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52364      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52365      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52366      GCOV_ENABLED="true"
52367    else
52368      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52369    fi
52370  elif test "x$enable_native_coverage" = "xno"; then
52371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52372$as_echo_n "checking if native coverage is enabled... " >&6; }
52373    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52374$as_echo "no" >&6; }
52375  elif test "x$enable_native_coverage" != "x"; then
52376    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52377  fi
52378
52379
52380
52381
52382# Need toolchain to setup dtrace
52383
52384  # Test for dtrace dependencies
52385  # Check whether --enable-dtrace was given.
52386if test "${enable_dtrace+set}" = set; then :
52387  enableval=$enable_dtrace;
52388fi
52389
52390
52391  DTRACE_DEP_MISSING=false
52392
52393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52394$as_echo_n "checking for dtrace tool... " >&6; }
52395  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52397$as_echo "$DTRACE" >&6; }
52398  else
52399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52400$as_echo "not found, cannot build dtrace" >&6; }
52401    DTRACE_DEP_MISSING=true
52402  fi
52403
52404  for ac_header in sys/sdt.h
52405do :
52406  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52407if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52408  cat >>confdefs.h <<_ACEOF
52409#define HAVE_SYS_SDT_H 1
52410_ACEOF
52411 DTRACE_HEADERS_OK=yes
52412else
52413  DTRACE_HEADERS_OK=no
52414fi
52415
52416done
52417
52418  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52419    DTRACE_DEP_MISSING=true
52420  fi
52421
52422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52423$as_echo_n "checking if dtrace should be built... " >&6; }
52424  if test "x$enable_dtrace" = "xyes"; then
52425    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52427$as_echo "no, missing dependencies" >&6; }
52428
52429  # Print a helpful message on how to acquire the necessary build dependency.
52430  # dtrace is the help tag: freetype, cups, alsa etc
52431  MISSING_DEPENDENCY=dtrace
52432
52433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52434    cygwin_help $MISSING_DEPENDENCY
52435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52436    msys_help $MISSING_DEPENDENCY
52437  else
52438    PKGHANDLER_COMMAND=
52439
52440    case $PKGHANDLER in
52441      apt-get)
52442        apt_help     $MISSING_DEPENDENCY ;;
52443      yum)
52444        yum_help     $MISSING_DEPENDENCY ;;
52445      port)
52446        port_help    $MISSING_DEPENDENCY ;;
52447      pkgutil)
52448        pkgutil_help $MISSING_DEPENDENCY ;;
52449      pkgadd)
52450        pkgadd_help  $MISSING_DEPENDENCY ;;
52451    esac
52452
52453    if test "x$PKGHANDLER_COMMAND" != x; then
52454      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52455    fi
52456  fi
52457
52458      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52459    else
52460      INCLUDE_DTRACE=true
52461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52462$as_echo "yes, forced" >&6; }
52463    fi
52464  elif test "x$enable_dtrace" = "xno"; then
52465    INCLUDE_DTRACE=false
52466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52467$as_echo "no, forced" >&6; }
52468  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52469    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52470      INCLUDE_DTRACE=false
52471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52472$as_echo "no, non-open linux build" >&6; }
52473    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52474      INCLUDE_DTRACE=false
52475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52476$as_echo "no, missing dependencies" >&6; }
52477    else
52478      INCLUDE_DTRACE=true
52479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52480$as_echo "yes, dependencies present" >&6; }
52481    fi
52482  else
52483    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52484  fi
52485
52486
52487
52488  # The user can in some cases supply additional jvm features. For the custom
52489  # variant, this defines the entire variant.
52490
52491# Check whether --with-jvm-features was given.
52492if test "${with_jvm_features+set}" = set; then :
52493  withval=$with_jvm_features;
52494fi
52495
52496  if test "x$with_jvm_features" != x; then
52497    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52498$as_echo_n "checking additional JVM features... " >&6; }
52499    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52500    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52501$as_echo "$JVM_FEATURES" >&6; }
52502  fi
52503
52504  # Verify that dependencies are met for explicitly set features.
52505  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52506    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52507  fi
52508
52509  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52510    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52511  fi
52512
52513  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52514    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52515  fi
52516
52517  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52518    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52519  fi
52520
52521  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52522    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52523  fi
52524
52525  # Turn on additional features based on other parts of configure
52526  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52527    JVM_FEATURES="$JVM_FEATURES dtrace"
52528  else
52529    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52530      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52531    fi
52532  fi
52533
52534  if test "x$STATIC_BUILD" = "xtrue"; then
52535    JVM_FEATURES="$JVM_FEATURES static-build"
52536  else
52537    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52538      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52539    fi
52540  fi
52541
52542  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52543    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52544      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52545    fi
52546  fi
52547
52548  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52549    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52550      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52551    fi
52552  fi
52553
52554  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52555  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52556      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52557      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52558    JVM_FEATURES_jvmci="jvmci"
52559  else
52560    JVM_FEATURES_jvmci=""
52561  fi
52562
52563  # All variants but minimal (and custom) get these features
52564  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52565
52566  # Enable features depending on variant.
52567  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52568  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52569  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52570  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52571  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52572  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52573  JVM_FEATURES_custom="$JVM_FEATURES"
52574
52575
52576
52577
52578
52579
52580
52581
52582
52583  # Used for verification of Makefiles by check-jvm-feature
52584
52585
52586  # We don't support --with-jvm-interpreter anymore, use zero instead.
52587
52588
52589# Check whether --with-jvm-interpreter was given.
52590if test "${with_jvm_interpreter+set}" = set; then :
52591  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52592$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52593fi
52594
52595
52596
52597
52598###############################################################################
52599#
52600# Check dependencies for external and internal libraries.
52601#
52602###############################################################################
52603
52604# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52605
52606  # When using cygwin or msys, we need a wrapper binary that renames
52607  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52608  # @files and rewrites these too! This wrapper binary is
52609  # called fixpath.
52610  FIXPATH=
52611  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52613$as_echo_n "checking if fixpath can be created... " >&6; }
52614    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52615    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52616    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52617    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52618      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52619      FIXPATH="$FIXPATH_BIN -c"
52620    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52621      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52622      # @ was chosen as separator to minimize risk of other tools messing around with it
52623      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52624          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52625      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52626      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52627    fi
52628    FIXPATH_SRC_W="$FIXPATH_SRC"
52629    FIXPATH_BIN_W="$FIXPATH_BIN"
52630
52631  unix_path="$FIXPATH_SRC_W"
52632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52633    windows_path=`$CYGPATH -m "$unix_path"`
52634    FIXPATH_SRC_W="$windows_path"
52635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52636    windows_path=`cmd //c echo $unix_path`
52637    FIXPATH_SRC_W="$windows_path"
52638  fi
52639
52640
52641  unix_path="$FIXPATH_BIN_W"
52642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52643    windows_path=`$CYGPATH -m "$unix_path"`
52644    FIXPATH_BIN_W="$windows_path"
52645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52646    windows_path=`cmd //c echo $unix_path`
52647    FIXPATH_BIN_W="$windows_path"
52648  fi
52649
52650    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52651    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52652    cd $FIXPATH_DIR
52653    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52654    cd $CURDIR
52655
52656    if test ! -x $FIXPATH_BIN; then
52657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52658$as_echo "no" >&6; }
52659      cat $FIXPATH_DIR/fixpath1.log
52660      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52661    fi
52662    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52663$as_echo "yes" >&6; }
52664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52665$as_echo_n "checking if fixpath.exe works... " >&6; }
52666    cd $FIXPATH_DIR
52667    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52668        > $FIXPATH_DIR/fixpath2.log 2>&1
52669    cd $CURDIR
52670    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52671      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52672$as_echo "no" >&6; }
52673      cat $FIXPATH_DIR/fixpath2.log
52674      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52675    fi
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52677$as_echo "yes" >&6; }
52678
52679    FIXPATH_DETACH_FLAG="--detach"
52680  fi
52681
52682
52683
52684
52685
52686
52687  # Check if X11 is needed
52688  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52689    # No X11 support on windows or macosx
52690    NEEDS_LIB_X11=false
52691  else
52692    if test "x$SUPPORT_HEADFUL" = xno; then
52693      # No X11 support if building headless-only
52694      NEEDS_LIB_X11=false
52695    else
52696      # All other instances need X11
52697      NEEDS_LIB_X11=true
52698    fi
52699  fi
52700
52701  # Check if cups is needed
52702  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52703    # Windows have a separate print system
52704    NEEDS_LIB_CUPS=false
52705  else
52706    NEEDS_LIB_CUPS=true
52707  fi
52708
52709  # Check if freetype is needed
52710  if test "x$OPENJDK" = "xtrue"; then
52711    NEEDS_LIB_FREETYPE=true
52712  else
52713    NEEDS_LIB_FREETYPE=false
52714  fi
52715
52716  # Check if alsa is needed
52717  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52718    NEEDS_LIB_ALSA=true
52719  else
52720    NEEDS_LIB_ALSA=false
52721  fi
52722
52723  # Check if ffi is needed
52724  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52725    NEEDS_LIB_FFI=true
52726  else
52727    NEEDS_LIB_FFI=false
52728  fi
52729
52730
52731  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52732  # dynamic build is configured on command line.
52733
52734# Check whether --with-stdc++lib was given.
52735if test "${with_stdc__lib+set}" = set; then :
52736  withval=$with_stdc__lib;
52737        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52738                && test "x$with_stdc__lib" != xdefault; then
52739          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52740        fi
52741
52742else
52743  with_stdc__lib=default
52744
52745fi
52746
52747
52748  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52749    # Test if -lstdc++ works.
52750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52751$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52752    ac_ext=cpp
52753ac_cpp='$CXXCPP $CPPFLAGS'
52754ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52755ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52756ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52757
52758    OLD_CXXFLAGS="$CXXFLAGS"
52759    CXXFLAGS="$CXXFLAGS -lstdc++"
52760    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52761/* end confdefs.h.  */
52762
52763int
52764main ()
52765{
52766return 0;
52767  ;
52768  return 0;
52769}
52770_ACEOF
52771if ac_fn_cxx_try_link "$LINENO"; then :
52772  has_dynamic_libstdcxx=yes
52773else
52774  has_dynamic_libstdcxx=no
52775fi
52776rm -f core conftest.err conftest.$ac_objext \
52777    conftest$ac_exeext conftest.$ac_ext
52778    CXXFLAGS="$OLD_CXXFLAGS"
52779    ac_ext=cpp
52780ac_cpp='$CXXCPP $CPPFLAGS'
52781ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52782ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52783ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52784
52785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52786$as_echo "$has_dynamic_libstdcxx" >&6; }
52787
52788    # Test if stdc++ can be linked statically.
52789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52790$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52791    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52792    ac_ext=cpp
52793ac_cpp='$CXXCPP $CPPFLAGS'
52794ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52795ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52796ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52797
52798    OLD_LIBS="$LIBS"
52799    OLD_CXX="$CXX"
52800    LIBS="$STATIC_STDCXX_FLAGS"
52801    CXX="$CC"
52802    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52803/* end confdefs.h.  */
52804
52805int
52806main ()
52807{
52808return 0;
52809  ;
52810  return 0;
52811}
52812_ACEOF
52813if ac_fn_cxx_try_link "$LINENO"; then :
52814  has_static_libstdcxx=yes
52815else
52816  has_static_libstdcxx=no
52817fi
52818rm -f core conftest.err conftest.$ac_objext \
52819    conftest$ac_exeext conftest.$ac_ext
52820    LIBS="$OLD_LIBS"
52821    CXX="$OLD_CXX"
52822    ac_ext=cpp
52823ac_cpp='$CXXCPP $CPPFLAGS'
52824ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52825ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52826ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52827
52828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52829$as_echo "$has_static_libstdcxx" >&6; }
52830
52831    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52832      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52833    fi
52834
52835    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52836      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52837    fi
52838
52839    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52840      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52841    fi
52842
52843    # If dynamic was requested, it's available since it would fail above otherwise.
52844    # If dynamic wasn't requested, go with static unless it isn't available.
52845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52846$as_echo_n "checking how to link with libstdc++... " >&6; }
52847    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52848      LIBCXX="$LIBCXX -lstdc++"
52849      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52850      JVM_LIBS="-lstdc++ $JVM_LIBS"
52851      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52852      # just use the same setting as for the TARGET toolchain.
52853      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52854      LDCXX="$CXX"
52855      STATIC_CXX_SETTING="STATIC_CXX=false"
52856      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52857$as_echo "dynamic" >&6; }
52858    else
52859      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52860      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52861      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52862      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52863      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52864      # just use the same setting as for the TARGET toolchain.
52865      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52866      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52867      LDCXX="$CC"
52868      STATIC_CXX_SETTING="STATIC_CXX=true"
52869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52870$as_echo "static" >&6; }
52871    fi
52872  fi
52873
52874
52875  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52876  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52877    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52878  fi
52879
52880  # TODO better (platform agnostic) test
52881  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52882    LIBCXX="-lstdc++"
52883  fi
52884
52885
52886  # Setup Windows runtime dlls
52887  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52888
52889
52890# Check whether --with-msvcr-dll was given.
52891if test "${with_msvcr_dll+set}" = set; then :
52892  withval=$with_msvcr_dll;
52893fi
52894
52895
52896  if test "x$with_msvcr_dll" != x; then
52897    # If given explicitely by user, do not probe. If not present, fail directly.
52898
52899  DLL_NAME="$MSVCR_NAME"
52900  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52901  METHOD="--with-msvcr-dll"
52902  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52903    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52904$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52905
52906    # Need to check if the found msvcr is correct architecture
52907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52908$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52909    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52910    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52911      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52912      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52913      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52914        CORRECT_MSVCR_ARCH="PE32 executable"
52915      else
52916        CORRECT_MSVCR_ARCH="PE32+ executable"
52917      fi
52918    else
52919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52920        CORRECT_MSVCR_ARCH=386
52921      else
52922        CORRECT_MSVCR_ARCH=x86-64
52923      fi
52924    fi
52925    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52927$as_echo "ok" >&6; }
52928      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52929
52930  # Only process if variable expands to non-empty
52931
52932  if test "x$MSVC_DLL" != x; then
52933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52934
52935  # Input might be given as Windows format, start by converting to
52936  # unix format.
52937  path="$MSVC_DLL"
52938  new_path=`$CYGPATH -u "$path"`
52939
52940  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52941  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52942  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52943  # "foo.exe" is OK but "foo" is an error.
52944  #
52945  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52946  # It is also a way to make sure we got the proper file name for the real test later on.
52947  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52948  if test "x$test_shortpath" = x; then
52949    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52950$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52951    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52952  fi
52953
52954  # Call helper function which possibly converts this using DOS-style short mode.
52955  # If so, the updated path is stored in $new_path.
52956
52957  input_path="$new_path"
52958  # Check if we need to convert this using DOS-style short mode. If the path
52959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52960  # take no chances and rewrite it.
52961  # Note: m4 eats our [], so we need to use [ and ] instead.
52962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52963  if test "x$has_forbidden_chars" != x; then
52964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52965    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52966    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52967    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52968      # Going to short mode and back again did indeed matter. Since short mode is
52969      # case insensitive, let's make it lowercase to improve readability.
52970      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52971      # Now convert it back to Unix-style (cygpath)
52972      input_path=`$CYGPATH -u "$shortmode_path"`
52973      new_path="$input_path"
52974    fi
52975  fi
52976
52977  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52978  if test "x$test_cygdrive_prefix" = x; then
52979    # As a simple fix, exclude /usr/bin since it's not a real path.
52980    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52981      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52982      # a path prefixed by /cygdrive for fixpath to work.
52983      new_path="$CYGWIN_ROOT_PATH$input_path"
52984    fi
52985  fi
52986
52987
52988  if test "x$path" != "x$new_path"; then
52989    MSVC_DLL="$new_path"
52990    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52991$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52992  fi
52993
52994    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52995
52996  path="$MSVC_DLL"
52997  has_colon=`$ECHO $path | $GREP ^.:`
52998  new_path="$path"
52999  if test "x$has_colon" = x; then
53000    # Not in mixed or Windows style, start by that.
53001    new_path=`cmd //c echo $path`
53002  fi
53003
53004
53005  input_path="$new_path"
53006  # Check if we need to convert this using DOS-style short mode. If the path
53007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53008  # take no chances and rewrite it.
53009  # Note: m4 eats our [], so we need to use [ and ] instead.
53010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53011  if test "x$has_forbidden_chars" != x; then
53012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53014  fi
53015
53016
53017  windows_path="$new_path"
53018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53019    unix_path=`$CYGPATH -u "$windows_path"`
53020    new_path="$unix_path"
53021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53023    new_path="$unix_path"
53024  fi
53025
53026  if test "x$path" != "x$new_path"; then
53027    MSVC_DLL="$new_path"
53028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53029$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53030  fi
53031
53032  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53033  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53034
53035    else
53036      # We're on a unix platform. Hooray! :)
53037      path="$MSVC_DLL"
53038      has_space=`$ECHO "$path" | $GREP " "`
53039      if test "x$has_space" != x; then
53040        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53041$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53042        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53043      fi
53044
53045      # Use eval to expand a potential ~
53046      eval path="$path"
53047      if test ! -f "$path" && test ! -d "$path"; then
53048        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53049      fi
53050
53051      if test -d "$path"; then
53052        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53053      else
53054        dir="`$DIRNAME "$path"`"
53055        base="`$BASENAME "$path"`"
53056        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53057      fi
53058    fi
53059  fi
53060
53061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53062$as_echo_n "checking for $DLL_NAME... " >&6; }
53063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53064$as_echo "$MSVC_DLL" >&6; }
53065    else
53066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53067$as_echo "incorrect, ignoring" >&6; }
53068      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53069$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53070    fi
53071  fi
53072
53073    if test "x$MSVC_DLL" = x; then
53074      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53075    fi
53076    MSVCR_DLL="$MSVC_DLL"
53077  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53078
53079  DLL_NAME="$MSVCR_NAME"
53080  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53081  METHOD="devkit"
53082  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53083    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53084$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53085
53086    # Need to check if the found msvcr is correct architecture
53087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53088$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53089    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53091      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53092      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53093      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53094        CORRECT_MSVCR_ARCH="PE32 executable"
53095      else
53096        CORRECT_MSVCR_ARCH="PE32+ executable"
53097      fi
53098    else
53099      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53100        CORRECT_MSVCR_ARCH=386
53101      else
53102        CORRECT_MSVCR_ARCH=x86-64
53103      fi
53104    fi
53105    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53107$as_echo "ok" >&6; }
53108      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53109
53110  # Only process if variable expands to non-empty
53111
53112  if test "x$MSVC_DLL" != x; then
53113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53114
53115  # Input might be given as Windows format, start by converting to
53116  # unix format.
53117  path="$MSVC_DLL"
53118  new_path=`$CYGPATH -u "$path"`
53119
53120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53123  # "foo.exe" is OK but "foo" is an error.
53124  #
53125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53126  # It is also a way to make sure we got the proper file name for the real test later on.
53127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53128  if test "x$test_shortpath" = x; then
53129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53130$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53131    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53132  fi
53133
53134  # Call helper function which possibly converts this using DOS-style short mode.
53135  # If so, the updated path is stored in $new_path.
53136
53137  input_path="$new_path"
53138  # Check if we need to convert this using DOS-style short mode. If the path
53139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53140  # take no chances and rewrite it.
53141  # Note: m4 eats our [], so we need to use [ and ] instead.
53142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53143  if test "x$has_forbidden_chars" != x; then
53144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53148      # Going to short mode and back again did indeed matter. Since short mode is
53149      # case insensitive, let's make it lowercase to improve readability.
53150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53151      # Now convert it back to Unix-style (cygpath)
53152      input_path=`$CYGPATH -u "$shortmode_path"`
53153      new_path="$input_path"
53154    fi
53155  fi
53156
53157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53158  if test "x$test_cygdrive_prefix" = x; then
53159    # As a simple fix, exclude /usr/bin since it's not a real path.
53160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53162      # a path prefixed by /cygdrive for fixpath to work.
53163      new_path="$CYGWIN_ROOT_PATH$input_path"
53164    fi
53165  fi
53166
53167
53168  if test "x$path" != "x$new_path"; then
53169    MSVC_DLL="$new_path"
53170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53171$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53172  fi
53173
53174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53175
53176  path="$MSVC_DLL"
53177  has_colon=`$ECHO $path | $GREP ^.:`
53178  new_path="$path"
53179  if test "x$has_colon" = x; then
53180    # Not in mixed or Windows style, start by that.
53181    new_path=`cmd //c echo $path`
53182  fi
53183
53184
53185  input_path="$new_path"
53186  # Check if we need to convert this using DOS-style short mode. If the path
53187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53188  # take no chances and rewrite it.
53189  # Note: m4 eats our [], so we need to use [ and ] instead.
53190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53191  if test "x$has_forbidden_chars" != x; then
53192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53194  fi
53195
53196
53197  windows_path="$new_path"
53198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53199    unix_path=`$CYGPATH -u "$windows_path"`
53200    new_path="$unix_path"
53201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53203    new_path="$unix_path"
53204  fi
53205
53206  if test "x$path" != "x$new_path"; then
53207    MSVC_DLL="$new_path"
53208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53209$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53210  fi
53211
53212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53214
53215    else
53216      # We're on a unix platform. Hooray! :)
53217      path="$MSVC_DLL"
53218      has_space=`$ECHO "$path" | $GREP " "`
53219      if test "x$has_space" != x; then
53220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53223      fi
53224
53225      # Use eval to expand a potential ~
53226      eval path="$path"
53227      if test ! -f "$path" && test ! -d "$path"; then
53228        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53229      fi
53230
53231      if test -d "$path"; then
53232        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53233      else
53234        dir="`$DIRNAME "$path"`"
53235        base="`$BASENAME "$path"`"
53236        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53237      fi
53238    fi
53239  fi
53240
53241      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53242$as_echo_n "checking for $DLL_NAME... " >&6; }
53243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53244$as_echo "$MSVC_DLL" >&6; }
53245    else
53246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53247$as_echo "incorrect, ignoring" >&6; }
53248      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53249$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53250    fi
53251  fi
53252
53253    if test "x$MSVC_DLL" = x; then
53254      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53255    fi
53256    MSVCR_DLL="$MSVC_DLL"
53257  else
53258
53259  DLL_NAME="${MSVCR_NAME}"
53260  MSVC_DLL=
53261
53262  if test "x$MSVC_DLL" = x; then
53263    # Probe: Using well-known location from Visual Studio 10.0
53264    if test "x$VCINSTALLDIR" != x; then
53265      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53266
53267  windows_path="$CYGWIN_VC_INSTALL_DIR"
53268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53269    unix_path=`$CYGPATH -u "$windows_path"`
53270    CYGWIN_VC_INSTALL_DIR="$unix_path"
53271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53273    CYGWIN_VC_INSTALL_DIR="$unix_path"
53274  fi
53275
53276      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53277        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53278      else
53279        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53280      fi
53281      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53282
53283  DLL_NAME="$DLL_NAME"
53284  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53285  METHOD="well-known location in VCINSTALLDIR"
53286  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53287    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53288$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53289
53290    # Need to check if the found msvcr is correct architecture
53291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53292$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53293    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53295      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53296      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53297      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53298        CORRECT_MSVCR_ARCH="PE32 executable"
53299      else
53300        CORRECT_MSVCR_ARCH="PE32+ executable"
53301      fi
53302    else
53303      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53304        CORRECT_MSVCR_ARCH=386
53305      else
53306        CORRECT_MSVCR_ARCH=x86-64
53307      fi
53308    fi
53309    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53311$as_echo "ok" >&6; }
53312      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53313
53314  # Only process if variable expands to non-empty
53315
53316  if test "x$MSVC_DLL" != x; then
53317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53318
53319  # Input might be given as Windows format, start by converting to
53320  # unix format.
53321  path="$MSVC_DLL"
53322  new_path=`$CYGPATH -u "$path"`
53323
53324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53327  # "foo.exe" is OK but "foo" is an error.
53328  #
53329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53330  # It is also a way to make sure we got the proper file name for the real test later on.
53331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53332  if test "x$test_shortpath" = x; then
53333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53334$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53335    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53336  fi
53337
53338  # Call helper function which possibly converts this using DOS-style short mode.
53339  # If so, the updated path is stored in $new_path.
53340
53341  input_path="$new_path"
53342  # Check if we need to convert this using DOS-style short mode. If the path
53343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53344  # take no chances and rewrite it.
53345  # Note: m4 eats our [], so we need to use [ and ] instead.
53346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53347  if test "x$has_forbidden_chars" != x; then
53348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53352      # Going to short mode and back again did indeed matter. Since short mode is
53353      # case insensitive, let's make it lowercase to improve readability.
53354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53355      # Now convert it back to Unix-style (cygpath)
53356      input_path=`$CYGPATH -u "$shortmode_path"`
53357      new_path="$input_path"
53358    fi
53359  fi
53360
53361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53362  if test "x$test_cygdrive_prefix" = x; then
53363    # As a simple fix, exclude /usr/bin since it's not a real path.
53364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53366      # a path prefixed by /cygdrive for fixpath to work.
53367      new_path="$CYGWIN_ROOT_PATH$input_path"
53368    fi
53369  fi
53370
53371
53372  if test "x$path" != "x$new_path"; then
53373    MSVC_DLL="$new_path"
53374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53375$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53376  fi
53377
53378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53379
53380  path="$MSVC_DLL"
53381  has_colon=`$ECHO $path | $GREP ^.:`
53382  new_path="$path"
53383  if test "x$has_colon" = x; then
53384    # Not in mixed or Windows style, start by that.
53385    new_path=`cmd //c echo $path`
53386  fi
53387
53388
53389  input_path="$new_path"
53390  # Check if we need to convert this using DOS-style short mode. If the path
53391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53392  # take no chances and rewrite it.
53393  # Note: m4 eats our [], so we need to use [ and ] instead.
53394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53395  if test "x$has_forbidden_chars" != x; then
53396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53398  fi
53399
53400
53401  windows_path="$new_path"
53402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53403    unix_path=`$CYGPATH -u "$windows_path"`
53404    new_path="$unix_path"
53405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53407    new_path="$unix_path"
53408  fi
53409
53410  if test "x$path" != "x$new_path"; then
53411    MSVC_DLL="$new_path"
53412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53413$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53414  fi
53415
53416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53418
53419    else
53420      # We're on a unix platform. Hooray! :)
53421      path="$MSVC_DLL"
53422      has_space=`$ECHO "$path" | $GREP " "`
53423      if test "x$has_space" != x; then
53424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53425$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53427      fi
53428
53429      # Use eval to expand a potential ~
53430      eval path="$path"
53431      if test ! -f "$path" && test ! -d "$path"; then
53432        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53433      fi
53434
53435      if test -d "$path"; then
53436        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53437      else
53438        dir="`$DIRNAME "$path"`"
53439        base="`$BASENAME "$path"`"
53440        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53441      fi
53442    fi
53443  fi
53444
53445      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53446$as_echo_n "checking for $DLL_NAME... " >&6; }
53447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53448$as_echo "$MSVC_DLL" >&6; }
53449    else
53450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53451$as_echo "incorrect, ignoring" >&6; }
53452      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53453$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53454    fi
53455  fi
53456
53457    fi
53458  fi
53459
53460  if test "x$MSVC_DLL" = x; then
53461    # Probe: Check in the Boot JDK directory.
53462    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53463
53464  DLL_NAME="$DLL_NAME"
53465  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53466  METHOD="well-known location in Boot JDK"
53467  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53468    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53469$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53470
53471    # Need to check if the found msvcr is correct architecture
53472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53473$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53474    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53475    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53476      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53477      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53478      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53479        CORRECT_MSVCR_ARCH="PE32 executable"
53480      else
53481        CORRECT_MSVCR_ARCH="PE32+ executable"
53482      fi
53483    else
53484      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53485        CORRECT_MSVCR_ARCH=386
53486      else
53487        CORRECT_MSVCR_ARCH=x86-64
53488      fi
53489    fi
53490    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53492$as_echo "ok" >&6; }
53493      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53494
53495  # Only process if variable expands to non-empty
53496
53497  if test "x$MSVC_DLL" != x; then
53498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53499
53500  # Input might be given as Windows format, start by converting to
53501  # unix format.
53502  path="$MSVC_DLL"
53503  new_path=`$CYGPATH -u "$path"`
53504
53505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53508  # "foo.exe" is OK but "foo" is an error.
53509  #
53510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53511  # It is also a way to make sure we got the proper file name for the real test later on.
53512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53513  if test "x$test_shortpath" = x; then
53514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53515$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53516    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53517  fi
53518
53519  # Call helper function which possibly converts this using DOS-style short mode.
53520  # If so, the updated path is stored in $new_path.
53521
53522  input_path="$new_path"
53523  # Check if we need to convert this using DOS-style short mode. If the path
53524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53525  # take no chances and rewrite it.
53526  # Note: m4 eats our [], so we need to use [ and ] instead.
53527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53528  if test "x$has_forbidden_chars" != x; then
53529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53533      # Going to short mode and back again did indeed matter. Since short mode is
53534      # case insensitive, let's make it lowercase to improve readability.
53535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53536      # Now convert it back to Unix-style (cygpath)
53537      input_path=`$CYGPATH -u "$shortmode_path"`
53538      new_path="$input_path"
53539    fi
53540  fi
53541
53542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53543  if test "x$test_cygdrive_prefix" = x; then
53544    # As a simple fix, exclude /usr/bin since it's not a real path.
53545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53547      # a path prefixed by /cygdrive for fixpath to work.
53548      new_path="$CYGWIN_ROOT_PATH$input_path"
53549    fi
53550  fi
53551
53552
53553  if test "x$path" != "x$new_path"; then
53554    MSVC_DLL="$new_path"
53555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53557  fi
53558
53559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53560
53561  path="$MSVC_DLL"
53562  has_colon=`$ECHO $path | $GREP ^.:`
53563  new_path="$path"
53564  if test "x$has_colon" = x; then
53565    # Not in mixed or Windows style, start by that.
53566    new_path=`cmd //c echo $path`
53567  fi
53568
53569
53570  input_path="$new_path"
53571  # Check if we need to convert this using DOS-style short mode. If the path
53572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53573  # take no chances and rewrite it.
53574  # Note: m4 eats our [], so we need to use [ and ] instead.
53575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53576  if test "x$has_forbidden_chars" != x; then
53577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53579  fi
53580
53581
53582  windows_path="$new_path"
53583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53584    unix_path=`$CYGPATH -u "$windows_path"`
53585    new_path="$unix_path"
53586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53588    new_path="$unix_path"
53589  fi
53590
53591  if test "x$path" != "x$new_path"; then
53592    MSVC_DLL="$new_path"
53593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53594$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53595  fi
53596
53597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53599
53600    else
53601      # We're on a unix platform. Hooray! :)
53602      path="$MSVC_DLL"
53603      has_space=`$ECHO "$path" | $GREP " "`
53604      if test "x$has_space" != x; then
53605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53606$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53608      fi
53609
53610      # Use eval to expand a potential ~
53611      eval path="$path"
53612      if test ! -f "$path" && test ! -d "$path"; then
53613        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53614      fi
53615
53616      if test -d "$path"; then
53617        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53618      else
53619        dir="`$DIRNAME "$path"`"
53620        base="`$BASENAME "$path"`"
53621        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53622      fi
53623    fi
53624  fi
53625
53626      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53627$as_echo_n "checking for $DLL_NAME... " >&6; }
53628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53629$as_echo "$MSVC_DLL" >&6; }
53630    else
53631      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53632$as_echo "incorrect, ignoring" >&6; }
53633      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53634$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53635    fi
53636  fi
53637
53638  fi
53639
53640  if test "x$MSVC_DLL" = x; then
53641    # Probe: Look in the Windows system32 directory
53642    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53643
53644  windows_path="$CYGWIN_SYSTEMROOT"
53645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53646    unix_path=`$CYGPATH -u "$windows_path"`
53647    CYGWIN_SYSTEMROOT="$unix_path"
53648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53650    CYGWIN_SYSTEMROOT="$unix_path"
53651  fi
53652
53653    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53654
53655  DLL_NAME="$DLL_NAME"
53656  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53657  METHOD="well-known location in SYSTEMROOT"
53658  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53660$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53661
53662    # Need to check if the found msvcr is correct architecture
53663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53664$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53665    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53667      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53668      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53669      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53670        CORRECT_MSVCR_ARCH="PE32 executable"
53671      else
53672        CORRECT_MSVCR_ARCH="PE32+ executable"
53673      fi
53674    else
53675      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53676        CORRECT_MSVCR_ARCH=386
53677      else
53678        CORRECT_MSVCR_ARCH=x86-64
53679      fi
53680    fi
53681    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53683$as_echo "ok" >&6; }
53684      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53685
53686  # Only process if variable expands to non-empty
53687
53688  if test "x$MSVC_DLL" != x; then
53689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53690
53691  # Input might be given as Windows format, start by converting to
53692  # unix format.
53693  path="$MSVC_DLL"
53694  new_path=`$CYGPATH -u "$path"`
53695
53696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53699  # "foo.exe" is OK but "foo" is an error.
53700  #
53701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53702  # It is also a way to make sure we got the proper file name for the real test later on.
53703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53704  if test "x$test_shortpath" = x; then
53705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53706$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53707    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53708  fi
53709
53710  # Call helper function which possibly converts this using DOS-style short mode.
53711  # If so, the updated path is stored in $new_path.
53712
53713  input_path="$new_path"
53714  # Check if we need to convert this using DOS-style short mode. If the path
53715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53716  # take no chances and rewrite it.
53717  # Note: m4 eats our [], so we need to use [ and ] instead.
53718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53719  if test "x$has_forbidden_chars" != x; then
53720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53724      # Going to short mode and back again did indeed matter. Since short mode is
53725      # case insensitive, let's make it lowercase to improve readability.
53726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53727      # Now convert it back to Unix-style (cygpath)
53728      input_path=`$CYGPATH -u "$shortmode_path"`
53729      new_path="$input_path"
53730    fi
53731  fi
53732
53733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53734  if test "x$test_cygdrive_prefix" = x; then
53735    # As a simple fix, exclude /usr/bin since it's not a real path.
53736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53738      # a path prefixed by /cygdrive for fixpath to work.
53739      new_path="$CYGWIN_ROOT_PATH$input_path"
53740    fi
53741  fi
53742
53743
53744  if test "x$path" != "x$new_path"; then
53745    MSVC_DLL="$new_path"
53746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53747$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53748  fi
53749
53750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53751
53752  path="$MSVC_DLL"
53753  has_colon=`$ECHO $path | $GREP ^.:`
53754  new_path="$path"
53755  if test "x$has_colon" = x; then
53756    # Not in mixed or Windows style, start by that.
53757    new_path=`cmd //c echo $path`
53758  fi
53759
53760
53761  input_path="$new_path"
53762  # Check if we need to convert this using DOS-style short mode. If the path
53763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53764  # take no chances and rewrite it.
53765  # Note: m4 eats our [], so we need to use [ and ] instead.
53766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53767  if test "x$has_forbidden_chars" != x; then
53768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53770  fi
53771
53772
53773  windows_path="$new_path"
53774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53775    unix_path=`$CYGPATH -u "$windows_path"`
53776    new_path="$unix_path"
53777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53779    new_path="$unix_path"
53780  fi
53781
53782  if test "x$path" != "x$new_path"; then
53783    MSVC_DLL="$new_path"
53784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53785$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53786  fi
53787
53788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53790
53791    else
53792      # We're on a unix platform. Hooray! :)
53793      path="$MSVC_DLL"
53794      has_space=`$ECHO "$path" | $GREP " "`
53795      if test "x$has_space" != x; then
53796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53797$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53799      fi
53800
53801      # Use eval to expand a potential ~
53802      eval path="$path"
53803      if test ! -f "$path" && test ! -d "$path"; then
53804        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53805      fi
53806
53807      if test -d "$path"; then
53808        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53809      else
53810        dir="`$DIRNAME "$path"`"
53811        base="`$BASENAME "$path"`"
53812        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53813      fi
53814    fi
53815  fi
53816
53817      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53818$as_echo_n "checking for $DLL_NAME... " >&6; }
53819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53820$as_echo "$MSVC_DLL" >&6; }
53821    else
53822      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53823$as_echo "incorrect, ignoring" >&6; }
53824      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53825$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53826    fi
53827  fi
53828
53829  fi
53830
53831  if test "x$MSVC_DLL" = x; then
53832    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53833    if test "x$VS100COMNTOOLS" != x; then
53834      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53835
53836  windows_path="$CYGWIN_VS_TOOLS_DIR"
53837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53838    unix_path=`$CYGPATH -u "$windows_path"`
53839    CYGWIN_VS_TOOLS_DIR="$unix_path"
53840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53842    CYGWIN_VS_TOOLS_DIR="$unix_path"
53843  fi
53844
53845      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53846        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53847	    | $GREP -i /x64/ | $HEAD --lines 1`
53848      else
53849        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53850	    | $GREP -i /x86/ | $HEAD --lines 1`
53851      fi
53852
53853  DLL_NAME="$DLL_NAME"
53854  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53855  METHOD="search of VS100COMNTOOLS"
53856  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53857    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53858$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53859
53860    # Need to check if the found msvcr is correct architecture
53861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53862$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53863    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53864    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53865      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53866      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53867      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53868        CORRECT_MSVCR_ARCH="PE32 executable"
53869      else
53870        CORRECT_MSVCR_ARCH="PE32+ executable"
53871      fi
53872    else
53873      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53874        CORRECT_MSVCR_ARCH=386
53875      else
53876        CORRECT_MSVCR_ARCH=x86-64
53877      fi
53878    fi
53879    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53881$as_echo "ok" >&6; }
53882      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53883
53884  # Only process if variable expands to non-empty
53885
53886  if test "x$MSVC_DLL" != x; then
53887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53888
53889  # Input might be given as Windows format, start by converting to
53890  # unix format.
53891  path="$MSVC_DLL"
53892  new_path=`$CYGPATH -u "$path"`
53893
53894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53897  # "foo.exe" is OK but "foo" is an error.
53898  #
53899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53900  # It is also a way to make sure we got the proper file name for the real test later on.
53901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53902  if test "x$test_shortpath" = x; then
53903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53904$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53905    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53906  fi
53907
53908  # Call helper function which possibly converts this using DOS-style short mode.
53909  # If so, the updated path is stored in $new_path.
53910
53911  input_path="$new_path"
53912  # Check if we need to convert this using DOS-style short mode. If the path
53913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53914  # take no chances and rewrite it.
53915  # Note: m4 eats our [], so we need to use [ and ] instead.
53916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53917  if test "x$has_forbidden_chars" != x; then
53918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53922      # Going to short mode and back again did indeed matter. Since short mode is
53923      # case insensitive, let's make it lowercase to improve readability.
53924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53925      # Now convert it back to Unix-style (cygpath)
53926      input_path=`$CYGPATH -u "$shortmode_path"`
53927      new_path="$input_path"
53928    fi
53929  fi
53930
53931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53932  if test "x$test_cygdrive_prefix" = x; then
53933    # As a simple fix, exclude /usr/bin since it's not a real path.
53934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53936      # a path prefixed by /cygdrive for fixpath to work.
53937      new_path="$CYGWIN_ROOT_PATH$input_path"
53938    fi
53939  fi
53940
53941
53942  if test "x$path" != "x$new_path"; then
53943    MSVC_DLL="$new_path"
53944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53945$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53946  fi
53947
53948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53949
53950  path="$MSVC_DLL"
53951  has_colon=`$ECHO $path | $GREP ^.:`
53952  new_path="$path"
53953  if test "x$has_colon" = x; then
53954    # Not in mixed or Windows style, start by that.
53955    new_path=`cmd //c echo $path`
53956  fi
53957
53958
53959  input_path="$new_path"
53960  # Check if we need to convert this using DOS-style short mode. If the path
53961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53962  # take no chances and rewrite it.
53963  # Note: m4 eats our [], so we need to use [ and ] instead.
53964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53965  if test "x$has_forbidden_chars" != x; then
53966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53968  fi
53969
53970
53971  windows_path="$new_path"
53972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53973    unix_path=`$CYGPATH -u "$windows_path"`
53974    new_path="$unix_path"
53975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53977    new_path="$unix_path"
53978  fi
53979
53980  if test "x$path" != "x$new_path"; then
53981    MSVC_DLL="$new_path"
53982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53983$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53984  fi
53985
53986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53988
53989    else
53990      # We're on a unix platform. Hooray! :)
53991      path="$MSVC_DLL"
53992      has_space=`$ECHO "$path" | $GREP " "`
53993      if test "x$has_space" != x; then
53994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53995$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53997      fi
53998
53999      # Use eval to expand a potential ~
54000      eval path="$path"
54001      if test ! -f "$path" && test ! -d "$path"; then
54002        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54003      fi
54004
54005      if test -d "$path"; then
54006        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54007      else
54008        dir="`$DIRNAME "$path"`"
54009        base="`$BASENAME "$path"`"
54010        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54011      fi
54012    fi
54013  fi
54014
54015      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54016$as_echo_n "checking for $DLL_NAME... " >&6; }
54017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54018$as_echo "$MSVC_DLL" >&6; }
54019    else
54020      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54021$as_echo "incorrect, ignoring" >&6; }
54022      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54023$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54024    fi
54025  fi
54026
54027    fi
54028  fi
54029
54030  if test "x$MSVC_DLL" = x; then
54031    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54032    # (This was the original behaviour; kept since it might turn something up)
54033    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54034      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54035        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54036	    | $GREP x64 | $HEAD --lines 1`
54037      else
54038        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54039	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54040        if test "x$POSSIBLE_MSVC_DLL" = x; then
54041          # We're grasping at straws now...
54042          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54043	      | $HEAD --lines 1`
54044        fi
54045      fi
54046
54047
54048  DLL_NAME="$DLL_NAME"
54049  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54050  METHOD="search of VCINSTALLDIR"
54051  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54052    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54053$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54054
54055    # Need to check if the found msvcr is correct architecture
54056    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54057$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54058    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54059    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54060      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54061      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54062      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54063        CORRECT_MSVCR_ARCH="PE32 executable"
54064      else
54065        CORRECT_MSVCR_ARCH="PE32+ executable"
54066      fi
54067    else
54068      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54069        CORRECT_MSVCR_ARCH=386
54070      else
54071        CORRECT_MSVCR_ARCH=x86-64
54072      fi
54073    fi
54074    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54076$as_echo "ok" >&6; }
54077      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54078
54079  # Only process if variable expands to non-empty
54080
54081  if test "x$MSVC_DLL" != x; then
54082    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54083
54084  # Input might be given as Windows format, start by converting to
54085  # unix format.
54086  path="$MSVC_DLL"
54087  new_path=`$CYGPATH -u "$path"`
54088
54089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54092  # "foo.exe" is OK but "foo" is an error.
54093  #
54094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54095  # It is also a way to make sure we got the proper file name for the real test later on.
54096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54097  if test "x$test_shortpath" = x; then
54098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54099$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54100    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54101  fi
54102
54103  # Call helper function which possibly converts this using DOS-style short mode.
54104  # If so, the updated path is stored in $new_path.
54105
54106  input_path="$new_path"
54107  # Check if we need to convert this using DOS-style short mode. If the path
54108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54109  # take no chances and rewrite it.
54110  # Note: m4 eats our [], so we need to use [ and ] instead.
54111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54112  if test "x$has_forbidden_chars" != x; then
54113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54117      # Going to short mode and back again did indeed matter. Since short mode is
54118      # case insensitive, let's make it lowercase to improve readability.
54119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54120      # Now convert it back to Unix-style (cygpath)
54121      input_path=`$CYGPATH -u "$shortmode_path"`
54122      new_path="$input_path"
54123    fi
54124  fi
54125
54126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54127  if test "x$test_cygdrive_prefix" = x; then
54128    # As a simple fix, exclude /usr/bin since it's not a real path.
54129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54131      # a path prefixed by /cygdrive for fixpath to work.
54132      new_path="$CYGWIN_ROOT_PATH$input_path"
54133    fi
54134  fi
54135
54136
54137  if test "x$path" != "x$new_path"; then
54138    MSVC_DLL="$new_path"
54139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54140$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54141  fi
54142
54143    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54144
54145  path="$MSVC_DLL"
54146  has_colon=`$ECHO $path | $GREP ^.:`
54147  new_path="$path"
54148  if test "x$has_colon" = x; then
54149    # Not in mixed or Windows style, start by that.
54150    new_path=`cmd //c echo $path`
54151  fi
54152
54153
54154  input_path="$new_path"
54155  # Check if we need to convert this using DOS-style short mode. If the path
54156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54157  # take no chances and rewrite it.
54158  # Note: m4 eats our [], so we need to use [ and ] instead.
54159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54160  if test "x$has_forbidden_chars" != x; then
54161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54163  fi
54164
54165
54166  windows_path="$new_path"
54167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54168    unix_path=`$CYGPATH -u "$windows_path"`
54169    new_path="$unix_path"
54170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54172    new_path="$unix_path"
54173  fi
54174
54175  if test "x$path" != "x$new_path"; then
54176    MSVC_DLL="$new_path"
54177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54178$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54179  fi
54180
54181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54183
54184    else
54185      # We're on a unix platform. Hooray! :)
54186      path="$MSVC_DLL"
54187      has_space=`$ECHO "$path" | $GREP " "`
54188      if test "x$has_space" != x; then
54189        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54190$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54191        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54192      fi
54193
54194      # Use eval to expand a potential ~
54195      eval path="$path"
54196      if test ! -f "$path" && test ! -d "$path"; then
54197        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54198      fi
54199
54200      if test -d "$path"; then
54201        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54202      else
54203        dir="`$DIRNAME "$path"`"
54204        base="`$BASENAME "$path"`"
54205        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54206      fi
54207    fi
54208  fi
54209
54210      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54211$as_echo_n "checking for $DLL_NAME... " >&6; }
54212      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54213$as_echo "$MSVC_DLL" >&6; }
54214    else
54215      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54216$as_echo "incorrect, ignoring" >&6; }
54217      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54218$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54219    fi
54220  fi
54221
54222    fi
54223  fi
54224
54225  if test "x$MSVC_DLL" = x; then
54226    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54227$as_echo_n "checking for $DLL_NAME... " >&6; }
54228    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54229$as_echo "no" >&6; }
54230    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54231  fi
54232
54233    MSVCR_DLL="$MSVC_DLL"
54234  fi
54235
54236
54237
54238# Check whether --with-msvcp-dll was given.
54239if test "${with_msvcp_dll+set}" = set; then :
54240  withval=$with_msvcp_dll;
54241fi
54242
54243
54244  if test "x$MSVCP_NAME" != "x"; then
54245    if test "x$with_msvcp_dll" != x; then
54246      # If given explicitely by user, do not probe. If not present, fail directly.
54247
54248  DLL_NAME="$MSVCP_NAME"
54249  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54250  METHOD="--with-msvcp-dll"
54251  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54252    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54253$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54254
54255    # Need to check if the found msvcr is correct architecture
54256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54257$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54258    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54259    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54260      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54261      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54262      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54263        CORRECT_MSVCR_ARCH="PE32 executable"
54264      else
54265        CORRECT_MSVCR_ARCH="PE32+ executable"
54266      fi
54267    else
54268      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54269        CORRECT_MSVCR_ARCH=386
54270      else
54271        CORRECT_MSVCR_ARCH=x86-64
54272      fi
54273    fi
54274    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54276$as_echo "ok" >&6; }
54277      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54278
54279  # Only process if variable expands to non-empty
54280
54281  if test "x$MSVC_DLL" != x; then
54282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54283
54284  # Input might be given as Windows format, start by converting to
54285  # unix format.
54286  path="$MSVC_DLL"
54287  new_path=`$CYGPATH -u "$path"`
54288
54289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54292  # "foo.exe" is OK but "foo" is an error.
54293  #
54294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54295  # It is also a way to make sure we got the proper file name for the real test later on.
54296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54297  if test "x$test_shortpath" = x; then
54298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54299$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54300    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54301  fi
54302
54303  # Call helper function which possibly converts this using DOS-style short mode.
54304  # If so, the updated path is stored in $new_path.
54305
54306  input_path="$new_path"
54307  # Check if we need to convert this using DOS-style short mode. If the path
54308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54309  # take no chances and rewrite it.
54310  # Note: m4 eats our [], so we need to use [ and ] instead.
54311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54312  if test "x$has_forbidden_chars" != x; then
54313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54317      # Going to short mode and back again did indeed matter. Since short mode is
54318      # case insensitive, let's make it lowercase to improve readability.
54319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54320      # Now convert it back to Unix-style (cygpath)
54321      input_path=`$CYGPATH -u "$shortmode_path"`
54322      new_path="$input_path"
54323    fi
54324  fi
54325
54326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54327  if test "x$test_cygdrive_prefix" = x; then
54328    # As a simple fix, exclude /usr/bin since it's not a real path.
54329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54331      # a path prefixed by /cygdrive for fixpath to work.
54332      new_path="$CYGWIN_ROOT_PATH$input_path"
54333    fi
54334  fi
54335
54336
54337  if test "x$path" != "x$new_path"; then
54338    MSVC_DLL="$new_path"
54339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54340$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54341  fi
54342
54343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54344
54345  path="$MSVC_DLL"
54346  has_colon=`$ECHO $path | $GREP ^.:`
54347  new_path="$path"
54348  if test "x$has_colon" = x; then
54349    # Not in mixed or Windows style, start by that.
54350    new_path=`cmd //c echo $path`
54351  fi
54352
54353
54354  input_path="$new_path"
54355  # Check if we need to convert this using DOS-style short mode. If the path
54356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54357  # take no chances and rewrite it.
54358  # Note: m4 eats our [], so we need to use [ and ] instead.
54359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54360  if test "x$has_forbidden_chars" != x; then
54361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54363  fi
54364
54365
54366  windows_path="$new_path"
54367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54368    unix_path=`$CYGPATH -u "$windows_path"`
54369    new_path="$unix_path"
54370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54372    new_path="$unix_path"
54373  fi
54374
54375  if test "x$path" != "x$new_path"; then
54376    MSVC_DLL="$new_path"
54377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54378$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54379  fi
54380
54381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54383
54384    else
54385      # We're on a unix platform. Hooray! :)
54386      path="$MSVC_DLL"
54387      has_space=`$ECHO "$path" | $GREP " "`
54388      if test "x$has_space" != x; then
54389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54390$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54392      fi
54393
54394      # Use eval to expand a potential ~
54395      eval path="$path"
54396      if test ! -f "$path" && test ! -d "$path"; then
54397        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54398      fi
54399
54400      if test -d "$path"; then
54401        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54402      else
54403        dir="`$DIRNAME "$path"`"
54404        base="`$BASENAME "$path"`"
54405        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54406      fi
54407    fi
54408  fi
54409
54410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54411$as_echo_n "checking for $DLL_NAME... " >&6; }
54412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54413$as_echo "$MSVC_DLL" >&6; }
54414    else
54415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54416$as_echo "incorrect, ignoring" >&6; }
54417      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54418$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54419    fi
54420  fi
54421
54422      if test "x$MSVC_DLL" = x; then
54423        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54424      fi
54425      MSVCP_DLL="$MSVC_DLL"
54426    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54427
54428  DLL_NAME="$MSVCP_NAME"
54429  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54430  METHOD="devkit"
54431  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54432    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54433$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54434
54435    # Need to check if the found msvcr is correct architecture
54436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54437$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54438    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54440      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54441      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54442      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54443        CORRECT_MSVCR_ARCH="PE32 executable"
54444      else
54445        CORRECT_MSVCR_ARCH="PE32+ executable"
54446      fi
54447    else
54448      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54449        CORRECT_MSVCR_ARCH=386
54450      else
54451        CORRECT_MSVCR_ARCH=x86-64
54452      fi
54453    fi
54454    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54456$as_echo "ok" >&6; }
54457      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54458
54459  # Only process if variable expands to non-empty
54460
54461  if test "x$MSVC_DLL" != x; then
54462    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54463
54464  # Input might be given as Windows format, start by converting to
54465  # unix format.
54466  path="$MSVC_DLL"
54467  new_path=`$CYGPATH -u "$path"`
54468
54469  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54470  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54471  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54472  # "foo.exe" is OK but "foo" is an error.
54473  #
54474  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54475  # It is also a way to make sure we got the proper file name for the real test later on.
54476  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54477  if test "x$test_shortpath" = x; then
54478    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54479$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54480    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54481  fi
54482
54483  # Call helper function which possibly converts this using DOS-style short mode.
54484  # If so, the updated path is stored in $new_path.
54485
54486  input_path="$new_path"
54487  # Check if we need to convert this using DOS-style short mode. If the path
54488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54489  # take no chances and rewrite it.
54490  # Note: m4 eats our [], so we need to use [ and ] instead.
54491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54492  if test "x$has_forbidden_chars" != x; then
54493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54497      # Going to short mode and back again did indeed matter. Since short mode is
54498      # case insensitive, let's make it lowercase to improve readability.
54499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54500      # Now convert it back to Unix-style (cygpath)
54501      input_path=`$CYGPATH -u "$shortmode_path"`
54502      new_path="$input_path"
54503    fi
54504  fi
54505
54506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54507  if test "x$test_cygdrive_prefix" = x; then
54508    # As a simple fix, exclude /usr/bin since it's not a real path.
54509    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54511      # a path prefixed by /cygdrive for fixpath to work.
54512      new_path="$CYGWIN_ROOT_PATH$input_path"
54513    fi
54514  fi
54515
54516
54517  if test "x$path" != "x$new_path"; then
54518    MSVC_DLL="$new_path"
54519    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54520$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54521  fi
54522
54523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54524
54525  path="$MSVC_DLL"
54526  has_colon=`$ECHO $path | $GREP ^.:`
54527  new_path="$path"
54528  if test "x$has_colon" = x; then
54529    # Not in mixed or Windows style, start by that.
54530    new_path=`cmd //c echo $path`
54531  fi
54532
54533
54534  input_path="$new_path"
54535  # Check if we need to convert this using DOS-style short mode. If the path
54536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54537  # take no chances and rewrite it.
54538  # Note: m4 eats our [], so we need to use [ and ] instead.
54539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54540  if test "x$has_forbidden_chars" != x; then
54541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54543  fi
54544
54545
54546  windows_path="$new_path"
54547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54548    unix_path=`$CYGPATH -u "$windows_path"`
54549    new_path="$unix_path"
54550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54552    new_path="$unix_path"
54553  fi
54554
54555  if test "x$path" != "x$new_path"; then
54556    MSVC_DLL="$new_path"
54557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54558$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54559  fi
54560
54561  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54562  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54563
54564    else
54565      # We're on a unix platform. Hooray! :)
54566      path="$MSVC_DLL"
54567      has_space=`$ECHO "$path" | $GREP " "`
54568      if test "x$has_space" != x; then
54569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54570$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54571        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54572      fi
54573
54574      # Use eval to expand a potential ~
54575      eval path="$path"
54576      if test ! -f "$path" && test ! -d "$path"; then
54577        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54578      fi
54579
54580      if test -d "$path"; then
54581        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54582      else
54583        dir="`$DIRNAME "$path"`"
54584        base="`$BASENAME "$path"`"
54585        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54586      fi
54587    fi
54588  fi
54589
54590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54591$as_echo_n "checking for $DLL_NAME... " >&6; }
54592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54593$as_echo "$MSVC_DLL" >&6; }
54594    else
54595      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54596$as_echo "incorrect, ignoring" >&6; }
54597      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54598$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54599    fi
54600  fi
54601
54602      if test "x$MSVC_DLL" = x; then
54603        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54604      fi
54605      MSVCP_DLL="$MSVC_DLL"
54606    else
54607
54608  DLL_NAME="${MSVCP_NAME}"
54609  MSVC_DLL=
54610
54611  if test "x$MSVC_DLL" = x; then
54612    # Probe: Using well-known location from Visual Studio 10.0
54613    if test "x$VCINSTALLDIR" != x; then
54614      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54615
54616  windows_path="$CYGWIN_VC_INSTALL_DIR"
54617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54618    unix_path=`$CYGPATH -u "$windows_path"`
54619    CYGWIN_VC_INSTALL_DIR="$unix_path"
54620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54622    CYGWIN_VC_INSTALL_DIR="$unix_path"
54623  fi
54624
54625      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54626        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54627      else
54628        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54629      fi
54630      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54631
54632  DLL_NAME="$DLL_NAME"
54633  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54634  METHOD="well-known location in VCINSTALLDIR"
54635  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54636    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54637$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54638
54639    # Need to check if the found msvcr is correct architecture
54640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54641$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54642    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54644      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54645      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54646      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54647        CORRECT_MSVCR_ARCH="PE32 executable"
54648      else
54649        CORRECT_MSVCR_ARCH="PE32+ executable"
54650      fi
54651    else
54652      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54653        CORRECT_MSVCR_ARCH=386
54654      else
54655        CORRECT_MSVCR_ARCH=x86-64
54656      fi
54657    fi
54658    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54660$as_echo "ok" >&6; }
54661      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54662
54663  # Only process if variable expands to non-empty
54664
54665  if test "x$MSVC_DLL" != x; then
54666    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54667
54668  # Input might be given as Windows format, start by converting to
54669  # unix format.
54670  path="$MSVC_DLL"
54671  new_path=`$CYGPATH -u "$path"`
54672
54673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54676  # "foo.exe" is OK but "foo" is an error.
54677  #
54678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54679  # It is also a way to make sure we got the proper file name for the real test later on.
54680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54681  if test "x$test_shortpath" = x; then
54682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54683$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54684    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54685  fi
54686
54687  # Call helper function which possibly converts this using DOS-style short mode.
54688  # If so, the updated path is stored in $new_path.
54689
54690  input_path="$new_path"
54691  # Check if we need to convert this using DOS-style short mode. If the path
54692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54693  # take no chances and rewrite it.
54694  # Note: m4 eats our [], so we need to use [ and ] instead.
54695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54696  if test "x$has_forbidden_chars" != x; then
54697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54701      # Going to short mode and back again did indeed matter. Since short mode is
54702      # case insensitive, let's make it lowercase to improve readability.
54703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54704      # Now convert it back to Unix-style (cygpath)
54705      input_path=`$CYGPATH -u "$shortmode_path"`
54706      new_path="$input_path"
54707    fi
54708  fi
54709
54710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54711  if test "x$test_cygdrive_prefix" = x; then
54712    # As a simple fix, exclude /usr/bin since it's not a real path.
54713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54715      # a path prefixed by /cygdrive for fixpath to work.
54716      new_path="$CYGWIN_ROOT_PATH$input_path"
54717    fi
54718  fi
54719
54720
54721  if test "x$path" != "x$new_path"; then
54722    MSVC_DLL="$new_path"
54723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54724$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54725  fi
54726
54727    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728
54729  path="$MSVC_DLL"
54730  has_colon=`$ECHO $path | $GREP ^.:`
54731  new_path="$path"
54732  if test "x$has_colon" = x; then
54733    # Not in mixed or Windows style, start by that.
54734    new_path=`cmd //c echo $path`
54735  fi
54736
54737
54738  input_path="$new_path"
54739  # Check if we need to convert this using DOS-style short mode. If the path
54740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54741  # take no chances and rewrite it.
54742  # Note: m4 eats our [], so we need to use [ and ] instead.
54743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54744  if test "x$has_forbidden_chars" != x; then
54745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54747  fi
54748
54749
54750  windows_path="$new_path"
54751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54752    unix_path=`$CYGPATH -u "$windows_path"`
54753    new_path="$unix_path"
54754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54756    new_path="$unix_path"
54757  fi
54758
54759  if test "x$path" != "x$new_path"; then
54760    MSVC_DLL="$new_path"
54761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54762$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54763  fi
54764
54765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54767
54768    else
54769      # We're on a unix platform. Hooray! :)
54770      path="$MSVC_DLL"
54771      has_space=`$ECHO "$path" | $GREP " "`
54772      if test "x$has_space" != x; then
54773        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54774$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54775        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54776      fi
54777
54778      # Use eval to expand a potential ~
54779      eval path="$path"
54780      if test ! -f "$path" && test ! -d "$path"; then
54781        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54782      fi
54783
54784      if test -d "$path"; then
54785        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54786      else
54787        dir="`$DIRNAME "$path"`"
54788        base="`$BASENAME "$path"`"
54789        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54790      fi
54791    fi
54792  fi
54793
54794      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54795$as_echo_n "checking for $DLL_NAME... " >&6; }
54796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54797$as_echo "$MSVC_DLL" >&6; }
54798    else
54799      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54800$as_echo "incorrect, ignoring" >&6; }
54801      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54802$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54803    fi
54804  fi
54805
54806    fi
54807  fi
54808
54809  if test "x$MSVC_DLL" = x; then
54810    # Probe: Check in the Boot JDK directory.
54811    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54812
54813  DLL_NAME="$DLL_NAME"
54814  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54815  METHOD="well-known location in Boot JDK"
54816  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54817    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54818$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54819
54820    # Need to check if the found msvcr is correct architecture
54821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54822$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54823    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54825      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54826      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54827      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54828        CORRECT_MSVCR_ARCH="PE32 executable"
54829      else
54830        CORRECT_MSVCR_ARCH="PE32+ executable"
54831      fi
54832    else
54833      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54834        CORRECT_MSVCR_ARCH=386
54835      else
54836        CORRECT_MSVCR_ARCH=x86-64
54837      fi
54838    fi
54839    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54841$as_echo "ok" >&6; }
54842      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54843
54844  # Only process if variable expands to non-empty
54845
54846  if test "x$MSVC_DLL" != x; then
54847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54848
54849  # Input might be given as Windows format, start by converting to
54850  # unix format.
54851  path="$MSVC_DLL"
54852  new_path=`$CYGPATH -u "$path"`
54853
54854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54857  # "foo.exe" is OK but "foo" is an error.
54858  #
54859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54860  # It is also a way to make sure we got the proper file name for the real test later on.
54861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54862  if test "x$test_shortpath" = x; then
54863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54864$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54865    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54866  fi
54867
54868  # Call helper function which possibly converts this using DOS-style short mode.
54869  # If so, the updated path is stored in $new_path.
54870
54871  input_path="$new_path"
54872  # Check if we need to convert this using DOS-style short mode. If the path
54873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54874  # take no chances and rewrite it.
54875  # Note: m4 eats our [], so we need to use [ and ] instead.
54876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54877  if test "x$has_forbidden_chars" != x; then
54878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54882      # Going to short mode and back again did indeed matter. Since short mode is
54883      # case insensitive, let's make it lowercase to improve readability.
54884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54885      # Now convert it back to Unix-style (cygpath)
54886      input_path=`$CYGPATH -u "$shortmode_path"`
54887      new_path="$input_path"
54888    fi
54889  fi
54890
54891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54892  if test "x$test_cygdrive_prefix" = x; then
54893    # As a simple fix, exclude /usr/bin since it's not a real path.
54894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54896      # a path prefixed by /cygdrive for fixpath to work.
54897      new_path="$CYGWIN_ROOT_PATH$input_path"
54898    fi
54899  fi
54900
54901
54902  if test "x$path" != "x$new_path"; then
54903    MSVC_DLL="$new_path"
54904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54905$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54906  fi
54907
54908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54909
54910  path="$MSVC_DLL"
54911  has_colon=`$ECHO $path | $GREP ^.:`
54912  new_path="$path"
54913  if test "x$has_colon" = x; then
54914    # Not in mixed or Windows style, start by that.
54915    new_path=`cmd //c echo $path`
54916  fi
54917
54918
54919  input_path="$new_path"
54920  # Check if we need to convert this using DOS-style short mode. If the path
54921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54922  # take no chances and rewrite it.
54923  # Note: m4 eats our [], so we need to use [ and ] instead.
54924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54925  if test "x$has_forbidden_chars" != x; then
54926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54928  fi
54929
54930
54931  windows_path="$new_path"
54932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54933    unix_path=`$CYGPATH -u "$windows_path"`
54934    new_path="$unix_path"
54935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54937    new_path="$unix_path"
54938  fi
54939
54940  if test "x$path" != "x$new_path"; then
54941    MSVC_DLL="$new_path"
54942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54943$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54944  fi
54945
54946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54948
54949    else
54950      # We're on a unix platform. Hooray! :)
54951      path="$MSVC_DLL"
54952      has_space=`$ECHO "$path" | $GREP " "`
54953      if test "x$has_space" != x; then
54954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54955$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54957      fi
54958
54959      # Use eval to expand a potential ~
54960      eval path="$path"
54961      if test ! -f "$path" && test ! -d "$path"; then
54962        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54963      fi
54964
54965      if test -d "$path"; then
54966        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54967      else
54968        dir="`$DIRNAME "$path"`"
54969        base="`$BASENAME "$path"`"
54970        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54971      fi
54972    fi
54973  fi
54974
54975      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54976$as_echo_n "checking for $DLL_NAME... " >&6; }
54977      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54978$as_echo "$MSVC_DLL" >&6; }
54979    else
54980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54981$as_echo "incorrect, ignoring" >&6; }
54982      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54983$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54984    fi
54985  fi
54986
54987  fi
54988
54989  if test "x$MSVC_DLL" = x; then
54990    # Probe: Look in the Windows system32 directory
54991    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54992
54993  windows_path="$CYGWIN_SYSTEMROOT"
54994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54995    unix_path=`$CYGPATH -u "$windows_path"`
54996    CYGWIN_SYSTEMROOT="$unix_path"
54997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54999    CYGWIN_SYSTEMROOT="$unix_path"
55000  fi
55001
55002    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55003
55004  DLL_NAME="$DLL_NAME"
55005  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55006  METHOD="well-known location in SYSTEMROOT"
55007  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55009$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55010
55011    # Need to check if the found msvcr is correct architecture
55012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55013$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55014    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55016      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55017      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55018      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55019        CORRECT_MSVCR_ARCH="PE32 executable"
55020      else
55021        CORRECT_MSVCR_ARCH="PE32+ executable"
55022      fi
55023    else
55024      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55025        CORRECT_MSVCR_ARCH=386
55026      else
55027        CORRECT_MSVCR_ARCH=x86-64
55028      fi
55029    fi
55030    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55032$as_echo "ok" >&6; }
55033      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55034
55035  # Only process if variable expands to non-empty
55036
55037  if test "x$MSVC_DLL" != x; then
55038    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55039
55040  # Input might be given as Windows format, start by converting to
55041  # unix format.
55042  path="$MSVC_DLL"
55043  new_path=`$CYGPATH -u "$path"`
55044
55045  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55046  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55047  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55048  # "foo.exe" is OK but "foo" is an error.
55049  #
55050  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55051  # It is also a way to make sure we got the proper file name for the real test later on.
55052  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55053  if test "x$test_shortpath" = x; then
55054    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55055$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55056    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55057  fi
55058
55059  # Call helper function which possibly converts this using DOS-style short mode.
55060  # If so, the updated path is stored in $new_path.
55061
55062  input_path="$new_path"
55063  # Check if we need to convert this using DOS-style short mode. If the path
55064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55065  # take no chances and rewrite it.
55066  # Note: m4 eats our [], so we need to use [ and ] instead.
55067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55068  if test "x$has_forbidden_chars" != x; then
55069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55073      # Going to short mode and back again did indeed matter. Since short mode is
55074      # case insensitive, let's make it lowercase to improve readability.
55075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55076      # Now convert it back to Unix-style (cygpath)
55077      input_path=`$CYGPATH -u "$shortmode_path"`
55078      new_path="$input_path"
55079    fi
55080  fi
55081
55082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55083  if test "x$test_cygdrive_prefix" = x; then
55084    # As a simple fix, exclude /usr/bin since it's not a real path.
55085    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55087      # a path prefixed by /cygdrive for fixpath to work.
55088      new_path="$CYGWIN_ROOT_PATH$input_path"
55089    fi
55090  fi
55091
55092
55093  if test "x$path" != "x$new_path"; then
55094    MSVC_DLL="$new_path"
55095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55096$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55097  fi
55098
55099    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55100
55101  path="$MSVC_DLL"
55102  has_colon=`$ECHO $path | $GREP ^.:`
55103  new_path="$path"
55104  if test "x$has_colon" = x; then
55105    # Not in mixed or Windows style, start by that.
55106    new_path=`cmd //c echo $path`
55107  fi
55108
55109
55110  input_path="$new_path"
55111  # Check if we need to convert this using DOS-style short mode. If the path
55112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55113  # take no chances and rewrite it.
55114  # Note: m4 eats our [], so we need to use [ and ] instead.
55115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55116  if test "x$has_forbidden_chars" != x; then
55117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55118    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55119  fi
55120
55121
55122  windows_path="$new_path"
55123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55124    unix_path=`$CYGPATH -u "$windows_path"`
55125    new_path="$unix_path"
55126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55128    new_path="$unix_path"
55129  fi
55130
55131  if test "x$path" != "x$new_path"; then
55132    MSVC_DLL="$new_path"
55133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55134$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55135  fi
55136
55137  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55138  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55139
55140    else
55141      # We're on a unix platform. Hooray! :)
55142      path="$MSVC_DLL"
55143      has_space=`$ECHO "$path" | $GREP " "`
55144      if test "x$has_space" != x; then
55145        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55146$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55147        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55148      fi
55149
55150      # Use eval to expand a potential ~
55151      eval path="$path"
55152      if test ! -f "$path" && test ! -d "$path"; then
55153        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55154      fi
55155
55156      if test -d "$path"; then
55157        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55158      else
55159        dir="`$DIRNAME "$path"`"
55160        base="`$BASENAME "$path"`"
55161        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55162      fi
55163    fi
55164  fi
55165
55166      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55167$as_echo_n "checking for $DLL_NAME... " >&6; }
55168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55169$as_echo "$MSVC_DLL" >&6; }
55170    else
55171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55172$as_echo "incorrect, ignoring" >&6; }
55173      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55174$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55175    fi
55176  fi
55177
55178  fi
55179
55180  if test "x$MSVC_DLL" = x; then
55181    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55182    if test "x$VS100COMNTOOLS" != x; then
55183      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55184
55185  windows_path="$CYGWIN_VS_TOOLS_DIR"
55186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55187    unix_path=`$CYGPATH -u "$windows_path"`
55188    CYGWIN_VS_TOOLS_DIR="$unix_path"
55189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55191    CYGWIN_VS_TOOLS_DIR="$unix_path"
55192  fi
55193
55194      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55195        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55196	    | $GREP -i /x64/ | $HEAD --lines 1`
55197      else
55198        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55199	    | $GREP -i /x86/ | $HEAD --lines 1`
55200      fi
55201
55202  DLL_NAME="$DLL_NAME"
55203  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55204  METHOD="search of VS100COMNTOOLS"
55205  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55206    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55207$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55208
55209    # Need to check if the found msvcr is correct architecture
55210    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55211$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55212    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55214      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55215      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55216      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55217        CORRECT_MSVCR_ARCH="PE32 executable"
55218      else
55219        CORRECT_MSVCR_ARCH="PE32+ executable"
55220      fi
55221    else
55222      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55223        CORRECT_MSVCR_ARCH=386
55224      else
55225        CORRECT_MSVCR_ARCH=x86-64
55226      fi
55227    fi
55228    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55230$as_echo "ok" >&6; }
55231      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55232
55233  # Only process if variable expands to non-empty
55234
55235  if test "x$MSVC_DLL" != x; then
55236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55237
55238  # Input might be given as Windows format, start by converting to
55239  # unix format.
55240  path="$MSVC_DLL"
55241  new_path=`$CYGPATH -u "$path"`
55242
55243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55246  # "foo.exe" is OK but "foo" is an error.
55247  #
55248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55249  # It is also a way to make sure we got the proper file name for the real test later on.
55250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55251  if test "x$test_shortpath" = x; then
55252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55254    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55255  fi
55256
55257  # Call helper function which possibly converts this using DOS-style short mode.
55258  # If so, the updated path is stored in $new_path.
55259
55260  input_path="$new_path"
55261  # Check if we need to convert this using DOS-style short mode. If the path
55262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55263  # take no chances and rewrite it.
55264  # Note: m4 eats our [], so we need to use [ and ] instead.
55265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55266  if test "x$has_forbidden_chars" != x; then
55267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55271      # Going to short mode and back again did indeed matter. Since short mode is
55272      # case insensitive, let's make it lowercase to improve readability.
55273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55274      # Now convert it back to Unix-style (cygpath)
55275      input_path=`$CYGPATH -u "$shortmode_path"`
55276      new_path="$input_path"
55277    fi
55278  fi
55279
55280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55281  if test "x$test_cygdrive_prefix" = x; then
55282    # As a simple fix, exclude /usr/bin since it's not a real path.
55283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55285      # a path prefixed by /cygdrive for fixpath to work.
55286      new_path="$CYGWIN_ROOT_PATH$input_path"
55287    fi
55288  fi
55289
55290
55291  if test "x$path" != "x$new_path"; then
55292    MSVC_DLL="$new_path"
55293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55295  fi
55296
55297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55298
55299  path="$MSVC_DLL"
55300  has_colon=`$ECHO $path | $GREP ^.:`
55301  new_path="$path"
55302  if test "x$has_colon" = x; then
55303    # Not in mixed or Windows style, start by that.
55304    new_path=`cmd //c echo $path`
55305  fi
55306
55307
55308  input_path="$new_path"
55309  # Check if we need to convert this using DOS-style short mode. If the path
55310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55311  # take no chances and rewrite it.
55312  # Note: m4 eats our [], so we need to use [ and ] instead.
55313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55314  if test "x$has_forbidden_chars" != x; then
55315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55317  fi
55318
55319
55320  windows_path="$new_path"
55321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55322    unix_path=`$CYGPATH -u "$windows_path"`
55323    new_path="$unix_path"
55324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55326    new_path="$unix_path"
55327  fi
55328
55329  if test "x$path" != "x$new_path"; then
55330    MSVC_DLL="$new_path"
55331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55332$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55333  fi
55334
55335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55337
55338    else
55339      # We're on a unix platform. Hooray! :)
55340      path="$MSVC_DLL"
55341      has_space=`$ECHO "$path" | $GREP " "`
55342      if test "x$has_space" != x; then
55343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55344$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55346      fi
55347
55348      # Use eval to expand a potential ~
55349      eval path="$path"
55350      if test ! -f "$path" && test ! -d "$path"; then
55351        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55352      fi
55353
55354      if test -d "$path"; then
55355        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55356      else
55357        dir="`$DIRNAME "$path"`"
55358        base="`$BASENAME "$path"`"
55359        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55360      fi
55361    fi
55362  fi
55363
55364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55365$as_echo_n "checking for $DLL_NAME... " >&6; }
55366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55367$as_echo "$MSVC_DLL" >&6; }
55368    else
55369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55370$as_echo "incorrect, ignoring" >&6; }
55371      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55372$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55373    fi
55374  fi
55375
55376    fi
55377  fi
55378
55379  if test "x$MSVC_DLL" = x; then
55380    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55381    # (This was the original behaviour; kept since it might turn something up)
55382    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55383      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55384        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55385	    | $GREP x64 | $HEAD --lines 1`
55386      else
55387        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55388	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55389        if test "x$POSSIBLE_MSVC_DLL" = x; then
55390          # We're grasping at straws now...
55391          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55392	      | $HEAD --lines 1`
55393        fi
55394      fi
55395
55396
55397  DLL_NAME="$DLL_NAME"
55398  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55399  METHOD="search of VCINSTALLDIR"
55400  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55401    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55402$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55403
55404    # Need to check if the found msvcr is correct architecture
55405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55406$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55407    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55409      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55410      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55411      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55412        CORRECT_MSVCR_ARCH="PE32 executable"
55413      else
55414        CORRECT_MSVCR_ARCH="PE32+ executable"
55415      fi
55416    else
55417      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55418        CORRECT_MSVCR_ARCH=386
55419      else
55420        CORRECT_MSVCR_ARCH=x86-64
55421      fi
55422    fi
55423    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55425$as_echo "ok" >&6; }
55426      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55427
55428  # Only process if variable expands to non-empty
55429
55430  if test "x$MSVC_DLL" != x; then
55431    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55432
55433  # Input might be given as Windows format, start by converting to
55434  # unix format.
55435  path="$MSVC_DLL"
55436  new_path=`$CYGPATH -u "$path"`
55437
55438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55441  # "foo.exe" is OK but "foo" is an error.
55442  #
55443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55444  # It is also a way to make sure we got the proper file name for the real test later on.
55445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55446  if test "x$test_shortpath" = x; then
55447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55448$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55449    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55450  fi
55451
55452  # Call helper function which possibly converts this using DOS-style short mode.
55453  # If so, the updated path is stored in $new_path.
55454
55455  input_path="$new_path"
55456  # Check if we need to convert this using DOS-style short mode. If the path
55457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55458  # take no chances and rewrite it.
55459  # Note: m4 eats our [], so we need to use [ and ] instead.
55460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55461  if test "x$has_forbidden_chars" != x; then
55462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55466      # Going to short mode and back again did indeed matter. Since short mode is
55467      # case insensitive, let's make it lowercase to improve readability.
55468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55469      # Now convert it back to Unix-style (cygpath)
55470      input_path=`$CYGPATH -u "$shortmode_path"`
55471      new_path="$input_path"
55472    fi
55473  fi
55474
55475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55476  if test "x$test_cygdrive_prefix" = x; then
55477    # As a simple fix, exclude /usr/bin since it's not a real path.
55478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55480      # a path prefixed by /cygdrive for fixpath to work.
55481      new_path="$CYGWIN_ROOT_PATH$input_path"
55482    fi
55483  fi
55484
55485
55486  if test "x$path" != "x$new_path"; then
55487    MSVC_DLL="$new_path"
55488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55489$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55490  fi
55491
55492    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55493
55494  path="$MSVC_DLL"
55495  has_colon=`$ECHO $path | $GREP ^.:`
55496  new_path="$path"
55497  if test "x$has_colon" = x; then
55498    # Not in mixed or Windows style, start by that.
55499    new_path=`cmd //c echo $path`
55500  fi
55501
55502
55503  input_path="$new_path"
55504  # Check if we need to convert this using DOS-style short mode. If the path
55505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55506  # take no chances and rewrite it.
55507  # Note: m4 eats our [], so we need to use [ and ] instead.
55508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55509  if test "x$has_forbidden_chars" != x; then
55510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55512  fi
55513
55514
55515  windows_path="$new_path"
55516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55517    unix_path=`$CYGPATH -u "$windows_path"`
55518    new_path="$unix_path"
55519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55521    new_path="$unix_path"
55522  fi
55523
55524  if test "x$path" != "x$new_path"; then
55525    MSVC_DLL="$new_path"
55526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55527$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55528  fi
55529
55530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55532
55533    else
55534      # We're on a unix platform. Hooray! :)
55535      path="$MSVC_DLL"
55536      has_space=`$ECHO "$path" | $GREP " "`
55537      if test "x$has_space" != x; then
55538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55539$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55540        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55541      fi
55542
55543      # Use eval to expand a potential ~
55544      eval path="$path"
55545      if test ! -f "$path" && test ! -d "$path"; then
55546        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55547      fi
55548
55549      if test -d "$path"; then
55550        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55551      else
55552        dir="`$DIRNAME "$path"`"
55553        base="`$BASENAME "$path"`"
55554        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55555      fi
55556    fi
55557  fi
55558
55559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55560$as_echo_n "checking for $DLL_NAME... " >&6; }
55561      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55562$as_echo "$MSVC_DLL" >&6; }
55563    else
55564      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55565$as_echo "incorrect, ignoring" >&6; }
55566      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55567$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55568    fi
55569  fi
55570
55571    fi
55572  fi
55573
55574  if test "x$MSVC_DLL" = x; then
55575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55576$as_echo_n "checking for $DLL_NAME... " >&6; }
55577    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55578$as_echo "no" >&6; }
55579    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55580  fi
55581
55582      MSVCP_DLL="$MSVC_DLL"
55583    fi
55584
55585  fi
55586
55587  fi
55588
55589
55590  if test "x$NEEDS_LIB_X11" = xfalse; then
55591    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55592      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55593$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55594    fi
55595    X_CFLAGS=
55596    X_LIBS=
55597  else
55598
55599    if test "x${with_x}" = xno; then
55600      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55601    fi
55602
55603    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55604      # The user has specified a X11 base directory. Use it for includes and
55605      # libraries, unless explicitely overridden.
55606      if test "x$x_includes" = xNONE; then
55607        x_includes="${with_x}/include"
55608      fi
55609      if test "x$x_libraries" = xNONE; then
55610        x_libraries="${with_x}/lib"
55611      fi
55612    else
55613      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55614      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55615      # --x-libraries for the sysroot, if that seems to be correct.
55616      if test "x$SYSROOT" != "x"; then
55617        if test "x$x_includes" = xNONE; then
55618          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55619            x_includes="$SYSROOT/usr/X11R6/include"
55620          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55621            x_includes="$SYSROOT/usr/include"
55622          fi
55623        fi
55624        if test "x$x_libraries" = xNONE; then
55625          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55626            x_libraries="$SYSROOT/usr/X11R6/lib"
55627          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55628            x_libraries="$SYSROOT/usr/lib64"
55629          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55630            x_libraries="$SYSROOT/usr/lib"
55631          fi
55632        fi
55633      fi
55634    fi
55635
55636    # Now let autoconf do it's magic
55637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55638$as_echo_n "checking for X... " >&6; }
55639
55640
55641# Check whether --with-x was given.
55642if test "${with_x+set}" = set; then :
55643  withval=$with_x;
55644fi
55645
55646# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55647if test "x$with_x" = xno; then
55648  # The user explicitly disabled X.
55649  have_x=disabled
55650else
55651  case $x_includes,$x_libraries in #(
55652    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55653    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55654  $as_echo_n "(cached) " >&6
55655else
55656  # One or both of the vars are not set, and there is no cached value.
55657ac_x_includes=no ac_x_libraries=no
55658rm -f -r conftest.dir
55659if mkdir conftest.dir; then
55660  cd conftest.dir
55661  cat >Imakefile <<'_ACEOF'
55662incroot:
55663	@echo incroot='${INCROOT}'
55664usrlibdir:
55665	@echo usrlibdir='${USRLIBDIR}'
55666libdir:
55667	@echo libdir='${LIBDIR}'
55668_ACEOF
55669  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55670    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55671    for ac_var in incroot usrlibdir libdir; do
55672      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55673    done
55674    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55675    for ac_extension in a so sl dylib la dll; do
55676      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55677	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55678	ac_im_usrlibdir=$ac_im_libdir; break
55679      fi
55680    done
55681    # Screen out bogus values from the imake configuration.  They are
55682    # bogus both because they are the default anyway, and because
55683    # using them would break gcc on systems where it needs fixed includes.
55684    case $ac_im_incroot in
55685	/usr/include) ac_x_includes= ;;
55686	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55687    esac
55688    case $ac_im_usrlibdir in
55689	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55690	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55691    esac
55692  fi
55693  cd ..
55694  rm -f -r conftest.dir
55695fi
55696
55697# Standard set of common directories for X headers.
55698# Check X11 before X11Rn because it is often a symlink to the current release.
55699ac_x_header_dirs='
55700/usr/X11/include
55701/usr/X11R7/include
55702/usr/X11R6/include
55703/usr/X11R5/include
55704/usr/X11R4/include
55705
55706/usr/include/X11
55707/usr/include/X11R7
55708/usr/include/X11R6
55709/usr/include/X11R5
55710/usr/include/X11R4
55711
55712/usr/local/X11/include
55713/usr/local/X11R7/include
55714/usr/local/X11R6/include
55715/usr/local/X11R5/include
55716/usr/local/X11R4/include
55717
55718/usr/local/include/X11
55719/usr/local/include/X11R7
55720/usr/local/include/X11R6
55721/usr/local/include/X11R5
55722/usr/local/include/X11R4
55723
55724/usr/X386/include
55725/usr/x386/include
55726/usr/XFree86/include/X11
55727
55728/usr/include
55729/usr/local/include
55730/usr/unsupported/include
55731/usr/athena/include
55732/usr/local/x11r5/include
55733/usr/lpp/Xamples/include
55734
55735/usr/openwin/include
55736/usr/openwin/share/include'
55737
55738if test "$ac_x_includes" = no; then
55739  # Guess where to find include files, by looking for Xlib.h.
55740  # First, try using that file with no special directory specified.
55741  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55742/* end confdefs.h.  */
55743#include <X11/Xlib.h>
55744_ACEOF
55745if ac_fn_cxx_try_cpp "$LINENO"; then :
55746  # We can compile using X headers with no special include directory.
55747ac_x_includes=
55748else
55749  for ac_dir in $ac_x_header_dirs; do
55750  if test -r "$ac_dir/X11/Xlib.h"; then
55751    ac_x_includes=$ac_dir
55752    break
55753  fi
55754done
55755fi
55756rm -f conftest.err conftest.i conftest.$ac_ext
55757fi # $ac_x_includes = no
55758
55759if test "$ac_x_libraries" = no; then
55760  # Check for the libraries.
55761  # See if we find them without any special options.
55762  # Don't add to $LIBS permanently.
55763  ac_save_LIBS=$LIBS
55764  LIBS="-lX11 $LIBS"
55765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55766/* end confdefs.h.  */
55767#include <X11/Xlib.h>
55768int
55769main ()
55770{
55771XrmInitialize ()
55772  ;
55773  return 0;
55774}
55775_ACEOF
55776if ac_fn_cxx_try_link "$LINENO"; then :
55777  LIBS=$ac_save_LIBS
55778# We can link X programs with no special library path.
55779ac_x_libraries=
55780else
55781  LIBS=$ac_save_LIBS
55782for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55783do
55784  # Don't even attempt the hair of trying to link an X program!
55785  for ac_extension in a so sl dylib la dll; do
55786    if test -r "$ac_dir/libX11.$ac_extension"; then
55787      ac_x_libraries=$ac_dir
55788      break 2
55789    fi
55790  done
55791done
55792fi
55793rm -f core conftest.err conftest.$ac_objext \
55794    conftest$ac_exeext conftest.$ac_ext
55795fi # $ac_x_libraries = no
55796
55797case $ac_x_includes,$ac_x_libraries in #(
55798  no,* | *,no | *\'*)
55799    # Didn't find X, or a directory has "'" in its name.
55800    ac_cv_have_x="have_x=no";; #(
55801  *)
55802    # Record where we found X for the cache.
55803    ac_cv_have_x="have_x=yes\
55804	ac_x_includes='$ac_x_includes'\
55805	ac_x_libraries='$ac_x_libraries'"
55806esac
55807fi
55808;; #(
55809    *) have_x=yes;;
55810  esac
55811  eval "$ac_cv_have_x"
55812fi # $with_x != no
55813
55814if test "$have_x" != yes; then
55815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55816$as_echo "$have_x" >&6; }
55817  no_x=yes
55818else
55819  # If each of the values was on the command line, it overrides each guess.
55820  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55821  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55822  # Update the cache value to reflect the command line values.
55823  ac_cv_have_x="have_x=yes\
55824	ac_x_includes='$x_includes'\
55825	ac_x_libraries='$x_libraries'"
55826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55827$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55828fi
55829
55830    if test "$no_x" = yes; then
55831  # Not all programs may use this symbol, but it does not hurt to define it.
55832
55833$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55834
55835  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55836else
55837  if test -n "$x_includes"; then
55838    X_CFLAGS="$X_CFLAGS -I$x_includes"
55839  fi
55840
55841  # It would also be nice to do this for all -L options, not just this one.
55842  if test -n "$x_libraries"; then
55843    X_LIBS="$X_LIBS -L$x_libraries"
55844    # For Solaris; some versions of Sun CC require a space after -R and
55845    # others require no space.  Words are not sufficient . . . .
55846    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55847$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55848    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55849    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55850    ac_cxx_werror_flag=yes
55851    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55852/* end confdefs.h.  */
55853
55854int
55855main ()
55856{
55857
55858  ;
55859  return 0;
55860}
55861_ACEOF
55862if ac_fn_cxx_try_link "$LINENO"; then :
55863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55864$as_echo "no" >&6; }
55865       X_LIBS="$X_LIBS -R$x_libraries"
55866else
55867  LIBS="$ac_xsave_LIBS -R $x_libraries"
55868       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55869/* end confdefs.h.  */
55870
55871int
55872main ()
55873{
55874
55875  ;
55876  return 0;
55877}
55878_ACEOF
55879if ac_fn_cxx_try_link "$LINENO"; then :
55880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55881$as_echo "yes" >&6; }
55882	  X_LIBS="$X_LIBS -R $x_libraries"
55883else
55884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55885$as_echo "neither works" >&6; }
55886fi
55887rm -f core conftest.err conftest.$ac_objext \
55888    conftest$ac_exeext conftest.$ac_ext
55889fi
55890rm -f core conftest.err conftest.$ac_objext \
55891    conftest$ac_exeext conftest.$ac_ext
55892    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55893    LIBS=$ac_xsave_LIBS
55894  fi
55895
55896  # Check for system-dependent libraries X programs must link with.
55897  # Do this before checking for the system-independent R6 libraries
55898  # (-lICE), since we may need -lsocket or whatever for X linking.
55899
55900  if test "$ISC" = yes; then
55901    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55902  else
55903    # Martyn Johnson says this is needed for Ultrix, if the X
55904    # libraries were built with DECnet support.  And Karl Berry says
55905    # the Alpha needs dnet_stub (dnet does not exist).
55906    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55907    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55908/* end confdefs.h.  */
55909
55910/* Override any GCC internal prototype to avoid an error.
55911   Use char because int might match the return type of a GCC
55912   builtin and then its argument prototype would still apply.  */
55913#ifdef __cplusplus
55914extern "C"
55915#endif
55916char XOpenDisplay ();
55917int
55918main ()
55919{
55920return XOpenDisplay ();
55921  ;
55922  return 0;
55923}
55924_ACEOF
55925if ac_fn_cxx_try_link "$LINENO"; then :
55926
55927else
55928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55929$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55930if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55931  $as_echo_n "(cached) " >&6
55932else
55933  ac_check_lib_save_LIBS=$LIBS
55934LIBS="-ldnet  $LIBS"
55935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55936/* end confdefs.h.  */
55937
55938/* Override any GCC internal prototype to avoid an error.
55939   Use char because int might match the return type of a GCC
55940   builtin and then its argument prototype would still apply.  */
55941#ifdef __cplusplus
55942extern "C"
55943#endif
55944char dnet_ntoa ();
55945int
55946main ()
55947{
55948return dnet_ntoa ();
55949  ;
55950  return 0;
55951}
55952_ACEOF
55953if ac_fn_cxx_try_link "$LINENO"; then :
55954  ac_cv_lib_dnet_dnet_ntoa=yes
55955else
55956  ac_cv_lib_dnet_dnet_ntoa=no
55957fi
55958rm -f core conftest.err conftest.$ac_objext \
55959    conftest$ac_exeext conftest.$ac_ext
55960LIBS=$ac_check_lib_save_LIBS
55961fi
55962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55963$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55964if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55965  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55966fi
55967
55968    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55969      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55970$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55971if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55972  $as_echo_n "(cached) " >&6
55973else
55974  ac_check_lib_save_LIBS=$LIBS
55975LIBS="-ldnet_stub  $LIBS"
55976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55977/* end confdefs.h.  */
55978
55979/* Override any GCC internal prototype to avoid an error.
55980   Use char because int might match the return type of a GCC
55981   builtin and then its argument prototype would still apply.  */
55982#ifdef __cplusplus
55983extern "C"
55984#endif
55985char dnet_ntoa ();
55986int
55987main ()
55988{
55989return dnet_ntoa ();
55990  ;
55991  return 0;
55992}
55993_ACEOF
55994if ac_fn_cxx_try_link "$LINENO"; then :
55995  ac_cv_lib_dnet_stub_dnet_ntoa=yes
55996else
55997  ac_cv_lib_dnet_stub_dnet_ntoa=no
55998fi
55999rm -f core conftest.err conftest.$ac_objext \
56000    conftest$ac_exeext conftest.$ac_ext
56001LIBS=$ac_check_lib_save_LIBS
56002fi
56003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56004$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56005if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56006  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56007fi
56008
56009    fi
56010fi
56011rm -f core conftest.err conftest.$ac_objext \
56012    conftest$ac_exeext conftest.$ac_ext
56013    LIBS="$ac_xsave_LIBS"
56014
56015    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56016    # to get the SysV transport functions.
56017    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56018    # needs -lnsl.
56019    # The nsl library prevents programs from opening the X display
56020    # on Irix 5.2, according to T.E. Dickey.
56021    # The functions gethostbyname, getservbyname, and inet_addr are
56022    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56023    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56024if test "x$ac_cv_func_gethostbyname" = xyes; then :
56025
56026fi
56027
56028    if test $ac_cv_func_gethostbyname = no; then
56029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56030$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56031if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56032  $as_echo_n "(cached) " >&6
56033else
56034  ac_check_lib_save_LIBS=$LIBS
56035LIBS="-lnsl  $LIBS"
56036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56037/* end confdefs.h.  */
56038
56039/* Override any GCC internal prototype to avoid an error.
56040   Use char because int might match the return type of a GCC
56041   builtin and then its argument prototype would still apply.  */
56042#ifdef __cplusplus
56043extern "C"
56044#endif
56045char gethostbyname ();
56046int
56047main ()
56048{
56049return gethostbyname ();
56050  ;
56051  return 0;
56052}
56053_ACEOF
56054if ac_fn_cxx_try_link "$LINENO"; then :
56055  ac_cv_lib_nsl_gethostbyname=yes
56056else
56057  ac_cv_lib_nsl_gethostbyname=no
56058fi
56059rm -f core conftest.err conftest.$ac_objext \
56060    conftest$ac_exeext conftest.$ac_ext
56061LIBS=$ac_check_lib_save_LIBS
56062fi
56063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56064$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56065if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56066  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56067fi
56068
56069      if test $ac_cv_lib_nsl_gethostbyname = no; then
56070	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56071$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56072if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56073  $as_echo_n "(cached) " >&6
56074else
56075  ac_check_lib_save_LIBS=$LIBS
56076LIBS="-lbsd  $LIBS"
56077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56078/* end confdefs.h.  */
56079
56080/* Override any GCC internal prototype to avoid an error.
56081   Use char because int might match the return type of a GCC
56082   builtin and then its argument prototype would still apply.  */
56083#ifdef __cplusplus
56084extern "C"
56085#endif
56086char gethostbyname ();
56087int
56088main ()
56089{
56090return gethostbyname ();
56091  ;
56092  return 0;
56093}
56094_ACEOF
56095if ac_fn_cxx_try_link "$LINENO"; then :
56096  ac_cv_lib_bsd_gethostbyname=yes
56097else
56098  ac_cv_lib_bsd_gethostbyname=no
56099fi
56100rm -f core conftest.err conftest.$ac_objext \
56101    conftest$ac_exeext conftest.$ac_ext
56102LIBS=$ac_check_lib_save_LIBS
56103fi
56104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56105$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56106if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56107  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56108fi
56109
56110      fi
56111    fi
56112
56113    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56114    # socket/setsockopt and other routines are undefined under SCO ODT
56115    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56116    # on later versions), says Simon Leinen: it contains gethostby*
56117    # variants that don't use the name server (or something).  -lsocket
56118    # must be given before -lnsl if both are needed.  We assume that
56119    # if connect needs -lnsl, so does gethostbyname.
56120    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56121if test "x$ac_cv_func_connect" = xyes; then :
56122
56123fi
56124
56125    if test $ac_cv_func_connect = no; then
56126      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56127$as_echo_n "checking for connect in -lsocket... " >&6; }
56128if ${ac_cv_lib_socket_connect+:} false; then :
56129  $as_echo_n "(cached) " >&6
56130else
56131  ac_check_lib_save_LIBS=$LIBS
56132LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56134/* end confdefs.h.  */
56135
56136/* Override any GCC internal prototype to avoid an error.
56137   Use char because int might match the return type of a GCC
56138   builtin and then its argument prototype would still apply.  */
56139#ifdef __cplusplus
56140extern "C"
56141#endif
56142char connect ();
56143int
56144main ()
56145{
56146return connect ();
56147  ;
56148  return 0;
56149}
56150_ACEOF
56151if ac_fn_cxx_try_link "$LINENO"; then :
56152  ac_cv_lib_socket_connect=yes
56153else
56154  ac_cv_lib_socket_connect=no
56155fi
56156rm -f core conftest.err conftest.$ac_objext \
56157    conftest$ac_exeext conftest.$ac_ext
56158LIBS=$ac_check_lib_save_LIBS
56159fi
56160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56161$as_echo "$ac_cv_lib_socket_connect" >&6; }
56162if test "x$ac_cv_lib_socket_connect" = xyes; then :
56163  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56164fi
56165
56166    fi
56167
56168    # Guillermo Gomez says -lposix is necessary on A/UX.
56169    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56170if test "x$ac_cv_func_remove" = xyes; then :
56171
56172fi
56173
56174    if test $ac_cv_func_remove = no; then
56175      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56176$as_echo_n "checking for remove in -lposix... " >&6; }
56177if ${ac_cv_lib_posix_remove+:} false; then :
56178  $as_echo_n "(cached) " >&6
56179else
56180  ac_check_lib_save_LIBS=$LIBS
56181LIBS="-lposix  $LIBS"
56182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56183/* end confdefs.h.  */
56184
56185/* Override any GCC internal prototype to avoid an error.
56186   Use char because int might match the return type of a GCC
56187   builtin and then its argument prototype would still apply.  */
56188#ifdef __cplusplus
56189extern "C"
56190#endif
56191char remove ();
56192int
56193main ()
56194{
56195return remove ();
56196  ;
56197  return 0;
56198}
56199_ACEOF
56200if ac_fn_cxx_try_link "$LINENO"; then :
56201  ac_cv_lib_posix_remove=yes
56202else
56203  ac_cv_lib_posix_remove=no
56204fi
56205rm -f core conftest.err conftest.$ac_objext \
56206    conftest$ac_exeext conftest.$ac_ext
56207LIBS=$ac_check_lib_save_LIBS
56208fi
56209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56210$as_echo "$ac_cv_lib_posix_remove" >&6; }
56211if test "x$ac_cv_lib_posix_remove" = xyes; then :
56212  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56213fi
56214
56215    fi
56216
56217    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56218    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56219if test "x$ac_cv_func_shmat" = xyes; then :
56220
56221fi
56222
56223    if test $ac_cv_func_shmat = no; then
56224      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56225$as_echo_n "checking for shmat in -lipc... " >&6; }
56226if ${ac_cv_lib_ipc_shmat+:} false; then :
56227  $as_echo_n "(cached) " >&6
56228else
56229  ac_check_lib_save_LIBS=$LIBS
56230LIBS="-lipc  $LIBS"
56231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56232/* end confdefs.h.  */
56233
56234/* Override any GCC internal prototype to avoid an error.
56235   Use char because int might match the return type of a GCC
56236   builtin and then its argument prototype would still apply.  */
56237#ifdef __cplusplus
56238extern "C"
56239#endif
56240char shmat ();
56241int
56242main ()
56243{
56244return shmat ();
56245  ;
56246  return 0;
56247}
56248_ACEOF
56249if ac_fn_cxx_try_link "$LINENO"; then :
56250  ac_cv_lib_ipc_shmat=yes
56251else
56252  ac_cv_lib_ipc_shmat=no
56253fi
56254rm -f core conftest.err conftest.$ac_objext \
56255    conftest$ac_exeext conftest.$ac_ext
56256LIBS=$ac_check_lib_save_LIBS
56257fi
56258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56259$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56260if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56261  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56262fi
56263
56264    fi
56265  fi
56266
56267  # Check for libraries that X11R6 Xt/Xaw programs need.
56268  ac_save_LDFLAGS=$LDFLAGS
56269  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56270  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56271  # check for ICE first), but we must link in the order -lSM -lICE or
56272  # we get undefined symbols.  So assume we have SM if we have ICE.
56273  # These have to be linked with before -lX11, unlike the other
56274  # libraries we check for below, so use a different variable.
56275  # John Interrante, Karl Berry
56276  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56277$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56278if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56279  $as_echo_n "(cached) " >&6
56280else
56281  ac_check_lib_save_LIBS=$LIBS
56282LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56284/* end confdefs.h.  */
56285
56286/* Override any GCC internal prototype to avoid an error.
56287   Use char because int might match the return type of a GCC
56288   builtin and then its argument prototype would still apply.  */
56289#ifdef __cplusplus
56290extern "C"
56291#endif
56292char IceConnectionNumber ();
56293int
56294main ()
56295{
56296return IceConnectionNumber ();
56297  ;
56298  return 0;
56299}
56300_ACEOF
56301if ac_fn_cxx_try_link "$LINENO"; then :
56302  ac_cv_lib_ICE_IceConnectionNumber=yes
56303else
56304  ac_cv_lib_ICE_IceConnectionNumber=no
56305fi
56306rm -f core conftest.err conftest.$ac_objext \
56307    conftest$ac_exeext conftest.$ac_ext
56308LIBS=$ac_check_lib_save_LIBS
56309fi
56310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56311$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56312if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56313  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56314fi
56315
56316  LDFLAGS=$ac_save_LDFLAGS
56317
56318fi
56319
56320
56321    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56322    # this doesn't make sense so we remove it.
56323    if test "x$COMPILE_TYPE" = xcross; then
56324      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56325    fi
56326
56327    if test "x$no_x" = xyes; then
56328
56329  # Print a helpful message on how to acquire the necessary build dependency.
56330  # x11 is the help tag: freetype, cups, alsa etc
56331  MISSING_DEPENDENCY=x11
56332
56333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56334    cygwin_help $MISSING_DEPENDENCY
56335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56336    msys_help $MISSING_DEPENDENCY
56337  else
56338    PKGHANDLER_COMMAND=
56339
56340    case $PKGHANDLER in
56341      apt-get)
56342        apt_help     $MISSING_DEPENDENCY ;;
56343      yum)
56344        yum_help     $MISSING_DEPENDENCY ;;
56345      port)
56346        port_help    $MISSING_DEPENDENCY ;;
56347      pkgutil)
56348        pkgutil_help $MISSING_DEPENDENCY ;;
56349      pkgadd)
56350        pkgadd_help  $MISSING_DEPENDENCY ;;
56351    esac
56352
56353    if test "x$PKGHANDLER_COMMAND" != x; then
56354      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56355    fi
56356  fi
56357
56358      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56359    fi
56360
56361    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56362      OPENWIN_HOME="/usr/openwin"
56363      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56364      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56365          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56366          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56367          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56368    fi
56369
56370    ac_ext=c
56371ac_cpp='$CPP $CPPFLAGS'
56372ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56373ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56374ac_compiler_gnu=$ac_cv_c_compiler_gnu
56375
56376    OLD_CFLAGS="$CFLAGS"
56377    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56378
56379    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56380    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56381do :
56382  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56383ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56384          # include <X11/Xlib.h>
56385          # include <X11/Xutil.h>
56386
56387
56388"
56389if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56390  cat >>confdefs.h <<_ACEOF
56391#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56392_ACEOF
56393 X11_HEADERS_OK=yes
56394else
56395  X11_HEADERS_OK=no; break
56396fi
56397
56398done
56399
56400
56401    if test "x$X11_HEADERS_OK" = xno; then
56402
56403  # Print a helpful message on how to acquire the necessary build dependency.
56404  # x11 is the help tag: freetype, cups, alsa etc
56405  MISSING_DEPENDENCY=x11
56406
56407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56408    cygwin_help $MISSING_DEPENDENCY
56409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56410    msys_help $MISSING_DEPENDENCY
56411  else
56412    PKGHANDLER_COMMAND=
56413
56414    case $PKGHANDLER in
56415      apt-get)
56416        apt_help     $MISSING_DEPENDENCY ;;
56417      yum)
56418        yum_help     $MISSING_DEPENDENCY ;;
56419      port)
56420        port_help    $MISSING_DEPENDENCY ;;
56421      pkgutil)
56422        pkgutil_help $MISSING_DEPENDENCY ;;
56423      pkgadd)
56424        pkgadd_help  $MISSING_DEPENDENCY ;;
56425    esac
56426
56427    if test "x$PKGHANDLER_COMMAND" != x; then
56428      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56429    fi
56430  fi
56431
56432      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56433    fi
56434
56435    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56436    # defined in libawt_xawt.
56437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56438$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56439    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56440/* end confdefs.h.  */
56441#include <X11/extensions/Xrender.h>
56442int
56443main ()
56444{
56445XLinearGradient x;
56446  ;
56447  return 0;
56448}
56449_ACEOF
56450if ac_fn_c_try_compile "$LINENO"; then :
56451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56452$as_echo "yes" >&6; }
56453else
56454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56455$as_echo "no" >&6; }
56456         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56457fi
56458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56459
56460    CFLAGS="$OLD_CFLAGS"
56461    ac_ext=cpp
56462ac_cpp='$CXXCPP $CPPFLAGS'
56463ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56464ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56465ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56466
56467  fi # NEEDS_LIB_X11
56468
56469
56470
56471
56472
56473
56474# Check whether --with-cups was given.
56475if test "${with_cups+set}" = set; then :
56476  withval=$with_cups;
56477fi
56478
56479
56480# Check whether --with-cups-include was given.
56481if test "${with_cups_include+set}" = set; then :
56482  withval=$with_cups_include;
56483fi
56484
56485
56486  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56487    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56488        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56489      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56490$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56491    fi
56492    CUPS_CFLAGS=
56493  else
56494    CUPS_FOUND=no
56495
56496    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56497      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56498    fi
56499
56500    if test "x${with_cups}" != x; then
56501      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56502$as_echo_n "checking for cups headers... " >&6; }
56503      if test -s "${with_cups}/include/cups/cups.h"; then
56504        CUPS_CFLAGS="-I${with_cups}/include"
56505        CUPS_FOUND=yes
56506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56507$as_echo "$CUPS_FOUND" >&6; }
56508      else
56509        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56510      fi
56511    fi
56512    if test "x${with_cups_include}" != x; then
56513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56514$as_echo_n "checking for cups headers... " >&6; }
56515      if test -s "${with_cups_include}/cups/cups.h"; then
56516        CUPS_CFLAGS="-I${with_cups_include}"
56517        CUPS_FOUND=yes
56518        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56519$as_echo "$CUPS_FOUND" >&6; }
56520      else
56521        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56522      fi
56523    fi
56524    if test "x$CUPS_FOUND" = xno; then
56525      # Are the cups headers installed in the default /usr/include location?
56526      for ac_header in cups/cups.h cups/ppd.h
56527do :
56528  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56529ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56530if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56531  cat >>confdefs.h <<_ACEOF
56532#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56533_ACEOF
56534
56535          CUPS_FOUND=yes
56536          CUPS_CFLAGS=
56537          DEFAULT_CUPS=yes
56538
56539fi
56540
56541done
56542
56543    fi
56544    if test "x$CUPS_FOUND" = xno; then
56545      # Getting nervous now? Lets poke around for standard Solaris third-party
56546      # package installation locations.
56547      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56548$as_echo_n "checking for cups headers... " >&6; }
56549      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56550        # An SFW package seems to be installed!
56551        CUPS_FOUND=yes
56552        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56553      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56554        # A CSW package seems to be installed!
56555        CUPS_FOUND=yes
56556        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56557      fi
56558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56559$as_echo "$CUPS_FOUND" >&6; }
56560    fi
56561    if test "x$CUPS_FOUND" = xno; then
56562
56563  # Print a helpful message on how to acquire the necessary build dependency.
56564  # cups is the help tag: freetype, cups, alsa etc
56565  MISSING_DEPENDENCY=cups
56566
56567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56568    cygwin_help $MISSING_DEPENDENCY
56569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56570    msys_help $MISSING_DEPENDENCY
56571  else
56572    PKGHANDLER_COMMAND=
56573
56574    case $PKGHANDLER in
56575      apt-get)
56576        apt_help     $MISSING_DEPENDENCY ;;
56577      yum)
56578        yum_help     $MISSING_DEPENDENCY ;;
56579      port)
56580        port_help    $MISSING_DEPENDENCY ;;
56581      pkgutil)
56582        pkgutil_help $MISSING_DEPENDENCY ;;
56583      pkgadd)
56584        pkgadd_help  $MISSING_DEPENDENCY ;;
56585    esac
56586
56587    if test "x$PKGHANDLER_COMMAND" != x; then
56588      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56589    fi
56590  fi
56591
56592      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56593    fi
56594  fi
56595
56596
56597
56598
56599
56600# Check whether --with-freetype was given.
56601if test "${with_freetype+set}" = set; then :
56602  withval=$with_freetype;
56603fi
56604
56605
56606# Check whether --with-freetype-include was given.
56607if test "${with_freetype_include+set}" = set; then :
56608  withval=$with_freetype_include;
56609fi
56610
56611
56612# Check whether --with-freetype-lib was given.
56613if test "${with_freetype_lib+set}" = set; then :
56614  withval=$with_freetype_lib;
56615fi
56616
56617
56618# Check whether --with-freetype-src was given.
56619if test "${with_freetype_src+set}" = set; then :
56620  withval=$with_freetype_src;
56621fi
56622
56623  # Check whether --enable-freetype-bundling was given.
56624if test "${enable_freetype_bundling+set}" = set; then :
56625  enableval=$enable_freetype_bundling;
56626fi
56627
56628
56629  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56630  FREETYPE_BASE_NAME=freetype
56631  FREETYPE_CFLAGS=
56632  FREETYPE_LIBS=
56633  FREETYPE_BUNDLE_LIB_PATH=
56634
56635  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56636    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56637        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56638        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56639        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56640      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56641$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56642    fi
56643    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56645$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56646    fi
56647  else
56648    # freetype is needed to build; go get it!
56649
56650    BUNDLE_FREETYPE="$enable_freetype_bundling"
56651
56652    if  test "x$with_freetype_src" != x; then
56653      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56654        # Try to build freetype if --with-freetype-src was given on Windows
56655
56656  FREETYPE_SRC_PATH="$with_freetype_src"
56657  BUILD_FREETYPE=yes
56658
56659  # Check if the freetype sources are acessible..
56660  if ! test -d $FREETYPE_SRC_PATH; then
56661    { $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
56662$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56663    BUILD_FREETYPE=no
56664  fi
56665  # ..and contain a vc2010 project file
56666  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56667  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56668    { $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
56669$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56670    BUILD_FREETYPE=no
56671  fi
56672  # Now check if configure found a version of 'msbuild.exe'
56673  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56674    { $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
56675$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;}
56676    BUILD_FREETYPE=no
56677  fi
56678
56679  # Ready to go..
56680  if test "x$BUILD_FREETYPE" = xyes; then
56681    # msbuild requires trailing slashes for output directories
56682    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56683    freetype_lib_path_unix="$freetype_lib_path"
56684    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56685
56686  unix_path="$vcxproj_path"
56687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56688    windows_path=`$CYGPATH -m "$unix_path"`
56689    vcxproj_path="$windows_path"
56690  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56691    windows_path=`cmd //c echo $unix_path`
56692    vcxproj_path="$windows_path"
56693  fi
56694
56695
56696  unix_path="$freetype_lib_path"
56697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56698    windows_path=`$CYGPATH -m "$unix_path"`
56699    freetype_lib_path="$windows_path"
56700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56701    windows_path=`cmd //c echo $unix_path`
56702    freetype_lib_path="$windows_path"
56703  fi
56704
56705
56706  unix_path="$freetype_obj_path"
56707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56708    windows_path=`$CYGPATH -m "$unix_path"`
56709    freetype_obj_path="$windows_path"
56710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56711    windows_path=`cmd //c echo $unix_path`
56712    freetype_obj_path="$windows_path"
56713  fi
56714
56715    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56716      freetype_platform=x64
56717    else
56718      freetype_platform=win32
56719    fi
56720
56721    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56722    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56723    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56724    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56725    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56726$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56727
56728    # First we try to build the freetype.dll
56729    $ECHO -e "@echo off\n"\
56730        "$MSBUILD $vcxproj_path "\
56731        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56732        "/p:Configuration=\"Release Multithreaded\" "\
56733        "/p:Platform=$freetype_platform "\
56734        "/p:ConfigurationType=DynamicLibrary "\
56735        "/p:TargetName=freetype "\
56736        "/p:OutDir=\"$freetype_lib_path\" "\
56737        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56738    cmd /c freetype.bat
56739
56740    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56741      # If that succeeds we also build freetype.lib
56742      $ECHO -e "@echo off\n"\
56743          "$MSBUILD $vcxproj_path "\
56744          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56745          "/p:Configuration=\"Release Multithreaded\" "\
56746          "/p:Platform=$freetype_platform "\
56747          "/p:ConfigurationType=StaticLibrary "\
56748          "/p:TargetName=freetype "\
56749          "/p:OutDir=\"$freetype_lib_path\" "\
56750          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56751      cmd /c freetype.bat
56752
56753      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56754        # Once we build both, lib and dll, set freetype lib and include path appropriately
56755        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56756        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56757        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56758$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56759      else
56760        BUILD_FREETYPE=no
56761      fi
56762    else
56763      BUILD_FREETYPE=no
56764    fi
56765  fi
56766
56767        if test "x$BUILD_FREETYPE" = xyes; then
56768          # Okay, we built it. Check that it works.
56769
56770  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56771  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56772  METHOD="--with-freetype-src"
56773
56774  # Let's start with an optimistic view of the world :-)
56775  FOUND_FREETYPE=yes
56776
56777  # First look for the canonical freetype main include file ft2build.h.
56778  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56779    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56780    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56781    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56782      # Fail.
56783      FOUND_FREETYPE=no
56784    fi
56785  fi
56786
56787  if test "x$FOUND_FREETYPE" = xyes; then
56788    # Include file found, let's continue the sanity check.
56789    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56790$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56791
56792    # Reset to default value
56793    FREETYPE_BASE_NAME=freetype
56794    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56795    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56796      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56797          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56798        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56799        # for the .6 version explicitly.
56800        FREETYPE_BASE_NAME=freetype.6
56801        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56802        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56803$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56804      else
56805        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56806$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56807        FOUND_FREETYPE=no
56808      fi
56809    else
56810      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56811        # On Windows, we will need both .lib and .dll file.
56812        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56813          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56814$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56815          FOUND_FREETYPE=no
56816        fi
56817      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56818          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56819        # Found lib in isa dir, use that instead.
56820        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56821        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56822$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56823      fi
56824    fi
56825  fi
56826
56827  if test "x$FOUND_FREETYPE" = xyes; then
56828
56829  # Only process if variable expands to non-empty
56830
56831  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56832    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56833
56834  # Input might be given as Windows format, start by converting to
56835  # unix format.
56836  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56837  new_path=`$CYGPATH -u "$path"`
56838
56839  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56840  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56841  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56842  # "foo.exe" is OK but "foo" is an error.
56843  #
56844  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56845  # It is also a way to make sure we got the proper file name for the real test later on.
56846  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56847  if test "x$test_shortpath" = x; then
56848    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56849$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56850    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56851  fi
56852
56853  # Call helper function which possibly converts this using DOS-style short mode.
56854  # If so, the updated path is stored in $new_path.
56855
56856  input_path="$new_path"
56857  # Check if we need to convert this using DOS-style short mode. If the path
56858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56859  # take no chances and rewrite it.
56860  # Note: m4 eats our [], so we need to use [ and ] instead.
56861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56862  if test "x$has_forbidden_chars" != x; then
56863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56867      # Going to short mode and back again did indeed matter. Since short mode is
56868      # case insensitive, let's make it lowercase to improve readability.
56869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56870      # Now convert it back to Unix-style (cygpath)
56871      input_path=`$CYGPATH -u "$shortmode_path"`
56872      new_path="$input_path"
56873    fi
56874  fi
56875
56876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56877  if test "x$test_cygdrive_prefix" = x; then
56878    # As a simple fix, exclude /usr/bin since it's not a real path.
56879    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56881      # a path prefixed by /cygdrive for fixpath to work.
56882      new_path="$CYGWIN_ROOT_PATH$input_path"
56883    fi
56884  fi
56885
56886
56887  if test "x$path" != "x$new_path"; then
56888    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56890$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56891  fi
56892
56893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56894
56895  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56896  has_colon=`$ECHO $path | $GREP ^.:`
56897  new_path="$path"
56898  if test "x$has_colon" = x; then
56899    # Not in mixed or Windows style, start by that.
56900    new_path=`cmd //c echo $path`
56901  fi
56902
56903
56904  input_path="$new_path"
56905  # Check if we need to convert this using DOS-style short mode. If the path
56906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56907  # take no chances and rewrite it.
56908  # Note: m4 eats our [], so we need to use [ and ] instead.
56909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56910  if test "x$has_forbidden_chars" != x; then
56911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56913  fi
56914
56915
56916  windows_path="$new_path"
56917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56918    unix_path=`$CYGPATH -u "$windows_path"`
56919    new_path="$unix_path"
56920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56922    new_path="$unix_path"
56923  fi
56924
56925  if test "x$path" != "x$new_path"; then
56926    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56927    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56928$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56929  fi
56930
56931  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56932  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56933
56934    else
56935      # We're on a unix platform. Hooray! :)
56936      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56937      has_space=`$ECHO "$path" | $GREP " "`
56938      if test "x$has_space" != x; then
56939        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56941        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56942      fi
56943
56944      # Use eval to expand a potential ~
56945      eval path="$path"
56946      if test ! -f "$path" && test ! -d "$path"; then
56947        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56948      fi
56949
56950      if test -d "$path"; then
56951        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56952      else
56953        dir="`$DIRNAME "$path"`"
56954        base="`$BASENAME "$path"`"
56955        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56956      fi
56957    fi
56958  fi
56959
56960
56961  # Only process if variable expands to non-empty
56962
56963  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56964    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56965
56966  # Input might be given as Windows format, start by converting to
56967  # unix format.
56968  path="$POTENTIAL_FREETYPE_LIB_PATH"
56969  new_path=`$CYGPATH -u "$path"`
56970
56971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56974  # "foo.exe" is OK but "foo" is an error.
56975  #
56976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56977  # It is also a way to make sure we got the proper file name for the real test later on.
56978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56979  if test "x$test_shortpath" = x; then
56980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56982    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56983  fi
56984
56985  # Call helper function which possibly converts this using DOS-style short mode.
56986  # If so, the updated path is stored in $new_path.
56987
56988  input_path="$new_path"
56989  # Check if we need to convert this using DOS-style short mode. If the path
56990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56991  # take no chances and rewrite it.
56992  # Note: m4 eats our [], so we need to use [ and ] instead.
56993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56994  if test "x$has_forbidden_chars" != x; then
56995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56999      # Going to short mode and back again did indeed matter. Since short mode is
57000      # case insensitive, let's make it lowercase to improve readability.
57001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57002      # Now convert it back to Unix-style (cygpath)
57003      input_path=`$CYGPATH -u "$shortmode_path"`
57004      new_path="$input_path"
57005    fi
57006  fi
57007
57008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57009  if test "x$test_cygdrive_prefix" = x; then
57010    # As a simple fix, exclude /usr/bin since it's not a real path.
57011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57013      # a path prefixed by /cygdrive for fixpath to work.
57014      new_path="$CYGWIN_ROOT_PATH$input_path"
57015    fi
57016  fi
57017
57018
57019  if test "x$path" != "x$new_path"; then
57020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57023  fi
57024
57025    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57026
57027  path="$POTENTIAL_FREETYPE_LIB_PATH"
57028  has_colon=`$ECHO $path | $GREP ^.:`
57029  new_path="$path"
57030  if test "x$has_colon" = x; then
57031    # Not in mixed or Windows style, start by that.
57032    new_path=`cmd //c echo $path`
57033  fi
57034
57035
57036  input_path="$new_path"
57037  # Check if we need to convert this using DOS-style short mode. If the path
57038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57039  # take no chances and rewrite it.
57040  # Note: m4 eats our [], so we need to use [ and ] instead.
57041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57042  if test "x$has_forbidden_chars" != x; then
57043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57045  fi
57046
57047
57048  windows_path="$new_path"
57049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57050    unix_path=`$CYGPATH -u "$windows_path"`
57051    new_path="$unix_path"
57052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57054    new_path="$unix_path"
57055  fi
57056
57057  if test "x$path" != "x$new_path"; then
57058    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57060$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57061  fi
57062
57063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57065
57066    else
57067      # We're on a unix platform. Hooray! :)
57068      path="$POTENTIAL_FREETYPE_LIB_PATH"
57069      has_space=`$ECHO "$path" | $GREP " "`
57070      if test "x$has_space" != x; then
57071        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57072$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57073        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57074      fi
57075
57076      # Use eval to expand a potential ~
57077      eval path="$path"
57078      if test ! -f "$path" && test ! -d "$path"; then
57079        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57080      fi
57081
57082      if test -d "$path"; then
57083        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57084      else
57085        dir="`$DIRNAME "$path"`"
57086        base="`$BASENAME "$path"`"
57087        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57088      fi
57089    fi
57090  fi
57091
57092
57093    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57095$as_echo_n "checking for freetype includes... " >&6; }
57096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57097$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57098    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57099    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57100$as_echo_n "checking for freetype libraries... " >&6; }
57101    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57102$as_echo "$FREETYPE_LIB_PATH" >&6; }
57103  fi
57104
57105          if test "x$FOUND_FREETYPE" != xyes; then
57106            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57107          fi
57108        else
57109          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57110$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57111          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57112        fi
57113      else
57114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57115$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57116      fi
57117    fi
57118
57119    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57120      # User has specified settings
57121
57122      if test "x$BUNDLE_FREETYPE" = x; then
57123        # If not specified, default is to bundle freetype
57124        BUNDLE_FREETYPE=yes
57125      fi
57126
57127      if test "x$with_freetype" != x; then
57128        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57129        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57130      fi
57131
57132      # Allow --with-freetype-lib and --with-freetype-include to override
57133      if test "x$with_freetype_include" != x; then
57134        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57135      fi
57136      if test "x$with_freetype_lib" != x; then
57137        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57138      fi
57139
57140      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57141        # Okay, we got it. Check that it works.
57142
57143  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57144  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57145  METHOD="--with-freetype"
57146
57147  # Let's start with an optimistic view of the world :-)
57148  FOUND_FREETYPE=yes
57149
57150  # First look for the canonical freetype main include file ft2build.h.
57151  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57152    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57153    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57154    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57155      # Fail.
57156      FOUND_FREETYPE=no
57157    fi
57158  fi
57159
57160  if test "x$FOUND_FREETYPE" = xyes; then
57161    # Include file found, let's continue the sanity check.
57162    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57163$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57164
57165    # Reset to default value
57166    FREETYPE_BASE_NAME=freetype
57167    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57168    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57169      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57170          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57171        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57172        # for the .6 version explicitly.
57173        FREETYPE_BASE_NAME=freetype.6
57174        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57175        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57176$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57177      else
57178        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57179$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57180        FOUND_FREETYPE=no
57181      fi
57182    else
57183      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57184        # On Windows, we will need both .lib and .dll file.
57185        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57186          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57187$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57188          FOUND_FREETYPE=no
57189        fi
57190      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57191          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57192        # Found lib in isa dir, use that instead.
57193        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57194        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57195$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57196      fi
57197    fi
57198  fi
57199
57200  if test "x$FOUND_FREETYPE" = xyes; then
57201
57202  # Only process if variable expands to non-empty
57203
57204  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57205    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57206
57207  # Input might be given as Windows format, start by converting to
57208  # unix format.
57209  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57210  new_path=`$CYGPATH -u "$path"`
57211
57212  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57213  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57214  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57215  # "foo.exe" is OK but "foo" is an error.
57216  #
57217  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57218  # It is also a way to make sure we got the proper file name for the real test later on.
57219  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57220  if test "x$test_shortpath" = x; then
57221    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57222$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57223    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57224  fi
57225
57226  # Call helper function which possibly converts this using DOS-style short mode.
57227  # If so, the updated path is stored in $new_path.
57228
57229  input_path="$new_path"
57230  # Check if we need to convert this using DOS-style short mode. If the path
57231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57232  # take no chances and rewrite it.
57233  # Note: m4 eats our [], so we need to use [ and ] instead.
57234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57235  if test "x$has_forbidden_chars" != x; then
57236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57237    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57238    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57239    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57240      # Going to short mode and back again did indeed matter. Since short mode is
57241      # case insensitive, let's make it lowercase to improve readability.
57242      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57243      # Now convert it back to Unix-style (cygpath)
57244      input_path=`$CYGPATH -u "$shortmode_path"`
57245      new_path="$input_path"
57246    fi
57247  fi
57248
57249  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57250  if test "x$test_cygdrive_prefix" = x; then
57251    # As a simple fix, exclude /usr/bin since it's not a real path.
57252    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57253      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57254      # a path prefixed by /cygdrive for fixpath to work.
57255      new_path="$CYGWIN_ROOT_PATH$input_path"
57256    fi
57257  fi
57258
57259
57260  if test "x$path" != "x$new_path"; then
57261    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57263$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57264  fi
57265
57266    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57267
57268  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57269  has_colon=`$ECHO $path | $GREP ^.:`
57270  new_path="$path"
57271  if test "x$has_colon" = x; then
57272    # Not in mixed or Windows style, start by that.
57273    new_path=`cmd //c echo $path`
57274  fi
57275
57276
57277  input_path="$new_path"
57278  # Check if we need to convert this using DOS-style short mode. If the path
57279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57280  # take no chances and rewrite it.
57281  # Note: m4 eats our [], so we need to use [ and ] instead.
57282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57283  if test "x$has_forbidden_chars" != x; then
57284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57285    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57286  fi
57287
57288
57289  windows_path="$new_path"
57290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57291    unix_path=`$CYGPATH -u "$windows_path"`
57292    new_path="$unix_path"
57293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57295    new_path="$unix_path"
57296  fi
57297
57298  if test "x$path" != "x$new_path"; then
57299    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57300    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57301$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57302  fi
57303
57304  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57305  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57306
57307    else
57308      # We're on a unix platform. Hooray! :)
57309      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57310      has_space=`$ECHO "$path" | $GREP " "`
57311      if test "x$has_space" != x; then
57312        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57313$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57314        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57315      fi
57316
57317      # Use eval to expand a potential ~
57318      eval path="$path"
57319      if test ! -f "$path" && test ! -d "$path"; then
57320        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57321      fi
57322
57323      if test -d "$path"; then
57324        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57325      else
57326        dir="`$DIRNAME "$path"`"
57327        base="`$BASENAME "$path"`"
57328        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57329      fi
57330    fi
57331  fi
57332
57333
57334  # Only process if variable expands to non-empty
57335
57336  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57338
57339  # Input might be given as Windows format, start by converting to
57340  # unix format.
57341  path="$POTENTIAL_FREETYPE_LIB_PATH"
57342  new_path=`$CYGPATH -u "$path"`
57343
57344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57347  # "foo.exe" is OK but "foo" is an error.
57348  #
57349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57350  # It is also a way to make sure we got the proper file name for the real test later on.
57351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57352  if test "x$test_shortpath" = x; then
57353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57355    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57356  fi
57357
57358  # Call helper function which possibly converts this using DOS-style short mode.
57359  # If so, the updated path is stored in $new_path.
57360
57361  input_path="$new_path"
57362  # Check if we need to convert this using DOS-style short mode. If the path
57363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57364  # take no chances and rewrite it.
57365  # Note: m4 eats our [], so we need to use [ and ] instead.
57366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57367  if test "x$has_forbidden_chars" != x; then
57368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57372      # Going to short mode and back again did indeed matter. Since short mode is
57373      # case insensitive, let's make it lowercase to improve readability.
57374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57375      # Now convert it back to Unix-style (cygpath)
57376      input_path=`$CYGPATH -u "$shortmode_path"`
57377      new_path="$input_path"
57378    fi
57379  fi
57380
57381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57382  if test "x$test_cygdrive_prefix" = x; then
57383    # As a simple fix, exclude /usr/bin since it's not a real path.
57384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57386      # a path prefixed by /cygdrive for fixpath to work.
57387      new_path="$CYGWIN_ROOT_PATH$input_path"
57388    fi
57389  fi
57390
57391
57392  if test "x$path" != "x$new_path"; then
57393    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57396  fi
57397
57398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57399
57400  path="$POTENTIAL_FREETYPE_LIB_PATH"
57401  has_colon=`$ECHO $path | $GREP ^.:`
57402  new_path="$path"
57403  if test "x$has_colon" = x; then
57404    # Not in mixed or Windows style, start by that.
57405    new_path=`cmd //c echo $path`
57406  fi
57407
57408
57409  input_path="$new_path"
57410  # Check if we need to convert this using DOS-style short mode. If the path
57411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57412  # take no chances and rewrite it.
57413  # Note: m4 eats our [], so we need to use [ and ] instead.
57414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57415  if test "x$has_forbidden_chars" != x; then
57416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57418  fi
57419
57420
57421  windows_path="$new_path"
57422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57423    unix_path=`$CYGPATH -u "$windows_path"`
57424    new_path="$unix_path"
57425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57427    new_path="$unix_path"
57428  fi
57429
57430  if test "x$path" != "x$new_path"; then
57431    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57434  fi
57435
57436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57438
57439    else
57440      # We're on a unix platform. Hooray! :)
57441      path="$POTENTIAL_FREETYPE_LIB_PATH"
57442      has_space=`$ECHO "$path" | $GREP " "`
57443      if test "x$has_space" != x; then
57444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57447      fi
57448
57449      # Use eval to expand a potential ~
57450      eval path="$path"
57451      if test ! -f "$path" && test ! -d "$path"; then
57452        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57453      fi
57454
57455      if test -d "$path"; then
57456        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57457      else
57458        dir="`$DIRNAME "$path"`"
57459        base="`$BASENAME "$path"`"
57460        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57461      fi
57462    fi
57463  fi
57464
57465
57466    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57468$as_echo_n "checking for freetype includes... " >&6; }
57469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57470$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57471    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57473$as_echo_n "checking for freetype libraries... " >&6; }
57474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57475$as_echo "$FREETYPE_LIB_PATH" >&6; }
57476  fi
57477
57478        if test "x$FOUND_FREETYPE" != xyes; then
57479          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57480        fi
57481      else
57482        # User specified only one of lib or include. This is an error.
57483        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57484          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57485$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57486          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57487        else
57488          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57489$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57490          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57491        fi
57492      fi
57493    else
57494      # User did not specify settings, but we need freetype. Try to locate it.
57495
57496      if test "x$BUNDLE_FREETYPE" = x; then
57497        # If not specified, default is to bundle freetype only on windows
57498        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57499          BUNDLE_FREETYPE=yes
57500        else
57501          BUNDLE_FREETYPE=no
57502        fi
57503      fi
57504
57505      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57506      if test "x$SYSROOT" = x; then
57507        if test "x$FOUND_FREETYPE" != xyes; then
57508          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57509          if test "x$PKG_CONFIG" != x; then
57510
57511pkg_failed=no
57512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57513$as_echo_n "checking for FREETYPE... " >&6; }
57514
57515if test -n "$FREETYPE_CFLAGS"; then
57516    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57517 elif test -n "$PKG_CONFIG"; then
57518    if test -n "$PKG_CONFIG" && \
57519    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57520  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57521  ac_status=$?
57522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57523  test $ac_status = 0; }; then
57524  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57525else
57526  pkg_failed=yes
57527fi
57528 else
57529    pkg_failed=untried
57530fi
57531if test -n "$FREETYPE_LIBS"; then
57532    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57533 elif test -n "$PKG_CONFIG"; then
57534    if test -n "$PKG_CONFIG" && \
57535    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57536  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57537  ac_status=$?
57538  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57539  test $ac_status = 0; }; then
57540  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57541else
57542  pkg_failed=yes
57543fi
57544 else
57545    pkg_failed=untried
57546fi
57547
57548
57549
57550if test $pkg_failed = yes; then
57551
57552if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57553        _pkg_short_errors_supported=yes
57554else
57555        _pkg_short_errors_supported=no
57556fi
57557        if test $_pkg_short_errors_supported = yes; then
57558	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57559        else
57560	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57561        fi
57562	# Put the nasty error message in config.log where it belongs
57563	echo "$FREETYPE_PKG_ERRORS" >&5
57564
57565	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57566$as_echo "no" >&6; }
57567                FOUND_FREETYPE=no
57568elif test $pkg_failed = untried; then
57569	FOUND_FREETYPE=no
57570else
57571	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57572	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57574$as_echo "yes" >&6; }
57575	FOUND_FREETYPE=yes
57576fi
57577            if test "x$FOUND_FREETYPE" = xyes; then
57578              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57579              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57580              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57581              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57582                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57583              fi
57584              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57585              if test "x$BUNDLE_FREETYPE" = xyes; then
57586                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57587$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57588                FOUND_FREETYPE=no
57589              else
57590                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57591$as_echo_n "checking for freetype... " >&6; }
57592                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57593$as_echo "yes (using pkg-config)" >&6; }
57594              fi
57595            fi
57596          fi
57597        fi
57598      fi
57599
57600      if test "x$FOUND_FREETYPE" != xyes; then
57601        # Check in well-known locations
57602        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57603          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57604
57605  windows_path="$FREETYPE_BASE_DIR"
57606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57607    unix_path=`$CYGPATH -u "$windows_path"`
57608    FREETYPE_BASE_DIR="$unix_path"
57609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57611    FREETYPE_BASE_DIR="$unix_path"
57612  fi
57613
57614
57615  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57616  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57617  METHOD="well-known location"
57618
57619  # Let's start with an optimistic view of the world :-)
57620  FOUND_FREETYPE=yes
57621
57622  # First look for the canonical freetype main include file ft2build.h.
57623  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57624    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57625    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57626    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57627      # Fail.
57628      FOUND_FREETYPE=no
57629    fi
57630  fi
57631
57632  if test "x$FOUND_FREETYPE" = xyes; then
57633    # Include file found, let's continue the sanity check.
57634    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57635$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57636
57637    # Reset to default value
57638    FREETYPE_BASE_NAME=freetype
57639    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57640    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57641      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57642          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57643        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57644        # for the .6 version explicitly.
57645        FREETYPE_BASE_NAME=freetype.6
57646        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57647        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57648$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57649      else
57650        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57651$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57652        FOUND_FREETYPE=no
57653      fi
57654    else
57655      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57656        # On Windows, we will need both .lib and .dll file.
57657        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57658          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57659$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57660          FOUND_FREETYPE=no
57661        fi
57662      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57663          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57664        # Found lib in isa dir, use that instead.
57665        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57666        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57667$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57668      fi
57669    fi
57670  fi
57671
57672  if test "x$FOUND_FREETYPE" = xyes; then
57673
57674  # Only process if variable expands to non-empty
57675
57676  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57678
57679  # Input might be given as Windows format, start by converting to
57680  # unix format.
57681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57682  new_path=`$CYGPATH -u "$path"`
57683
57684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57687  # "foo.exe" is OK but "foo" is an error.
57688  #
57689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57690  # It is also a way to make sure we got the proper file name for the real test later on.
57691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57692  if test "x$test_shortpath" = x; then
57693    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57695    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57696  fi
57697
57698  # Call helper function which possibly converts this using DOS-style short mode.
57699  # If so, the updated path is stored in $new_path.
57700
57701  input_path="$new_path"
57702  # Check if we need to convert this using DOS-style short mode. If the path
57703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57704  # take no chances and rewrite it.
57705  # Note: m4 eats our [], so we need to use [ and ] instead.
57706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57707  if test "x$has_forbidden_chars" != x; then
57708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57712      # Going to short mode and back again did indeed matter. Since short mode is
57713      # case insensitive, let's make it lowercase to improve readability.
57714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57715      # Now convert it back to Unix-style (cygpath)
57716      input_path=`$CYGPATH -u "$shortmode_path"`
57717      new_path="$input_path"
57718    fi
57719  fi
57720
57721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57722  if test "x$test_cygdrive_prefix" = x; then
57723    # As a simple fix, exclude /usr/bin since it's not a real path.
57724    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57726      # a path prefixed by /cygdrive for fixpath to work.
57727      new_path="$CYGWIN_ROOT_PATH$input_path"
57728    fi
57729  fi
57730
57731
57732  if test "x$path" != "x$new_path"; then
57733    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57735$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57736  fi
57737
57738    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57739
57740  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57741  has_colon=`$ECHO $path | $GREP ^.:`
57742  new_path="$path"
57743  if test "x$has_colon" = x; then
57744    # Not in mixed or Windows style, start by that.
57745    new_path=`cmd //c echo $path`
57746  fi
57747
57748
57749  input_path="$new_path"
57750  # Check if we need to convert this using DOS-style short mode. If the path
57751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57752  # take no chances and rewrite it.
57753  # Note: m4 eats our [], so we need to use [ and ] instead.
57754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57755  if test "x$has_forbidden_chars" != x; then
57756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57758  fi
57759
57760
57761  windows_path="$new_path"
57762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57763    unix_path=`$CYGPATH -u "$windows_path"`
57764    new_path="$unix_path"
57765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57767    new_path="$unix_path"
57768  fi
57769
57770  if test "x$path" != "x$new_path"; then
57771    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57772    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57773$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57774  fi
57775
57776  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57777  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57778
57779    else
57780      # We're on a unix platform. Hooray! :)
57781      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57782      has_space=`$ECHO "$path" | $GREP " "`
57783      if test "x$has_space" != x; then
57784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57785$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57786        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57787      fi
57788
57789      # Use eval to expand a potential ~
57790      eval path="$path"
57791      if test ! -f "$path" && test ! -d "$path"; then
57792        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57793      fi
57794
57795      if test -d "$path"; then
57796        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57797      else
57798        dir="`$DIRNAME "$path"`"
57799        base="`$BASENAME "$path"`"
57800        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57801      fi
57802    fi
57803  fi
57804
57805
57806  # Only process if variable expands to non-empty
57807
57808  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57809    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57810
57811  # Input might be given as Windows format, start by converting to
57812  # unix format.
57813  path="$POTENTIAL_FREETYPE_LIB_PATH"
57814  new_path=`$CYGPATH -u "$path"`
57815
57816  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57817  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57818  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57819  # "foo.exe" is OK but "foo" is an error.
57820  #
57821  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57822  # It is also a way to make sure we got the proper file name for the real test later on.
57823  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57824  if test "x$test_shortpath" = x; then
57825    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57826$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57827    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57828  fi
57829
57830  # Call helper function which possibly converts this using DOS-style short mode.
57831  # If so, the updated path is stored in $new_path.
57832
57833  input_path="$new_path"
57834  # Check if we need to convert this using DOS-style short mode. If the path
57835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57836  # take no chances and rewrite it.
57837  # Note: m4 eats our [], so we need to use [ and ] instead.
57838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57839  if test "x$has_forbidden_chars" != x; then
57840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57844      # Going to short mode and back again did indeed matter. Since short mode is
57845      # case insensitive, let's make it lowercase to improve readability.
57846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57847      # Now convert it back to Unix-style (cygpath)
57848      input_path=`$CYGPATH -u "$shortmode_path"`
57849      new_path="$input_path"
57850    fi
57851  fi
57852
57853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57854  if test "x$test_cygdrive_prefix" = x; then
57855    # As a simple fix, exclude /usr/bin since it's not a real path.
57856    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57858      # a path prefixed by /cygdrive for fixpath to work.
57859      new_path="$CYGWIN_ROOT_PATH$input_path"
57860    fi
57861  fi
57862
57863
57864  if test "x$path" != "x$new_path"; then
57865    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57868  fi
57869
57870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57871
57872  path="$POTENTIAL_FREETYPE_LIB_PATH"
57873  has_colon=`$ECHO $path | $GREP ^.:`
57874  new_path="$path"
57875  if test "x$has_colon" = x; then
57876    # Not in mixed or Windows style, start by that.
57877    new_path=`cmd //c echo $path`
57878  fi
57879
57880
57881  input_path="$new_path"
57882  # Check if we need to convert this using DOS-style short mode. If the path
57883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57884  # take no chances and rewrite it.
57885  # Note: m4 eats our [], so we need to use [ and ] instead.
57886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57887  if test "x$has_forbidden_chars" != x; then
57888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57889    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57890  fi
57891
57892
57893  windows_path="$new_path"
57894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57895    unix_path=`$CYGPATH -u "$windows_path"`
57896    new_path="$unix_path"
57897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57899    new_path="$unix_path"
57900  fi
57901
57902  if test "x$path" != "x$new_path"; then
57903    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57906  fi
57907
57908  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57909  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57910
57911    else
57912      # We're on a unix platform. Hooray! :)
57913      path="$POTENTIAL_FREETYPE_LIB_PATH"
57914      has_space=`$ECHO "$path" | $GREP " "`
57915      if test "x$has_space" != x; then
57916        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57917$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57918        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57919      fi
57920
57921      # Use eval to expand a potential ~
57922      eval path="$path"
57923      if test ! -f "$path" && test ! -d "$path"; then
57924        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57925      fi
57926
57927      if test -d "$path"; then
57928        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57929      else
57930        dir="`$DIRNAME "$path"`"
57931        base="`$BASENAME "$path"`"
57932        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57933      fi
57934    fi
57935  fi
57936
57937
57938    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57940$as_echo_n "checking for freetype includes... " >&6; }
57941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57942$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57943    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57945$as_echo_n "checking for freetype libraries... " >&6; }
57946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57947$as_echo "$FREETYPE_LIB_PATH" >&6; }
57948  fi
57949
57950          if test "x$FOUND_FREETYPE" != xyes; then
57951            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57952
57953  windows_path="$FREETYPE_BASE_DIR"
57954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57955    unix_path=`$CYGPATH -u "$windows_path"`
57956    FREETYPE_BASE_DIR="$unix_path"
57957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57959    FREETYPE_BASE_DIR="$unix_path"
57960  fi
57961
57962
57963  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57964  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57965  METHOD="well-known location"
57966
57967  # Let's start with an optimistic view of the world :-)
57968  FOUND_FREETYPE=yes
57969
57970  # First look for the canonical freetype main include file ft2build.h.
57971  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57972    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57973    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57974    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57975      # Fail.
57976      FOUND_FREETYPE=no
57977    fi
57978  fi
57979
57980  if test "x$FOUND_FREETYPE" = xyes; then
57981    # Include file found, let's continue the sanity check.
57982    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57983$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57984
57985    # Reset to default value
57986    FREETYPE_BASE_NAME=freetype
57987    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57988    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57989      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57990          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57991        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57992        # for the .6 version explicitly.
57993        FREETYPE_BASE_NAME=freetype.6
57994        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57995        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57996$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57997      else
57998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57999$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58000        FOUND_FREETYPE=no
58001      fi
58002    else
58003      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58004        # On Windows, we will need both .lib and .dll file.
58005        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58006          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58007$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58008          FOUND_FREETYPE=no
58009        fi
58010      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58011          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58012        # Found lib in isa dir, use that instead.
58013        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58014        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58015$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58016      fi
58017    fi
58018  fi
58019
58020  if test "x$FOUND_FREETYPE" = xyes; then
58021
58022  # Only process if variable expands to non-empty
58023
58024  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58025    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58026
58027  # Input might be given as Windows format, start by converting to
58028  # unix format.
58029  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58030  new_path=`$CYGPATH -u "$path"`
58031
58032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58035  # "foo.exe" is OK but "foo" is an error.
58036  #
58037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58038  # It is also a way to make sure we got the proper file name for the real test later on.
58039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58040  if test "x$test_shortpath" = x; then
58041    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58042$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58043    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58044  fi
58045
58046  # Call helper function which possibly converts this using DOS-style short mode.
58047  # If so, the updated path is stored in $new_path.
58048
58049  input_path="$new_path"
58050  # Check if we need to convert this using DOS-style short mode. If the path
58051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58052  # take no chances and rewrite it.
58053  # Note: m4 eats our [], so we need to use [ and ] instead.
58054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58055  if test "x$has_forbidden_chars" != x; then
58056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58060      # Going to short mode and back again did indeed matter. Since short mode is
58061      # case insensitive, let's make it lowercase to improve readability.
58062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58063      # Now convert it back to Unix-style (cygpath)
58064      input_path=`$CYGPATH -u "$shortmode_path"`
58065      new_path="$input_path"
58066    fi
58067  fi
58068
58069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58070  if test "x$test_cygdrive_prefix" = x; then
58071    # As a simple fix, exclude /usr/bin since it's not a real path.
58072    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58074      # a path prefixed by /cygdrive for fixpath to work.
58075      new_path="$CYGWIN_ROOT_PATH$input_path"
58076    fi
58077  fi
58078
58079
58080  if test "x$path" != "x$new_path"; then
58081    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58084  fi
58085
58086    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58087
58088  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58089  has_colon=`$ECHO $path | $GREP ^.:`
58090  new_path="$path"
58091  if test "x$has_colon" = x; then
58092    # Not in mixed or Windows style, start by that.
58093    new_path=`cmd //c echo $path`
58094  fi
58095
58096
58097  input_path="$new_path"
58098  # Check if we need to convert this using DOS-style short mode. If the path
58099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58100  # take no chances and rewrite it.
58101  # Note: m4 eats our [], so we need to use [ and ] instead.
58102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58103  if test "x$has_forbidden_chars" != x; then
58104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58106  fi
58107
58108
58109  windows_path="$new_path"
58110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58111    unix_path=`$CYGPATH -u "$windows_path"`
58112    new_path="$unix_path"
58113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58115    new_path="$unix_path"
58116  fi
58117
58118  if test "x$path" != "x$new_path"; then
58119    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58121$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58122  fi
58123
58124  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58125  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58126
58127    else
58128      # We're on a unix platform. Hooray! :)
58129      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58130      has_space=`$ECHO "$path" | $GREP " "`
58131      if test "x$has_space" != x; then
58132        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58134        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58135      fi
58136
58137      # Use eval to expand a potential ~
58138      eval path="$path"
58139      if test ! -f "$path" && test ! -d "$path"; then
58140        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58141      fi
58142
58143      if test -d "$path"; then
58144        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58145      else
58146        dir="`$DIRNAME "$path"`"
58147        base="`$BASENAME "$path"`"
58148        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58149      fi
58150    fi
58151  fi
58152
58153
58154  # Only process if variable expands to non-empty
58155
58156  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58158
58159  # Input might be given as Windows format, start by converting to
58160  # unix format.
58161  path="$POTENTIAL_FREETYPE_LIB_PATH"
58162  new_path=`$CYGPATH -u "$path"`
58163
58164  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58165  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58166  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58167  # "foo.exe" is OK but "foo" is an error.
58168  #
58169  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58170  # It is also a way to make sure we got the proper file name for the real test later on.
58171  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58172  if test "x$test_shortpath" = x; then
58173    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58175    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58176  fi
58177
58178  # Call helper function which possibly converts this using DOS-style short mode.
58179  # If so, the updated path is stored in $new_path.
58180
58181  input_path="$new_path"
58182  # Check if we need to convert this using DOS-style short mode. If the path
58183  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58184  # take no chances and rewrite it.
58185  # Note: m4 eats our [], so we need to use [ and ] instead.
58186  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58187  if test "x$has_forbidden_chars" != x; then
58188    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58189    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58190    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58191    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58192      # Going to short mode and back again did indeed matter. Since short mode is
58193      # case insensitive, let's make it lowercase to improve readability.
58194      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58195      # Now convert it back to Unix-style (cygpath)
58196      input_path=`$CYGPATH -u "$shortmode_path"`
58197      new_path="$input_path"
58198    fi
58199  fi
58200
58201  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58202  if test "x$test_cygdrive_prefix" = x; then
58203    # As a simple fix, exclude /usr/bin since it's not a real path.
58204    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58205      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58206      # a path prefixed by /cygdrive for fixpath to work.
58207      new_path="$CYGWIN_ROOT_PATH$input_path"
58208    fi
58209  fi
58210
58211
58212  if test "x$path" != "x$new_path"; then
58213    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58215$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58216  fi
58217
58218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58219
58220  path="$POTENTIAL_FREETYPE_LIB_PATH"
58221  has_colon=`$ECHO $path | $GREP ^.:`
58222  new_path="$path"
58223  if test "x$has_colon" = x; then
58224    # Not in mixed or Windows style, start by that.
58225    new_path=`cmd //c echo $path`
58226  fi
58227
58228
58229  input_path="$new_path"
58230  # Check if we need to convert this using DOS-style short mode. If the path
58231  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58232  # take no chances and rewrite it.
58233  # Note: m4 eats our [], so we need to use [ and ] instead.
58234  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58235  if test "x$has_forbidden_chars" != x; then
58236    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58237    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58238  fi
58239
58240
58241  windows_path="$new_path"
58242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58243    unix_path=`$CYGPATH -u "$windows_path"`
58244    new_path="$unix_path"
58245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58247    new_path="$unix_path"
58248  fi
58249
58250  if test "x$path" != "x$new_path"; then
58251    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58253$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58254  fi
58255
58256  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58257  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58258
58259    else
58260      # We're on a unix platform. Hooray! :)
58261      path="$POTENTIAL_FREETYPE_LIB_PATH"
58262      has_space=`$ECHO "$path" | $GREP " "`
58263      if test "x$has_space" != x; then
58264        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58266        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58267      fi
58268
58269      # Use eval to expand a potential ~
58270      eval path="$path"
58271      if test ! -f "$path" && test ! -d "$path"; then
58272        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58273      fi
58274
58275      if test -d "$path"; then
58276        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58277      else
58278        dir="`$DIRNAME "$path"`"
58279        base="`$BASENAME "$path"`"
58280        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58281      fi
58282    fi
58283  fi
58284
58285
58286    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58288$as_echo_n "checking for freetype includes... " >&6; }
58289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58290$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58291    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58293$as_echo_n "checking for freetype libraries... " >&6; }
58294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58295$as_echo "$FREETYPE_LIB_PATH" >&6; }
58296  fi
58297
58298          fi
58299          if test "x$FOUND_FREETYPE" != xyes; then
58300            FREETYPE_BASE_DIR="$HOME/freetype"
58301
58302  windows_path="$FREETYPE_BASE_DIR"
58303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58304    unix_path=`$CYGPATH -u "$windows_path"`
58305    FREETYPE_BASE_DIR="$unix_path"
58306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58308    FREETYPE_BASE_DIR="$unix_path"
58309  fi
58310
58311            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58312
58313  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58314  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58315  METHOD="well-known location"
58316
58317  # Let's start with an optimistic view of the world :-)
58318  FOUND_FREETYPE=yes
58319
58320  # First look for the canonical freetype main include file ft2build.h.
58321  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58322    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58323    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58324    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58325      # Fail.
58326      FOUND_FREETYPE=no
58327    fi
58328  fi
58329
58330  if test "x$FOUND_FREETYPE" = xyes; then
58331    # Include file found, let's continue the sanity check.
58332    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58333$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58334
58335    # Reset to default value
58336    FREETYPE_BASE_NAME=freetype
58337    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58338    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58339      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58340          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58341        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58342        # for the .6 version explicitly.
58343        FREETYPE_BASE_NAME=freetype.6
58344        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58345        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58346$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58347      else
58348        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58349$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58350        FOUND_FREETYPE=no
58351      fi
58352    else
58353      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58354        # On Windows, we will need both .lib and .dll file.
58355        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58356          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58357$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58358          FOUND_FREETYPE=no
58359        fi
58360      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58361          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58362        # Found lib in isa dir, use that instead.
58363        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58364        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58365$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58366      fi
58367    fi
58368  fi
58369
58370  if test "x$FOUND_FREETYPE" = xyes; then
58371
58372  # Only process if variable expands to non-empty
58373
58374  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58376
58377  # Input might be given as Windows format, start by converting to
58378  # unix format.
58379  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58380  new_path=`$CYGPATH -u "$path"`
58381
58382  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58383  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58384  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58385  # "foo.exe" is OK but "foo" is an error.
58386  #
58387  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58388  # It is also a way to make sure we got the proper file name for the real test later on.
58389  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58390  if test "x$test_shortpath" = x; then
58391    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58392$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58393    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58394  fi
58395
58396  # Call helper function which possibly converts this using DOS-style short mode.
58397  # If so, the updated path is stored in $new_path.
58398
58399  input_path="$new_path"
58400  # Check if we need to convert this using DOS-style short mode. If the path
58401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58402  # take no chances and rewrite it.
58403  # Note: m4 eats our [], so we need to use [ and ] instead.
58404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58405  if test "x$has_forbidden_chars" != x; then
58406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58410      # Going to short mode and back again did indeed matter. Since short mode is
58411      # case insensitive, let's make it lowercase to improve readability.
58412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58413      # Now convert it back to Unix-style (cygpath)
58414      input_path=`$CYGPATH -u "$shortmode_path"`
58415      new_path="$input_path"
58416    fi
58417  fi
58418
58419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58420  if test "x$test_cygdrive_prefix" = x; then
58421    # As a simple fix, exclude /usr/bin since it's not a real path.
58422    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58424      # a path prefixed by /cygdrive for fixpath to work.
58425      new_path="$CYGWIN_ROOT_PATH$input_path"
58426    fi
58427  fi
58428
58429
58430  if test "x$path" != "x$new_path"; then
58431    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58434  fi
58435
58436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58437
58438  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58439  has_colon=`$ECHO $path | $GREP ^.:`
58440  new_path="$path"
58441  if test "x$has_colon" = x; then
58442    # Not in mixed or Windows style, start by that.
58443    new_path=`cmd //c echo $path`
58444  fi
58445
58446
58447  input_path="$new_path"
58448  # Check if we need to convert this using DOS-style short mode. If the path
58449  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58450  # take no chances and rewrite it.
58451  # Note: m4 eats our [], so we need to use [ and ] instead.
58452  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58453  if test "x$has_forbidden_chars" != x; then
58454    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58455    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58456  fi
58457
58458
58459  windows_path="$new_path"
58460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58461    unix_path=`$CYGPATH -u "$windows_path"`
58462    new_path="$unix_path"
58463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58465    new_path="$unix_path"
58466  fi
58467
58468  if test "x$path" != "x$new_path"; then
58469    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58470    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58471$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58472  fi
58473
58474  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58475  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58476
58477    else
58478      # We're on a unix platform. Hooray! :)
58479      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58480      has_space=`$ECHO "$path" | $GREP " "`
58481      if test "x$has_space" != x; then
58482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58483$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58484        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58485      fi
58486
58487      # Use eval to expand a potential ~
58488      eval path="$path"
58489      if test ! -f "$path" && test ! -d "$path"; then
58490        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58491      fi
58492
58493      if test -d "$path"; then
58494        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58495      else
58496        dir="`$DIRNAME "$path"`"
58497        base="`$BASENAME "$path"`"
58498        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58499      fi
58500    fi
58501  fi
58502
58503
58504  # Only process if variable expands to non-empty
58505
58506  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58508
58509  # Input might be given as Windows format, start by converting to
58510  # unix format.
58511  path="$POTENTIAL_FREETYPE_LIB_PATH"
58512  new_path=`$CYGPATH -u "$path"`
58513
58514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58517  # "foo.exe" is OK but "foo" is an error.
58518  #
58519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58520  # It is also a way to make sure we got the proper file name for the real test later on.
58521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58522  if test "x$test_shortpath" = x; then
58523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58526  fi
58527
58528  # Call helper function which possibly converts this using DOS-style short mode.
58529  # If so, the updated path is stored in $new_path.
58530
58531  input_path="$new_path"
58532  # Check if we need to convert this using DOS-style short mode. If the path
58533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58534  # take no chances and rewrite it.
58535  # Note: m4 eats our [], so we need to use [ and ] instead.
58536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58537  if test "x$has_forbidden_chars" != x; then
58538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58542      # Going to short mode and back again did indeed matter. Since short mode is
58543      # case insensitive, let's make it lowercase to improve readability.
58544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58545      # Now convert it back to Unix-style (cygpath)
58546      input_path=`$CYGPATH -u "$shortmode_path"`
58547      new_path="$input_path"
58548    fi
58549  fi
58550
58551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58552  if test "x$test_cygdrive_prefix" = x; then
58553    # As a simple fix, exclude /usr/bin since it's not a real path.
58554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58556      # a path prefixed by /cygdrive for fixpath to work.
58557      new_path="$CYGWIN_ROOT_PATH$input_path"
58558    fi
58559  fi
58560
58561
58562  if test "x$path" != "x$new_path"; then
58563    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58566  fi
58567
58568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58569
58570  path="$POTENTIAL_FREETYPE_LIB_PATH"
58571  has_colon=`$ECHO $path | $GREP ^.:`
58572  new_path="$path"
58573  if test "x$has_colon" = x; then
58574    # Not in mixed or Windows style, start by that.
58575    new_path=`cmd //c echo $path`
58576  fi
58577
58578
58579  input_path="$new_path"
58580  # Check if we need to convert this using DOS-style short mode. If the path
58581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58582  # take no chances and rewrite it.
58583  # Note: m4 eats our [], so we need to use [ and ] instead.
58584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58585  if test "x$has_forbidden_chars" != x; then
58586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58588  fi
58589
58590
58591  windows_path="$new_path"
58592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58593    unix_path=`$CYGPATH -u "$windows_path"`
58594    new_path="$unix_path"
58595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58597    new_path="$unix_path"
58598  fi
58599
58600  if test "x$path" != "x$new_path"; then
58601    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58604  fi
58605
58606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58608
58609    else
58610      # We're on a unix platform. Hooray! :)
58611      path="$POTENTIAL_FREETYPE_LIB_PATH"
58612      has_space=`$ECHO "$path" | $GREP " "`
58613      if test "x$has_space" != x; then
58614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58617      fi
58618
58619      # Use eval to expand a potential ~
58620      eval path="$path"
58621      if test ! -f "$path" && test ! -d "$path"; then
58622        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58623      fi
58624
58625      if test -d "$path"; then
58626        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58627      else
58628        dir="`$DIRNAME "$path"`"
58629        base="`$BASENAME "$path"`"
58630        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58631      fi
58632    fi
58633  fi
58634
58635
58636    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58638$as_echo_n "checking for freetype includes... " >&6; }
58639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58640$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58641    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58643$as_echo_n "checking for freetype libraries... " >&6; }
58644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58645$as_echo "$FREETYPE_LIB_PATH" >&6; }
58646  fi
58647
58648            else
58649
58650  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58651  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58652  METHOD="well-known location"
58653
58654  # Let's start with an optimistic view of the world :-)
58655  FOUND_FREETYPE=yes
58656
58657  # First look for the canonical freetype main include file ft2build.h.
58658  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58659    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58660    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58661    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58662      # Fail.
58663      FOUND_FREETYPE=no
58664    fi
58665  fi
58666
58667  if test "x$FOUND_FREETYPE" = xyes; then
58668    # Include file found, let's continue the sanity check.
58669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58670$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58671
58672    # Reset to default value
58673    FREETYPE_BASE_NAME=freetype
58674    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58675    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58676      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58677          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58678        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58679        # for the .6 version explicitly.
58680        FREETYPE_BASE_NAME=freetype.6
58681        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58682        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58683$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58684      else
58685        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58686$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58687        FOUND_FREETYPE=no
58688      fi
58689    else
58690      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58691        # On Windows, we will need both .lib and .dll file.
58692        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58693          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58694$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58695          FOUND_FREETYPE=no
58696        fi
58697      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58698          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58699        # Found lib in isa dir, use that instead.
58700        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58701        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58702$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58703      fi
58704    fi
58705  fi
58706
58707  if test "x$FOUND_FREETYPE" = xyes; then
58708
58709  # Only process if variable expands to non-empty
58710
58711  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58713
58714  # Input might be given as Windows format, start by converting to
58715  # unix format.
58716  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58717  new_path=`$CYGPATH -u "$path"`
58718
58719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58722  # "foo.exe" is OK but "foo" is an error.
58723  #
58724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58725  # It is also a way to make sure we got the proper file name for the real test later on.
58726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58727  if test "x$test_shortpath" = x; then
58728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58731  fi
58732
58733  # Call helper function which possibly converts this using DOS-style short mode.
58734  # If so, the updated path is stored in $new_path.
58735
58736  input_path="$new_path"
58737  # Check if we need to convert this using DOS-style short mode. If the path
58738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58739  # take no chances and rewrite it.
58740  # Note: m4 eats our [], so we need to use [ and ] instead.
58741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58742  if test "x$has_forbidden_chars" != x; then
58743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58747      # Going to short mode and back again did indeed matter. Since short mode is
58748      # case insensitive, let's make it lowercase to improve readability.
58749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58750      # Now convert it back to Unix-style (cygpath)
58751      input_path=`$CYGPATH -u "$shortmode_path"`
58752      new_path="$input_path"
58753    fi
58754  fi
58755
58756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58757  if test "x$test_cygdrive_prefix" = x; then
58758    # As a simple fix, exclude /usr/bin since it's not a real path.
58759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58761      # a path prefixed by /cygdrive for fixpath to work.
58762      new_path="$CYGWIN_ROOT_PATH$input_path"
58763    fi
58764  fi
58765
58766
58767  if test "x$path" != "x$new_path"; then
58768    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58771  fi
58772
58773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58774
58775  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58776  has_colon=`$ECHO $path | $GREP ^.:`
58777  new_path="$path"
58778  if test "x$has_colon" = x; then
58779    # Not in mixed or Windows style, start by that.
58780    new_path=`cmd //c echo $path`
58781  fi
58782
58783
58784  input_path="$new_path"
58785  # Check if we need to convert this using DOS-style short mode. If the path
58786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58787  # take no chances and rewrite it.
58788  # Note: m4 eats our [], so we need to use [ and ] instead.
58789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58790  if test "x$has_forbidden_chars" != x; then
58791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58793  fi
58794
58795
58796  windows_path="$new_path"
58797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58798    unix_path=`$CYGPATH -u "$windows_path"`
58799    new_path="$unix_path"
58800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58802    new_path="$unix_path"
58803  fi
58804
58805  if test "x$path" != "x$new_path"; then
58806    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58809  fi
58810
58811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58813
58814    else
58815      # We're on a unix platform. Hooray! :)
58816      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58817      has_space=`$ECHO "$path" | $GREP " "`
58818      if test "x$has_space" != x; then
58819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58822      fi
58823
58824      # Use eval to expand a potential ~
58825      eval path="$path"
58826      if test ! -f "$path" && test ! -d "$path"; then
58827        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58828      fi
58829
58830      if test -d "$path"; then
58831        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58832      else
58833        dir="`$DIRNAME "$path"`"
58834        base="`$BASENAME "$path"`"
58835        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58836      fi
58837    fi
58838  fi
58839
58840
58841  # Only process if variable expands to non-empty
58842
58843  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58845
58846  # Input might be given as Windows format, start by converting to
58847  # unix format.
58848  path="$POTENTIAL_FREETYPE_LIB_PATH"
58849  new_path=`$CYGPATH -u "$path"`
58850
58851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58854  # "foo.exe" is OK but "foo" is an error.
58855  #
58856  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58857  # It is also a way to make sure we got the proper file name for the real test later on.
58858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58859  if test "x$test_shortpath" = x; then
58860    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58862    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58863  fi
58864
58865  # Call helper function which possibly converts this using DOS-style short mode.
58866  # If so, the updated path is stored in $new_path.
58867
58868  input_path="$new_path"
58869  # Check if we need to convert this using DOS-style short mode. If the path
58870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58871  # take no chances and rewrite it.
58872  # Note: m4 eats our [], so we need to use [ and ] instead.
58873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58874  if test "x$has_forbidden_chars" != x; then
58875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58879      # Going to short mode and back again did indeed matter. Since short mode is
58880      # case insensitive, let's make it lowercase to improve readability.
58881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58882      # Now convert it back to Unix-style (cygpath)
58883      input_path=`$CYGPATH -u "$shortmode_path"`
58884      new_path="$input_path"
58885    fi
58886  fi
58887
58888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58889  if test "x$test_cygdrive_prefix" = x; then
58890    # As a simple fix, exclude /usr/bin since it's not a real path.
58891    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58893      # a path prefixed by /cygdrive for fixpath to work.
58894      new_path="$CYGWIN_ROOT_PATH$input_path"
58895    fi
58896  fi
58897
58898
58899  if test "x$path" != "x$new_path"; then
58900    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58903  fi
58904
58905    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58906
58907  path="$POTENTIAL_FREETYPE_LIB_PATH"
58908  has_colon=`$ECHO $path | $GREP ^.:`
58909  new_path="$path"
58910  if test "x$has_colon" = x; then
58911    # Not in mixed or Windows style, start by that.
58912    new_path=`cmd //c echo $path`
58913  fi
58914
58915
58916  input_path="$new_path"
58917  # Check if we need to convert this using DOS-style short mode. If the path
58918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58919  # take no chances and rewrite it.
58920  # Note: m4 eats our [], so we need to use [ and ] instead.
58921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58922  if test "x$has_forbidden_chars" != x; then
58923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58925  fi
58926
58927
58928  windows_path="$new_path"
58929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58930    unix_path=`$CYGPATH -u "$windows_path"`
58931    new_path="$unix_path"
58932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58934    new_path="$unix_path"
58935  fi
58936
58937  if test "x$path" != "x$new_path"; then
58938    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58939    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58940$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58941  fi
58942
58943  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58944  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58945
58946    else
58947      # We're on a unix platform. Hooray! :)
58948      path="$POTENTIAL_FREETYPE_LIB_PATH"
58949      has_space=`$ECHO "$path" | $GREP " "`
58950      if test "x$has_space" != x; then
58951        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58952$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58953        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58954      fi
58955
58956      # Use eval to expand a potential ~
58957      eval path="$path"
58958      if test ! -f "$path" && test ! -d "$path"; then
58959        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58960      fi
58961
58962      if test -d "$path"; then
58963        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58964      else
58965        dir="`$DIRNAME "$path"`"
58966        base="`$BASENAME "$path"`"
58967        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58968      fi
58969    fi
58970  fi
58971
58972
58973    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58975$as_echo_n "checking for freetype includes... " >&6; }
58976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58977$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58978    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58980$as_echo_n "checking for freetype libraries... " >&6; }
58981    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58982$as_echo "$FREETYPE_LIB_PATH" >&6; }
58983  fi
58984
58985            fi
58986            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58987                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58988              # Source is available, as a last resort try to build freetype in default location
58989
58990  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58991  BUILD_FREETYPE=yes
58992
58993  # Check if the freetype sources are acessible..
58994  if ! test -d $FREETYPE_SRC_PATH; then
58995    { $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
58996$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
58997    BUILD_FREETYPE=no
58998  fi
58999  # ..and contain a vc2010 project file
59000  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59001  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59002    { $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
59003$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59004    BUILD_FREETYPE=no
59005  fi
59006  # Now check if configure found a version of 'msbuild.exe'
59007  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59008    { $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
59009$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;}
59010    BUILD_FREETYPE=no
59011  fi
59012
59013  # Ready to go..
59014  if test "x$BUILD_FREETYPE" = xyes; then
59015    # msbuild requires trailing slashes for output directories
59016    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59017    freetype_lib_path_unix="$freetype_lib_path"
59018    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59019
59020  unix_path="$vcxproj_path"
59021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59022    windows_path=`$CYGPATH -m "$unix_path"`
59023    vcxproj_path="$windows_path"
59024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59025    windows_path=`cmd //c echo $unix_path`
59026    vcxproj_path="$windows_path"
59027  fi
59028
59029
59030  unix_path="$freetype_lib_path"
59031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59032    windows_path=`$CYGPATH -m "$unix_path"`
59033    freetype_lib_path="$windows_path"
59034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59035    windows_path=`cmd //c echo $unix_path`
59036    freetype_lib_path="$windows_path"
59037  fi
59038
59039
59040  unix_path="$freetype_obj_path"
59041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59042    windows_path=`$CYGPATH -m "$unix_path"`
59043    freetype_obj_path="$windows_path"
59044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59045    windows_path=`cmd //c echo $unix_path`
59046    freetype_obj_path="$windows_path"
59047  fi
59048
59049    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59050      freetype_platform=x64
59051    else
59052      freetype_platform=win32
59053    fi
59054
59055    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59056    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59057    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59058    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59059    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59060$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59061
59062    # First we try to build the freetype.dll
59063    $ECHO -e "@echo off\n"\
59064        "$MSBUILD $vcxproj_path "\
59065        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59066        "/p:Configuration=\"Release Multithreaded\" "\
59067        "/p:Platform=$freetype_platform "\
59068        "/p:ConfigurationType=DynamicLibrary "\
59069        "/p:TargetName=freetype "\
59070        "/p:OutDir=\"$freetype_lib_path\" "\
59071        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59072    cmd /c freetype.bat
59073
59074    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59075      # If that succeeds we also build freetype.lib
59076      $ECHO -e "@echo off\n"\
59077          "$MSBUILD $vcxproj_path "\
59078          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59079          "/p:Configuration=\"Release Multithreaded\" "\
59080          "/p:Platform=$freetype_platform "\
59081          "/p:ConfigurationType=StaticLibrary "\
59082          "/p:TargetName=freetype "\
59083          "/p:OutDir=\"$freetype_lib_path\" "\
59084          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59085      cmd /c freetype.bat
59086
59087      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59088        # Once we build both, lib and dll, set freetype lib and include path appropriately
59089        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59090        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59091        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59092$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59093      else
59094        BUILD_FREETYPE=no
59095      fi
59096    else
59097      BUILD_FREETYPE=no
59098    fi
59099  fi
59100
59101              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59102
59103  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59104  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59105  METHOD="well-known location"
59106
59107  # Let's start with an optimistic view of the world :-)
59108  FOUND_FREETYPE=yes
59109
59110  # First look for the canonical freetype main include file ft2build.h.
59111  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59112    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59113    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59114    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59115      # Fail.
59116      FOUND_FREETYPE=no
59117    fi
59118  fi
59119
59120  if test "x$FOUND_FREETYPE" = xyes; then
59121    # Include file found, let's continue the sanity check.
59122    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59123$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59124
59125    # Reset to default value
59126    FREETYPE_BASE_NAME=freetype
59127    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59128    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59129      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59130          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59131        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59132        # for the .6 version explicitly.
59133        FREETYPE_BASE_NAME=freetype.6
59134        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59135        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59136$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59137      else
59138        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59139$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59140        FOUND_FREETYPE=no
59141      fi
59142    else
59143      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59144        # On Windows, we will need both .lib and .dll file.
59145        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59146          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59147$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59148          FOUND_FREETYPE=no
59149        fi
59150      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59151          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59152        # Found lib in isa dir, use that instead.
59153        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59154        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59155$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59156      fi
59157    fi
59158  fi
59159
59160  if test "x$FOUND_FREETYPE" = xyes; then
59161
59162  # Only process if variable expands to non-empty
59163
59164  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59165    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59166
59167  # Input might be given as Windows format, start by converting to
59168  # unix format.
59169  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59170  new_path=`$CYGPATH -u "$path"`
59171
59172  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59173  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59174  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59175  # "foo.exe" is OK but "foo" is an error.
59176  #
59177  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59178  # It is also a way to make sure we got the proper file name for the real test later on.
59179  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59180  if test "x$test_shortpath" = x; then
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59183    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59184  fi
59185
59186  # Call helper function which possibly converts this using DOS-style short mode.
59187  # If so, the updated path is stored in $new_path.
59188
59189  input_path="$new_path"
59190  # Check if we need to convert this using DOS-style short mode. If the path
59191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59192  # take no chances and rewrite it.
59193  # Note: m4 eats our [], so we need to use [ and ] instead.
59194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59195  if test "x$has_forbidden_chars" != x; then
59196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59197    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59198    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59199    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59200      # Going to short mode and back again did indeed matter. Since short mode is
59201      # case insensitive, let's make it lowercase to improve readability.
59202      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59203      # Now convert it back to Unix-style (cygpath)
59204      input_path=`$CYGPATH -u "$shortmode_path"`
59205      new_path="$input_path"
59206    fi
59207  fi
59208
59209  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59210  if test "x$test_cygdrive_prefix" = x; then
59211    # As a simple fix, exclude /usr/bin since it's not a real path.
59212    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59213      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59214      # a path prefixed by /cygdrive for fixpath to work.
59215      new_path="$CYGWIN_ROOT_PATH$input_path"
59216    fi
59217  fi
59218
59219
59220  if test "x$path" != "x$new_path"; then
59221    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59223$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59224  fi
59225
59226    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59227
59228  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59229  has_colon=`$ECHO $path | $GREP ^.:`
59230  new_path="$path"
59231  if test "x$has_colon" = x; then
59232    # Not in mixed or Windows style, start by that.
59233    new_path=`cmd //c echo $path`
59234  fi
59235
59236
59237  input_path="$new_path"
59238  # Check if we need to convert this using DOS-style short mode. If the path
59239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59240  # take no chances and rewrite it.
59241  # Note: m4 eats our [], so we need to use [ and ] instead.
59242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59243  if test "x$has_forbidden_chars" != x; then
59244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59245    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59246  fi
59247
59248
59249  windows_path="$new_path"
59250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59251    unix_path=`$CYGPATH -u "$windows_path"`
59252    new_path="$unix_path"
59253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59255    new_path="$unix_path"
59256  fi
59257
59258  if test "x$path" != "x$new_path"; then
59259    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59261$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59262  fi
59263
59264  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59265  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59266
59267    else
59268      # We're on a unix platform. Hooray! :)
59269      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59270      has_space=`$ECHO "$path" | $GREP " "`
59271      if test "x$has_space" != x; then
59272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59273$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59274        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59275      fi
59276
59277      # Use eval to expand a potential ~
59278      eval path="$path"
59279      if test ! -f "$path" && test ! -d "$path"; then
59280        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59281      fi
59282
59283      if test -d "$path"; then
59284        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59285      else
59286        dir="`$DIRNAME "$path"`"
59287        base="`$BASENAME "$path"`"
59288        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59289      fi
59290    fi
59291  fi
59292
59293
59294  # Only process if variable expands to non-empty
59295
59296  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59298
59299  # Input might be given as Windows format, start by converting to
59300  # unix format.
59301  path="$POTENTIAL_FREETYPE_LIB_PATH"
59302  new_path=`$CYGPATH -u "$path"`
59303
59304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59307  # "foo.exe" is OK but "foo" is an error.
59308  #
59309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59310  # It is also a way to make sure we got the proper file name for the real test later on.
59311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59312  if test "x$test_shortpath" = x; then
59313    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59315    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59316  fi
59317
59318  # Call helper function which possibly converts this using DOS-style short mode.
59319  # If so, the updated path is stored in $new_path.
59320
59321  input_path="$new_path"
59322  # Check if we need to convert this using DOS-style short mode. If the path
59323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59324  # take no chances and rewrite it.
59325  # Note: m4 eats our [], so we need to use [ and ] instead.
59326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59327  if test "x$has_forbidden_chars" != x; then
59328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59332      # Going to short mode and back again did indeed matter. Since short mode is
59333      # case insensitive, let's make it lowercase to improve readability.
59334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59335      # Now convert it back to Unix-style (cygpath)
59336      input_path=`$CYGPATH -u "$shortmode_path"`
59337      new_path="$input_path"
59338    fi
59339  fi
59340
59341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59342  if test "x$test_cygdrive_prefix" = x; then
59343    # As a simple fix, exclude /usr/bin since it's not a real path.
59344    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59346      # a path prefixed by /cygdrive for fixpath to work.
59347      new_path="$CYGWIN_ROOT_PATH$input_path"
59348    fi
59349  fi
59350
59351
59352  if test "x$path" != "x$new_path"; then
59353    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59355$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59356  fi
59357
59358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59359
59360  path="$POTENTIAL_FREETYPE_LIB_PATH"
59361  has_colon=`$ECHO $path | $GREP ^.:`
59362  new_path="$path"
59363  if test "x$has_colon" = x; then
59364    # Not in mixed or Windows style, start by that.
59365    new_path=`cmd //c echo $path`
59366  fi
59367
59368
59369  input_path="$new_path"
59370  # Check if we need to convert this using DOS-style short mode. If the path
59371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59372  # take no chances and rewrite it.
59373  # Note: m4 eats our [], so we need to use [ and ] instead.
59374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59375  if test "x$has_forbidden_chars" != x; then
59376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59378  fi
59379
59380
59381  windows_path="$new_path"
59382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59383    unix_path=`$CYGPATH -u "$windows_path"`
59384    new_path="$unix_path"
59385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59387    new_path="$unix_path"
59388  fi
59389
59390  if test "x$path" != "x$new_path"; then
59391    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59393$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59394  fi
59395
59396  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59397  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59398
59399    else
59400      # We're on a unix platform. Hooray! :)
59401      path="$POTENTIAL_FREETYPE_LIB_PATH"
59402      has_space=`$ECHO "$path" | $GREP " "`
59403      if test "x$has_space" != x; then
59404        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59405$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59406        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59407      fi
59408
59409      # Use eval to expand a potential ~
59410      eval path="$path"
59411      if test ! -f "$path" && test ! -d "$path"; then
59412        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59413      fi
59414
59415      if test -d "$path"; then
59416        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59417      else
59418        dir="`$DIRNAME "$path"`"
59419        base="`$BASENAME "$path"`"
59420        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59421      fi
59422    fi
59423  fi
59424
59425
59426    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59428$as_echo_n "checking for freetype includes... " >&6; }
59429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59430$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59431    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59433$as_echo_n "checking for freetype libraries... " >&6; }
59434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59435$as_echo "$FREETYPE_LIB_PATH" >&6; }
59436  fi
59437
59438              else
59439
59440  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59441  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59442  METHOD="well-known location"
59443
59444  # Let's start with an optimistic view of the world :-)
59445  FOUND_FREETYPE=yes
59446
59447  # First look for the canonical freetype main include file ft2build.h.
59448  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59449    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59450    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59451    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59452      # Fail.
59453      FOUND_FREETYPE=no
59454    fi
59455  fi
59456
59457  if test "x$FOUND_FREETYPE" = xyes; then
59458    # Include file found, let's continue the sanity check.
59459    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59460$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59461
59462    # Reset to default value
59463    FREETYPE_BASE_NAME=freetype
59464    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59465    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59466      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59467          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59468        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59469        # for the .6 version explicitly.
59470        FREETYPE_BASE_NAME=freetype.6
59471        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59472        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59473$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59474      else
59475        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59476$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59477        FOUND_FREETYPE=no
59478      fi
59479    else
59480      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59481        # On Windows, we will need both .lib and .dll file.
59482        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59483          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59484$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59485          FOUND_FREETYPE=no
59486        fi
59487      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59488          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59489        # Found lib in isa dir, use that instead.
59490        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59491        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59492$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59493      fi
59494    fi
59495  fi
59496
59497  if test "x$FOUND_FREETYPE" = xyes; then
59498
59499  # Only process if variable expands to non-empty
59500
59501  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59503
59504  # Input might be given as Windows format, start by converting to
59505  # unix format.
59506  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59507  new_path=`$CYGPATH -u "$path"`
59508
59509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59512  # "foo.exe" is OK but "foo" is an error.
59513  #
59514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59515  # It is also a way to make sure we got the proper file name for the real test later on.
59516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59517  if test "x$test_shortpath" = x; then
59518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59520    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59521  fi
59522
59523  # Call helper function which possibly converts this using DOS-style short mode.
59524  # If so, the updated path is stored in $new_path.
59525
59526  input_path="$new_path"
59527  # Check if we need to convert this using DOS-style short mode. If the path
59528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59529  # take no chances and rewrite it.
59530  # Note: m4 eats our [], so we need to use [ and ] instead.
59531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59532  if test "x$has_forbidden_chars" != x; then
59533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59537      # Going to short mode and back again did indeed matter. Since short mode is
59538      # case insensitive, let's make it lowercase to improve readability.
59539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59540      # Now convert it back to Unix-style (cygpath)
59541      input_path=`$CYGPATH -u "$shortmode_path"`
59542      new_path="$input_path"
59543    fi
59544  fi
59545
59546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59547  if test "x$test_cygdrive_prefix" = x; then
59548    # As a simple fix, exclude /usr/bin since it's not a real path.
59549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59551      # a path prefixed by /cygdrive for fixpath to work.
59552      new_path="$CYGWIN_ROOT_PATH$input_path"
59553    fi
59554  fi
59555
59556
59557  if test "x$path" != "x$new_path"; then
59558    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59561  fi
59562
59563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59564
59565  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59566  has_colon=`$ECHO $path | $GREP ^.:`
59567  new_path="$path"
59568  if test "x$has_colon" = x; then
59569    # Not in mixed or Windows style, start by that.
59570    new_path=`cmd //c echo $path`
59571  fi
59572
59573
59574  input_path="$new_path"
59575  # Check if we need to convert this using DOS-style short mode. If the path
59576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59577  # take no chances and rewrite it.
59578  # Note: m4 eats our [], so we need to use [ and ] instead.
59579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59580  if test "x$has_forbidden_chars" != x; then
59581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59583  fi
59584
59585
59586  windows_path="$new_path"
59587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59588    unix_path=`$CYGPATH -u "$windows_path"`
59589    new_path="$unix_path"
59590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59592    new_path="$unix_path"
59593  fi
59594
59595  if test "x$path" != "x$new_path"; then
59596    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59599  fi
59600
59601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59603
59604    else
59605      # We're on a unix platform. Hooray! :)
59606      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59607      has_space=`$ECHO "$path" | $GREP " "`
59608      if test "x$has_space" != x; then
59609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59610$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59612      fi
59613
59614      # Use eval to expand a potential ~
59615      eval path="$path"
59616      if test ! -f "$path" && test ! -d "$path"; then
59617        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59618      fi
59619
59620      if test -d "$path"; then
59621        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59622      else
59623        dir="`$DIRNAME "$path"`"
59624        base="`$BASENAME "$path"`"
59625        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59626      fi
59627    fi
59628  fi
59629
59630
59631  # Only process if variable expands to non-empty
59632
59633  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59634    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59635
59636  # Input might be given as Windows format, start by converting to
59637  # unix format.
59638  path="$POTENTIAL_FREETYPE_LIB_PATH"
59639  new_path=`$CYGPATH -u "$path"`
59640
59641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59644  # "foo.exe" is OK but "foo" is an error.
59645  #
59646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59647  # It is also a way to make sure we got the proper file name for the real test later on.
59648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59649  if test "x$test_shortpath" = x; then
59650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59652    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59653  fi
59654
59655  # Call helper function which possibly converts this using DOS-style short mode.
59656  # If so, the updated path is stored in $new_path.
59657
59658  input_path="$new_path"
59659  # Check if we need to convert this using DOS-style short mode. If the path
59660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59661  # take no chances and rewrite it.
59662  # Note: m4 eats our [], so we need to use [ and ] instead.
59663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59664  if test "x$has_forbidden_chars" != x; then
59665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59669      # Going to short mode and back again did indeed matter. Since short mode is
59670      # case insensitive, let's make it lowercase to improve readability.
59671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59672      # Now convert it back to Unix-style (cygpath)
59673      input_path=`$CYGPATH -u "$shortmode_path"`
59674      new_path="$input_path"
59675    fi
59676  fi
59677
59678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59679  if test "x$test_cygdrive_prefix" = x; then
59680    # As a simple fix, exclude /usr/bin since it's not a real path.
59681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59683      # a path prefixed by /cygdrive for fixpath to work.
59684      new_path="$CYGWIN_ROOT_PATH$input_path"
59685    fi
59686  fi
59687
59688
59689  if test "x$path" != "x$new_path"; then
59690    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59693  fi
59694
59695    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59696
59697  path="$POTENTIAL_FREETYPE_LIB_PATH"
59698  has_colon=`$ECHO $path | $GREP ^.:`
59699  new_path="$path"
59700  if test "x$has_colon" = x; then
59701    # Not in mixed or Windows style, start by that.
59702    new_path=`cmd //c echo $path`
59703  fi
59704
59705
59706  input_path="$new_path"
59707  # Check if we need to convert this using DOS-style short mode. If the path
59708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59709  # take no chances and rewrite it.
59710  # Note: m4 eats our [], so we need to use [ and ] instead.
59711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59712  if test "x$has_forbidden_chars" != x; then
59713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59715  fi
59716
59717
59718  windows_path="$new_path"
59719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59720    unix_path=`$CYGPATH -u "$windows_path"`
59721    new_path="$unix_path"
59722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59724    new_path="$unix_path"
59725  fi
59726
59727  if test "x$path" != "x$new_path"; then
59728    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59731  fi
59732
59733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59735
59736    else
59737      # We're on a unix platform. Hooray! :)
59738      path="$POTENTIAL_FREETYPE_LIB_PATH"
59739      has_space=`$ECHO "$path" | $GREP " "`
59740      if test "x$has_space" != x; then
59741        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59742$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59743        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59744      fi
59745
59746      # Use eval to expand a potential ~
59747      eval path="$path"
59748      if test ! -f "$path" && test ! -d "$path"; then
59749        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59750      fi
59751
59752      if test -d "$path"; then
59753        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59754      else
59755        dir="`$DIRNAME "$path"`"
59756        base="`$BASENAME "$path"`"
59757        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59758      fi
59759    fi
59760  fi
59761
59762
59763    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59765$as_echo_n "checking for freetype includes... " >&6; }
59766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59767$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59768    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59769    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59770$as_echo_n "checking for freetype libraries... " >&6; }
59771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59772$as_echo "$FREETYPE_LIB_PATH" >&6; }
59773  fi
59774
59775              fi
59776            fi
59777          fi
59778        else
59779          FREETYPE_BASE_DIR="$SYSROOT/usr"
59780
59781  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59782  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59783  METHOD="well-known location"
59784
59785  # Let's start with an optimistic view of the world :-)
59786  FOUND_FREETYPE=yes
59787
59788  # First look for the canonical freetype main include file ft2build.h.
59789  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59790    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59791    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59792    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59793      # Fail.
59794      FOUND_FREETYPE=no
59795    fi
59796  fi
59797
59798  if test "x$FOUND_FREETYPE" = xyes; then
59799    # Include file found, let's continue the sanity check.
59800    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59801$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59802
59803    # Reset to default value
59804    FREETYPE_BASE_NAME=freetype
59805    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59806    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59807      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59808          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59809        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59810        # for the .6 version explicitly.
59811        FREETYPE_BASE_NAME=freetype.6
59812        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59813        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59814$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59815      else
59816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59817$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59818        FOUND_FREETYPE=no
59819      fi
59820    else
59821      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59822        # On Windows, we will need both .lib and .dll file.
59823        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59824          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59825$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59826          FOUND_FREETYPE=no
59827        fi
59828      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59829          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59830        # Found lib in isa dir, use that instead.
59831        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59832        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59833$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59834      fi
59835    fi
59836  fi
59837
59838  if test "x$FOUND_FREETYPE" = xyes; then
59839
59840  # Only process if variable expands to non-empty
59841
59842  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59844
59845  # Input might be given as Windows format, start by converting to
59846  # unix format.
59847  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59848  new_path=`$CYGPATH -u "$path"`
59849
59850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59853  # "foo.exe" is OK but "foo" is an error.
59854  #
59855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59856  # It is also a way to make sure we got the proper file name for the real test later on.
59857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59858  if test "x$test_shortpath" = x; then
59859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59861    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59862  fi
59863
59864  # Call helper function which possibly converts this using DOS-style short mode.
59865  # If so, the updated path is stored in $new_path.
59866
59867  input_path="$new_path"
59868  # Check if we need to convert this using DOS-style short mode. If the path
59869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59870  # take no chances and rewrite it.
59871  # Note: m4 eats our [], so we need to use [ and ] instead.
59872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59873  if test "x$has_forbidden_chars" != x; then
59874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59878      # Going to short mode and back again did indeed matter. Since short mode is
59879      # case insensitive, let's make it lowercase to improve readability.
59880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59881      # Now convert it back to Unix-style (cygpath)
59882      input_path=`$CYGPATH -u "$shortmode_path"`
59883      new_path="$input_path"
59884    fi
59885  fi
59886
59887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59888  if test "x$test_cygdrive_prefix" = x; then
59889    # As a simple fix, exclude /usr/bin since it's not a real path.
59890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59892      # a path prefixed by /cygdrive for fixpath to work.
59893      new_path="$CYGWIN_ROOT_PATH$input_path"
59894    fi
59895  fi
59896
59897
59898  if test "x$path" != "x$new_path"; then
59899    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59901$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59902  fi
59903
59904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59905
59906  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59907  has_colon=`$ECHO $path | $GREP ^.:`
59908  new_path="$path"
59909  if test "x$has_colon" = x; then
59910    # Not in mixed or Windows style, start by that.
59911    new_path=`cmd //c echo $path`
59912  fi
59913
59914
59915  input_path="$new_path"
59916  # Check if we need to convert this using DOS-style short mode. If the path
59917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59918  # take no chances and rewrite it.
59919  # Note: m4 eats our [], so we need to use [ and ] instead.
59920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59921  if test "x$has_forbidden_chars" != x; then
59922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59924  fi
59925
59926
59927  windows_path="$new_path"
59928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59929    unix_path=`$CYGPATH -u "$windows_path"`
59930    new_path="$unix_path"
59931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59933    new_path="$unix_path"
59934  fi
59935
59936  if test "x$path" != "x$new_path"; then
59937    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59939$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59940  fi
59941
59942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59944
59945    else
59946      # We're on a unix platform. Hooray! :)
59947      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59948      has_space=`$ECHO "$path" | $GREP " "`
59949      if test "x$has_space" != x; then
59950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59951$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59953      fi
59954
59955      # Use eval to expand a potential ~
59956      eval path="$path"
59957      if test ! -f "$path" && test ! -d "$path"; then
59958        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59959      fi
59960
59961      if test -d "$path"; then
59962        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59963      else
59964        dir="`$DIRNAME "$path"`"
59965        base="`$BASENAME "$path"`"
59966        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59967      fi
59968    fi
59969  fi
59970
59971
59972  # Only process if variable expands to non-empty
59973
59974  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59975    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59976
59977  # Input might be given as Windows format, start by converting to
59978  # unix format.
59979  path="$POTENTIAL_FREETYPE_LIB_PATH"
59980  new_path=`$CYGPATH -u "$path"`
59981
59982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59985  # "foo.exe" is OK but "foo" is an error.
59986  #
59987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59988  # It is also a way to make sure we got the proper file name for the real test later on.
59989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59990  if test "x$test_shortpath" = x; then
59991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59993    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59994  fi
59995
59996  # Call helper function which possibly converts this using DOS-style short mode.
59997  # If so, the updated path is stored in $new_path.
59998
59999  input_path="$new_path"
60000  # Check if we need to convert this using DOS-style short mode. If the path
60001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60002  # take no chances and rewrite it.
60003  # Note: m4 eats our [], so we need to use [ and ] instead.
60004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60005  if test "x$has_forbidden_chars" != x; then
60006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60010      # Going to short mode and back again did indeed matter. Since short mode is
60011      # case insensitive, let's make it lowercase to improve readability.
60012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60013      # Now convert it back to Unix-style (cygpath)
60014      input_path=`$CYGPATH -u "$shortmode_path"`
60015      new_path="$input_path"
60016    fi
60017  fi
60018
60019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60020  if test "x$test_cygdrive_prefix" = x; then
60021    # As a simple fix, exclude /usr/bin since it's not a real path.
60022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60024      # a path prefixed by /cygdrive for fixpath to work.
60025      new_path="$CYGWIN_ROOT_PATH$input_path"
60026    fi
60027  fi
60028
60029
60030  if test "x$path" != "x$new_path"; then
60031    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60033$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60034  fi
60035
60036    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60037
60038  path="$POTENTIAL_FREETYPE_LIB_PATH"
60039  has_colon=`$ECHO $path | $GREP ^.:`
60040  new_path="$path"
60041  if test "x$has_colon" = x; then
60042    # Not in mixed or Windows style, start by that.
60043    new_path=`cmd //c echo $path`
60044  fi
60045
60046
60047  input_path="$new_path"
60048  # Check if we need to convert this using DOS-style short mode. If the path
60049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60050  # take no chances and rewrite it.
60051  # Note: m4 eats our [], so we need to use [ and ] instead.
60052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60053  if test "x$has_forbidden_chars" != x; then
60054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60056  fi
60057
60058
60059  windows_path="$new_path"
60060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60061    unix_path=`$CYGPATH -u "$windows_path"`
60062    new_path="$unix_path"
60063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60065    new_path="$unix_path"
60066  fi
60067
60068  if test "x$path" != "x$new_path"; then
60069    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60071$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60072  fi
60073
60074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60076
60077    else
60078      # We're on a unix platform. Hooray! :)
60079      path="$POTENTIAL_FREETYPE_LIB_PATH"
60080      has_space=`$ECHO "$path" | $GREP " "`
60081      if test "x$has_space" != x; then
60082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60083$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60084        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60085      fi
60086
60087      # Use eval to expand a potential ~
60088      eval path="$path"
60089      if test ! -f "$path" && test ! -d "$path"; then
60090        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60091      fi
60092
60093      if test -d "$path"; then
60094        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60095      else
60096        dir="`$DIRNAME "$path"`"
60097        base="`$BASENAME "$path"`"
60098        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60099      fi
60100    fi
60101  fi
60102
60103
60104    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60106$as_echo_n "checking for freetype includes... " >&6; }
60107    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60108$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60109    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60111$as_echo_n "checking for freetype libraries... " >&6; }
60112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60113$as_echo "$FREETYPE_LIB_PATH" >&6; }
60114  fi
60115
60116
60117          if test "x$FOUND_FREETYPE" != xyes; then
60118            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60119
60120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60122  METHOD="well-known location"
60123
60124  # Let's start with an optimistic view of the world :-)
60125  FOUND_FREETYPE=yes
60126
60127  # First look for the canonical freetype main include file ft2build.h.
60128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60132      # Fail.
60133      FOUND_FREETYPE=no
60134    fi
60135  fi
60136
60137  if test "x$FOUND_FREETYPE" = xyes; then
60138    # Include file found, let's continue the sanity check.
60139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60141
60142    # Reset to default value
60143    FREETYPE_BASE_NAME=freetype
60144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60149        # for the .6 version explicitly.
60150        FREETYPE_BASE_NAME=freetype.6
60151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60154      else
60155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60157        FOUND_FREETYPE=no
60158      fi
60159    else
60160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60161        # On Windows, we will need both .lib and .dll file.
60162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60165          FOUND_FREETYPE=no
60166        fi
60167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60169        # Found lib in isa dir, use that instead.
60170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60173      fi
60174    fi
60175  fi
60176
60177  if test "x$FOUND_FREETYPE" = xyes; then
60178
60179  # Only process if variable expands to non-empty
60180
60181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60183
60184  # Input might be given as Windows format, start by converting to
60185  # unix format.
60186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60187  new_path=`$CYGPATH -u "$path"`
60188
60189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60192  # "foo.exe" is OK but "foo" is an error.
60193  #
60194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60195  # It is also a way to make sure we got the proper file name for the real test later on.
60196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60197  if test "x$test_shortpath" = x; then
60198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60201  fi
60202
60203  # Call helper function which possibly converts this using DOS-style short mode.
60204  # If so, the updated path is stored in $new_path.
60205
60206  input_path="$new_path"
60207  # Check if we need to convert this using DOS-style short mode. If the path
60208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60209  # take no chances and rewrite it.
60210  # Note: m4 eats our [], so we need to use [ and ] instead.
60211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60212  if test "x$has_forbidden_chars" != x; then
60213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60217      # Going to short mode and back again did indeed matter. Since short mode is
60218      # case insensitive, let's make it lowercase to improve readability.
60219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60220      # Now convert it back to Unix-style (cygpath)
60221      input_path=`$CYGPATH -u "$shortmode_path"`
60222      new_path="$input_path"
60223    fi
60224  fi
60225
60226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60227  if test "x$test_cygdrive_prefix" = x; then
60228    # As a simple fix, exclude /usr/bin since it's not a real path.
60229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60231      # a path prefixed by /cygdrive for fixpath to work.
60232      new_path="$CYGWIN_ROOT_PATH$input_path"
60233    fi
60234  fi
60235
60236
60237  if test "x$path" != "x$new_path"; then
60238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60241  fi
60242
60243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60244
60245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60246  has_colon=`$ECHO $path | $GREP ^.:`
60247  new_path="$path"
60248  if test "x$has_colon" = x; then
60249    # Not in mixed or Windows style, start by that.
60250    new_path=`cmd //c echo $path`
60251  fi
60252
60253
60254  input_path="$new_path"
60255  # Check if we need to convert this using DOS-style short mode. If the path
60256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60257  # take no chances and rewrite it.
60258  # Note: m4 eats our [], so we need to use [ and ] instead.
60259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60260  if test "x$has_forbidden_chars" != x; then
60261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60263  fi
60264
60265
60266  windows_path="$new_path"
60267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60268    unix_path=`$CYGPATH -u "$windows_path"`
60269    new_path="$unix_path"
60270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60272    new_path="$unix_path"
60273  fi
60274
60275  if test "x$path" != "x$new_path"; then
60276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60279  fi
60280
60281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60283
60284    else
60285      # We're on a unix platform. Hooray! :)
60286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60287      has_space=`$ECHO "$path" | $GREP " "`
60288      if test "x$has_space" != x; then
60289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60292      fi
60293
60294      # Use eval to expand a potential ~
60295      eval path="$path"
60296      if test ! -f "$path" && test ! -d "$path"; then
60297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60298      fi
60299
60300      if test -d "$path"; then
60301        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60302      else
60303        dir="`$DIRNAME "$path"`"
60304        base="`$BASENAME "$path"`"
60305        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60306      fi
60307    fi
60308  fi
60309
60310
60311  # Only process if variable expands to non-empty
60312
60313  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60315
60316  # Input might be given as Windows format, start by converting to
60317  # unix format.
60318  path="$POTENTIAL_FREETYPE_LIB_PATH"
60319  new_path=`$CYGPATH -u "$path"`
60320
60321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60324  # "foo.exe" is OK but "foo" is an error.
60325  #
60326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60327  # It is also a way to make sure we got the proper file name for the real test later on.
60328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60329  if test "x$test_shortpath" = x; then
60330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60331$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60332    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60333  fi
60334
60335  # Call helper function which possibly converts this using DOS-style short mode.
60336  # If so, the updated path is stored in $new_path.
60337
60338  input_path="$new_path"
60339  # Check if we need to convert this using DOS-style short mode. If the path
60340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60341  # take no chances and rewrite it.
60342  # Note: m4 eats our [], so we need to use [ and ] instead.
60343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60344  if test "x$has_forbidden_chars" != x; then
60345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60349      # Going to short mode and back again did indeed matter. Since short mode is
60350      # case insensitive, let's make it lowercase to improve readability.
60351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60352      # Now convert it back to Unix-style (cygpath)
60353      input_path=`$CYGPATH -u "$shortmode_path"`
60354      new_path="$input_path"
60355    fi
60356  fi
60357
60358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60359  if test "x$test_cygdrive_prefix" = x; then
60360    # As a simple fix, exclude /usr/bin since it's not a real path.
60361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60363      # a path prefixed by /cygdrive for fixpath to work.
60364      new_path="$CYGWIN_ROOT_PATH$input_path"
60365    fi
60366  fi
60367
60368
60369  if test "x$path" != "x$new_path"; then
60370    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60372$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60373  fi
60374
60375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60376
60377  path="$POTENTIAL_FREETYPE_LIB_PATH"
60378  has_colon=`$ECHO $path | $GREP ^.:`
60379  new_path="$path"
60380  if test "x$has_colon" = x; then
60381    # Not in mixed or Windows style, start by that.
60382    new_path=`cmd //c echo $path`
60383  fi
60384
60385
60386  input_path="$new_path"
60387  # Check if we need to convert this using DOS-style short mode. If the path
60388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60389  # take no chances and rewrite it.
60390  # Note: m4 eats our [], so we need to use [ and ] instead.
60391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60392  if test "x$has_forbidden_chars" != x; then
60393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60395  fi
60396
60397
60398  windows_path="$new_path"
60399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60400    unix_path=`$CYGPATH -u "$windows_path"`
60401    new_path="$unix_path"
60402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60404    new_path="$unix_path"
60405  fi
60406
60407  if test "x$path" != "x$new_path"; then
60408    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60410$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60411  fi
60412
60413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60415
60416    else
60417      # We're on a unix platform. Hooray! :)
60418      path="$POTENTIAL_FREETYPE_LIB_PATH"
60419      has_space=`$ECHO "$path" | $GREP " "`
60420      if test "x$has_space" != x; then
60421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60424      fi
60425
60426      # Use eval to expand a potential ~
60427      eval path="$path"
60428      if test ! -f "$path" && test ! -d "$path"; then
60429        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60430      fi
60431
60432      if test -d "$path"; then
60433        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60434      else
60435        dir="`$DIRNAME "$path"`"
60436        base="`$BASENAME "$path"`"
60437        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60438      fi
60439    fi
60440  fi
60441
60442
60443    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60445$as_echo_n "checking for freetype includes... " >&6; }
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60447$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60448    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60450$as_echo_n "checking for freetype libraries... " >&6; }
60451    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60452$as_echo "$FREETYPE_LIB_PATH" >&6; }
60453  fi
60454
60455          fi
60456
60457          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60458            if test "x$FOUND_FREETYPE" != xyes; then
60459              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60460              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60461
60462  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60463  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60464  METHOD="well-known location"
60465
60466  # Let's start with an optimistic view of the world :-)
60467  FOUND_FREETYPE=yes
60468
60469  # First look for the canonical freetype main include file ft2build.h.
60470  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60471    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60472    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60473    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60474      # Fail.
60475      FOUND_FREETYPE=no
60476    fi
60477  fi
60478
60479  if test "x$FOUND_FREETYPE" = xyes; then
60480    # Include file found, let's continue the sanity check.
60481    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60482$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60483
60484    # Reset to default value
60485    FREETYPE_BASE_NAME=freetype
60486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60488      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60489          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60490        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60491        # for the .6 version explicitly.
60492        FREETYPE_BASE_NAME=freetype.6
60493        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60494        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60495$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60496      else
60497        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60498$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60499        FOUND_FREETYPE=no
60500      fi
60501    else
60502      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60503        # On Windows, we will need both .lib and .dll file.
60504        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60505          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60506$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60507          FOUND_FREETYPE=no
60508        fi
60509      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60510          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60511        # Found lib in isa dir, use that instead.
60512        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60513        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60514$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60515      fi
60516    fi
60517  fi
60518
60519  if test "x$FOUND_FREETYPE" = xyes; then
60520
60521  # Only process if variable expands to non-empty
60522
60523  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60525
60526  # Input might be given as Windows format, start by converting to
60527  # unix format.
60528  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60529  new_path=`$CYGPATH -u "$path"`
60530
60531  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60532  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60533  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60534  # "foo.exe" is OK but "foo" is an error.
60535  #
60536  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60537  # It is also a way to make sure we got the proper file name for the real test later on.
60538  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60539  if test "x$test_shortpath" = x; then
60540    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60541$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60542    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60543  fi
60544
60545  # Call helper function which possibly converts this using DOS-style short mode.
60546  # If so, the updated path is stored in $new_path.
60547
60548  input_path="$new_path"
60549  # Check if we need to convert this using DOS-style short mode. If the path
60550  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60551  # take no chances and rewrite it.
60552  # Note: m4 eats our [], so we need to use [ and ] instead.
60553  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60554  if test "x$has_forbidden_chars" != x; then
60555    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60556    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60557    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60558    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60559      # Going to short mode and back again did indeed matter. Since short mode is
60560      # case insensitive, let's make it lowercase to improve readability.
60561      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60562      # Now convert it back to Unix-style (cygpath)
60563      input_path=`$CYGPATH -u "$shortmode_path"`
60564      new_path="$input_path"
60565    fi
60566  fi
60567
60568  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60569  if test "x$test_cygdrive_prefix" = x; then
60570    # As a simple fix, exclude /usr/bin since it's not a real path.
60571    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60572      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60573      # a path prefixed by /cygdrive for fixpath to work.
60574      new_path="$CYGWIN_ROOT_PATH$input_path"
60575    fi
60576  fi
60577
60578
60579  if test "x$path" != "x$new_path"; then
60580    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60582$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60583  fi
60584
60585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60586
60587  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60588  has_colon=`$ECHO $path | $GREP ^.:`
60589  new_path="$path"
60590  if test "x$has_colon" = x; then
60591    # Not in mixed or Windows style, start by that.
60592    new_path=`cmd //c echo $path`
60593  fi
60594
60595
60596  input_path="$new_path"
60597  # Check if we need to convert this using DOS-style short mode. If the path
60598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60599  # take no chances and rewrite it.
60600  # Note: m4 eats our [], so we need to use [ and ] instead.
60601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60602  if test "x$has_forbidden_chars" != x; then
60603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60604    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60605  fi
60606
60607
60608  windows_path="$new_path"
60609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60610    unix_path=`$CYGPATH -u "$windows_path"`
60611    new_path="$unix_path"
60612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60614    new_path="$unix_path"
60615  fi
60616
60617  if test "x$path" != "x$new_path"; then
60618    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60621  fi
60622
60623  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60624  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60625
60626    else
60627      # We're on a unix platform. Hooray! :)
60628      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60629      has_space=`$ECHO "$path" | $GREP " "`
60630      if test "x$has_space" != x; then
60631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60632$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60633        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60634      fi
60635
60636      # Use eval to expand a potential ~
60637      eval path="$path"
60638      if test ! -f "$path" && test ! -d "$path"; then
60639        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60640      fi
60641
60642      if test -d "$path"; then
60643        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60644      else
60645        dir="`$DIRNAME "$path"`"
60646        base="`$BASENAME "$path"`"
60647        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60648      fi
60649    fi
60650  fi
60651
60652
60653  # Only process if variable expands to non-empty
60654
60655  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60657
60658  # Input might be given as Windows format, start by converting to
60659  # unix format.
60660  path="$POTENTIAL_FREETYPE_LIB_PATH"
60661  new_path=`$CYGPATH -u "$path"`
60662
60663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60666  # "foo.exe" is OK but "foo" is an error.
60667  #
60668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60669  # It is also a way to make sure we got the proper file name for the real test later on.
60670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60671  if test "x$test_shortpath" = x; then
60672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60673$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60674    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60675  fi
60676
60677  # Call helper function which possibly converts this using DOS-style short mode.
60678  # If so, the updated path is stored in $new_path.
60679
60680  input_path="$new_path"
60681  # Check if we need to convert this using DOS-style short mode. If the path
60682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60683  # take no chances and rewrite it.
60684  # Note: m4 eats our [], so we need to use [ and ] instead.
60685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60686  if test "x$has_forbidden_chars" != x; then
60687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60691      # Going to short mode and back again did indeed matter. Since short mode is
60692      # case insensitive, let's make it lowercase to improve readability.
60693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60694      # Now convert it back to Unix-style (cygpath)
60695      input_path=`$CYGPATH -u "$shortmode_path"`
60696      new_path="$input_path"
60697    fi
60698  fi
60699
60700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60701  if test "x$test_cygdrive_prefix" = x; then
60702    # As a simple fix, exclude /usr/bin since it's not a real path.
60703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60705      # a path prefixed by /cygdrive for fixpath to work.
60706      new_path="$CYGWIN_ROOT_PATH$input_path"
60707    fi
60708  fi
60709
60710
60711  if test "x$path" != "x$new_path"; then
60712    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60715  fi
60716
60717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60718
60719  path="$POTENTIAL_FREETYPE_LIB_PATH"
60720  has_colon=`$ECHO $path | $GREP ^.:`
60721  new_path="$path"
60722  if test "x$has_colon" = x; then
60723    # Not in mixed or Windows style, start by that.
60724    new_path=`cmd //c echo $path`
60725  fi
60726
60727
60728  input_path="$new_path"
60729  # Check if we need to convert this using DOS-style short mode. If the path
60730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60731  # take no chances and rewrite it.
60732  # Note: m4 eats our [], so we need to use [ and ] instead.
60733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60734  if test "x$has_forbidden_chars" != x; then
60735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60737  fi
60738
60739
60740  windows_path="$new_path"
60741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60742    unix_path=`$CYGPATH -u "$windows_path"`
60743    new_path="$unix_path"
60744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60746    new_path="$unix_path"
60747  fi
60748
60749  if test "x$path" != "x$new_path"; then
60750    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60752$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60753  fi
60754
60755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60757
60758    else
60759      # We're on a unix platform. Hooray! :)
60760      path="$POTENTIAL_FREETYPE_LIB_PATH"
60761      has_space=`$ECHO "$path" | $GREP " "`
60762      if test "x$has_space" != x; then
60763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60764$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60766      fi
60767
60768      # Use eval to expand a potential ~
60769      eval path="$path"
60770      if test ! -f "$path" && test ! -d "$path"; then
60771        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60772      fi
60773
60774      if test -d "$path"; then
60775        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60776      else
60777        dir="`$DIRNAME "$path"`"
60778        base="`$BASENAME "$path"`"
60779        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60780      fi
60781    fi
60782  fi
60783
60784
60785    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60787$as_echo_n "checking for freetype includes... " >&6; }
60788    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60789$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60790    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60792$as_echo_n "checking for freetype libraries... " >&6; }
60793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60794$as_echo "$FREETYPE_LIB_PATH" >&6; }
60795  fi
60796
60797            fi
60798          fi
60799
60800          if test "x$FOUND_FREETYPE" != xyes; then
60801            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60802
60803  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60804  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60805  METHOD="well-known location"
60806
60807  # Let's start with an optimistic view of the world :-)
60808  FOUND_FREETYPE=yes
60809
60810  # First look for the canonical freetype main include file ft2build.h.
60811  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60812    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60813    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60814    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60815      # Fail.
60816      FOUND_FREETYPE=no
60817    fi
60818  fi
60819
60820  if test "x$FOUND_FREETYPE" = xyes; then
60821    # Include file found, let's continue the sanity check.
60822    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60823$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60824
60825    # Reset to default value
60826    FREETYPE_BASE_NAME=freetype
60827    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60828    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60829      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60830          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60831        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60832        # for the .6 version explicitly.
60833        FREETYPE_BASE_NAME=freetype.6
60834        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60835        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60836$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60837      else
60838        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60839$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60840        FOUND_FREETYPE=no
60841      fi
60842    else
60843      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60844        # On Windows, we will need both .lib and .dll file.
60845        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60846          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60848          FOUND_FREETYPE=no
60849        fi
60850      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60851          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60852        # Found lib in isa dir, use that instead.
60853        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60854        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60855$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60856      fi
60857    fi
60858  fi
60859
60860  if test "x$FOUND_FREETYPE" = xyes; then
60861
60862  # Only process if variable expands to non-empty
60863
60864  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60866
60867  # Input might be given as Windows format, start by converting to
60868  # unix format.
60869  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60870  new_path=`$CYGPATH -u "$path"`
60871
60872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60875  # "foo.exe" is OK but "foo" is an error.
60876  #
60877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60878  # It is also a way to make sure we got the proper file name for the real test later on.
60879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60880  if test "x$test_shortpath" = x; then
60881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60882$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60883    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60884  fi
60885
60886  # Call helper function which possibly converts this using DOS-style short mode.
60887  # If so, the updated path is stored in $new_path.
60888
60889  input_path="$new_path"
60890  # Check if we need to convert this using DOS-style short mode. If the path
60891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60892  # take no chances and rewrite it.
60893  # Note: m4 eats our [], so we need to use [ and ] instead.
60894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60895  if test "x$has_forbidden_chars" != x; then
60896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60900      # Going to short mode and back again did indeed matter. Since short mode is
60901      # case insensitive, let's make it lowercase to improve readability.
60902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60903      # Now convert it back to Unix-style (cygpath)
60904      input_path=`$CYGPATH -u "$shortmode_path"`
60905      new_path="$input_path"
60906    fi
60907  fi
60908
60909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60910  if test "x$test_cygdrive_prefix" = x; then
60911    # As a simple fix, exclude /usr/bin since it's not a real path.
60912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60914      # a path prefixed by /cygdrive for fixpath to work.
60915      new_path="$CYGWIN_ROOT_PATH$input_path"
60916    fi
60917  fi
60918
60919
60920  if test "x$path" != "x$new_path"; then
60921    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60924  fi
60925
60926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60927
60928  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60929  has_colon=`$ECHO $path | $GREP ^.:`
60930  new_path="$path"
60931  if test "x$has_colon" = x; then
60932    # Not in mixed or Windows style, start by that.
60933    new_path=`cmd //c echo $path`
60934  fi
60935
60936
60937  input_path="$new_path"
60938  # Check if we need to convert this using DOS-style short mode. If the path
60939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60940  # take no chances and rewrite it.
60941  # Note: m4 eats our [], so we need to use [ and ] instead.
60942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60943  if test "x$has_forbidden_chars" != x; then
60944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60946  fi
60947
60948
60949  windows_path="$new_path"
60950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60951    unix_path=`$CYGPATH -u "$windows_path"`
60952    new_path="$unix_path"
60953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60955    new_path="$unix_path"
60956  fi
60957
60958  if test "x$path" != "x$new_path"; then
60959    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60962  fi
60963
60964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60966
60967    else
60968      # We're on a unix platform. Hooray! :)
60969      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60970      has_space=`$ECHO "$path" | $GREP " "`
60971      if test "x$has_space" != x; then
60972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60973$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60975      fi
60976
60977      # Use eval to expand a potential ~
60978      eval path="$path"
60979      if test ! -f "$path" && test ! -d "$path"; then
60980        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60981      fi
60982
60983      if test -d "$path"; then
60984        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60985      else
60986        dir="`$DIRNAME "$path"`"
60987        base="`$BASENAME "$path"`"
60988        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60989      fi
60990    fi
60991  fi
60992
60993
60994  # Only process if variable expands to non-empty
60995
60996  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60998
60999  # Input might be given as Windows format, start by converting to
61000  # unix format.
61001  path="$POTENTIAL_FREETYPE_LIB_PATH"
61002  new_path=`$CYGPATH -u "$path"`
61003
61004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61007  # "foo.exe" is OK but "foo" is an error.
61008  #
61009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61010  # It is also a way to make sure we got the proper file name for the real test later on.
61011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61012  if test "x$test_shortpath" = x; then
61013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61015    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61016  fi
61017
61018  # Call helper function which possibly converts this using DOS-style short mode.
61019  # If so, the updated path is stored in $new_path.
61020
61021  input_path="$new_path"
61022  # Check if we need to convert this using DOS-style short mode. If the path
61023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61024  # take no chances and rewrite it.
61025  # Note: m4 eats our [], so we need to use [ and ] instead.
61026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61027  if test "x$has_forbidden_chars" != x; then
61028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61032      # Going to short mode and back again did indeed matter. Since short mode is
61033      # case insensitive, let's make it lowercase to improve readability.
61034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61035      # Now convert it back to Unix-style (cygpath)
61036      input_path=`$CYGPATH -u "$shortmode_path"`
61037      new_path="$input_path"
61038    fi
61039  fi
61040
61041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61042  if test "x$test_cygdrive_prefix" = x; then
61043    # As a simple fix, exclude /usr/bin since it's not a real path.
61044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61046      # a path prefixed by /cygdrive for fixpath to work.
61047      new_path="$CYGWIN_ROOT_PATH$input_path"
61048    fi
61049  fi
61050
61051
61052  if test "x$path" != "x$new_path"; then
61053    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61055$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61056  fi
61057
61058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61059
61060  path="$POTENTIAL_FREETYPE_LIB_PATH"
61061  has_colon=`$ECHO $path | $GREP ^.:`
61062  new_path="$path"
61063  if test "x$has_colon" = x; then
61064    # Not in mixed or Windows style, start by that.
61065    new_path=`cmd //c echo $path`
61066  fi
61067
61068
61069  input_path="$new_path"
61070  # Check if we need to convert this using DOS-style short mode. If the path
61071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61072  # take no chances and rewrite it.
61073  # Note: m4 eats our [], so we need to use [ and ] instead.
61074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61075  if test "x$has_forbidden_chars" != x; then
61076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61078  fi
61079
61080
61081  windows_path="$new_path"
61082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61083    unix_path=`$CYGPATH -u "$windows_path"`
61084    new_path="$unix_path"
61085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61087    new_path="$unix_path"
61088  fi
61089
61090  if test "x$path" != "x$new_path"; then
61091    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61093$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61094  fi
61095
61096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61098
61099    else
61100      # We're on a unix platform. Hooray! :)
61101      path="$POTENTIAL_FREETYPE_LIB_PATH"
61102      has_space=`$ECHO "$path" | $GREP " "`
61103      if test "x$has_space" != x; then
61104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61105$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61107      fi
61108
61109      # Use eval to expand a potential ~
61110      eval path="$path"
61111      if test ! -f "$path" && test ! -d "$path"; then
61112        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61113      fi
61114
61115      if test -d "$path"; then
61116        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61117      else
61118        dir="`$DIRNAME "$path"`"
61119        base="`$BASENAME "$path"`"
61120        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61121      fi
61122    fi
61123  fi
61124
61125
61126    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61128$as_echo_n "checking for freetype includes... " >&6; }
61129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61130$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61131    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61132    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61133$as_echo_n "checking for freetype libraries... " >&6; }
61134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61135$as_echo "$FREETYPE_LIB_PATH" >&6; }
61136  fi
61137
61138          fi
61139
61140          if test "x$FOUND_FREETYPE" != xyes; then
61141            FREETYPE_BASE_DIR="$SYSROOT/usr"
61142            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61143
61144  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61145  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61146  METHOD="well-known location"
61147
61148  # Let's start with an optimistic view of the world :-)
61149  FOUND_FREETYPE=yes
61150
61151  # First look for the canonical freetype main include file ft2build.h.
61152  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61153    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61154    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61155    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61156      # Fail.
61157      FOUND_FREETYPE=no
61158    fi
61159  fi
61160
61161  if test "x$FOUND_FREETYPE" = xyes; then
61162    # Include file found, let's continue the sanity check.
61163    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61164$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61165
61166    # Reset to default value
61167    FREETYPE_BASE_NAME=freetype
61168    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61169    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61170      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61171          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61172        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61173        # for the .6 version explicitly.
61174        FREETYPE_BASE_NAME=freetype.6
61175        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61176        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61177$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61178      else
61179        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61180$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61181        FOUND_FREETYPE=no
61182      fi
61183    else
61184      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61185        # On Windows, we will need both .lib and .dll file.
61186        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61187          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61188$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61189          FOUND_FREETYPE=no
61190        fi
61191      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61192          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61193        # Found lib in isa dir, use that instead.
61194        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61195        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61196$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61197      fi
61198    fi
61199  fi
61200
61201  if test "x$FOUND_FREETYPE" = xyes; then
61202
61203  # Only process if variable expands to non-empty
61204
61205  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61206    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61207
61208  # Input might be given as Windows format, start by converting to
61209  # unix format.
61210  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61211  new_path=`$CYGPATH -u "$path"`
61212
61213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61216  # "foo.exe" is OK but "foo" is an error.
61217  #
61218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61219  # It is also a way to make sure we got the proper file name for the real test later on.
61220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61221  if test "x$test_shortpath" = x; then
61222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61223$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61224    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61225  fi
61226
61227  # Call helper function which possibly converts this using DOS-style short mode.
61228  # If so, the updated path is stored in $new_path.
61229
61230  input_path="$new_path"
61231  # Check if we need to convert this using DOS-style short mode. If the path
61232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61233  # take no chances and rewrite it.
61234  # Note: m4 eats our [], so we need to use [ and ] instead.
61235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61236  if test "x$has_forbidden_chars" != x; then
61237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61241      # Going to short mode and back again did indeed matter. Since short mode is
61242      # case insensitive, let's make it lowercase to improve readability.
61243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61244      # Now convert it back to Unix-style (cygpath)
61245      input_path=`$CYGPATH -u "$shortmode_path"`
61246      new_path="$input_path"
61247    fi
61248  fi
61249
61250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61251  if test "x$test_cygdrive_prefix" = x; then
61252    # As a simple fix, exclude /usr/bin since it's not a real path.
61253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61255      # a path prefixed by /cygdrive for fixpath to work.
61256      new_path="$CYGWIN_ROOT_PATH$input_path"
61257    fi
61258  fi
61259
61260
61261  if test "x$path" != "x$new_path"; then
61262    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61264$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61265  fi
61266
61267    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61268
61269  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61270  has_colon=`$ECHO $path | $GREP ^.:`
61271  new_path="$path"
61272  if test "x$has_colon" = x; then
61273    # Not in mixed or Windows style, start by that.
61274    new_path=`cmd //c echo $path`
61275  fi
61276
61277
61278  input_path="$new_path"
61279  # Check if we need to convert this using DOS-style short mode. If the path
61280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61281  # take no chances and rewrite it.
61282  # Note: m4 eats our [], so we need to use [ and ] instead.
61283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61284  if test "x$has_forbidden_chars" != x; then
61285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61287  fi
61288
61289
61290  windows_path="$new_path"
61291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61292    unix_path=`$CYGPATH -u "$windows_path"`
61293    new_path="$unix_path"
61294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61296    new_path="$unix_path"
61297  fi
61298
61299  if test "x$path" != "x$new_path"; then
61300    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61302$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61303  fi
61304
61305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61307
61308    else
61309      # We're on a unix platform. Hooray! :)
61310      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61311      has_space=`$ECHO "$path" | $GREP " "`
61312      if test "x$has_space" != x; then
61313        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61314$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61315        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61316      fi
61317
61318      # Use eval to expand a potential ~
61319      eval path="$path"
61320      if test ! -f "$path" && test ! -d "$path"; then
61321        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61322      fi
61323
61324      if test -d "$path"; then
61325        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61326      else
61327        dir="`$DIRNAME "$path"`"
61328        base="`$BASENAME "$path"`"
61329        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61330      fi
61331    fi
61332  fi
61333
61334
61335  # Only process if variable expands to non-empty
61336
61337  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61339
61340  # Input might be given as Windows format, start by converting to
61341  # unix format.
61342  path="$POTENTIAL_FREETYPE_LIB_PATH"
61343  new_path=`$CYGPATH -u "$path"`
61344
61345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61348  # "foo.exe" is OK but "foo" is an error.
61349  #
61350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61351  # It is also a way to make sure we got the proper file name for the real test later on.
61352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61353  if test "x$test_shortpath" = x; then
61354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61355$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61356    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61357  fi
61358
61359  # Call helper function which possibly converts this using DOS-style short mode.
61360  # If so, the updated path is stored in $new_path.
61361
61362  input_path="$new_path"
61363  # Check if we need to convert this using DOS-style short mode. If the path
61364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61365  # take no chances and rewrite it.
61366  # Note: m4 eats our [], so we need to use [ and ] instead.
61367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61368  if test "x$has_forbidden_chars" != x; then
61369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61373      # Going to short mode and back again did indeed matter. Since short mode is
61374      # case insensitive, let's make it lowercase to improve readability.
61375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61376      # Now convert it back to Unix-style (cygpath)
61377      input_path=`$CYGPATH -u "$shortmode_path"`
61378      new_path="$input_path"
61379    fi
61380  fi
61381
61382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61383  if test "x$test_cygdrive_prefix" = x; then
61384    # As a simple fix, exclude /usr/bin since it's not a real path.
61385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61387      # a path prefixed by /cygdrive for fixpath to work.
61388      new_path="$CYGWIN_ROOT_PATH$input_path"
61389    fi
61390  fi
61391
61392
61393  if test "x$path" != "x$new_path"; then
61394    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61396$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61397  fi
61398
61399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61400
61401  path="$POTENTIAL_FREETYPE_LIB_PATH"
61402  has_colon=`$ECHO $path | $GREP ^.:`
61403  new_path="$path"
61404  if test "x$has_colon" = x; then
61405    # Not in mixed or Windows style, start by that.
61406    new_path=`cmd //c echo $path`
61407  fi
61408
61409
61410  input_path="$new_path"
61411  # Check if we need to convert this using DOS-style short mode. If the path
61412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61413  # take no chances and rewrite it.
61414  # Note: m4 eats our [], so we need to use [ and ] instead.
61415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61416  if test "x$has_forbidden_chars" != x; then
61417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61419  fi
61420
61421
61422  windows_path="$new_path"
61423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61424    unix_path=`$CYGPATH -u "$windows_path"`
61425    new_path="$unix_path"
61426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61428    new_path="$unix_path"
61429  fi
61430
61431  if test "x$path" != "x$new_path"; then
61432    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61434$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61435  fi
61436
61437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61439
61440    else
61441      # We're on a unix platform. Hooray! :)
61442      path="$POTENTIAL_FREETYPE_LIB_PATH"
61443      has_space=`$ECHO "$path" | $GREP " "`
61444      if test "x$has_space" != x; then
61445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61446$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61448      fi
61449
61450      # Use eval to expand a potential ~
61451      eval path="$path"
61452      if test ! -f "$path" && test ! -d "$path"; then
61453        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61454      fi
61455
61456      if test -d "$path"; then
61457        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61458      else
61459        dir="`$DIRNAME "$path"`"
61460        base="`$BASENAME "$path"`"
61461        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61462      fi
61463    fi
61464  fi
61465
61466
61467    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61469$as_echo_n "checking for freetype includes... " >&6; }
61470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61471$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61472    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61473    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61474$as_echo_n "checking for freetype libraries... " >&6; }
61475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61476$as_echo "$FREETYPE_LIB_PATH" >&6; }
61477  fi
61478
61479            else
61480
61481  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61482  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61483  METHOD="well-known location"
61484
61485  # Let's start with an optimistic view of the world :-)
61486  FOUND_FREETYPE=yes
61487
61488  # First look for the canonical freetype main include file ft2build.h.
61489  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61490    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61491    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61492    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61493      # Fail.
61494      FOUND_FREETYPE=no
61495    fi
61496  fi
61497
61498  if test "x$FOUND_FREETYPE" = xyes; then
61499    # Include file found, let's continue the sanity check.
61500    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61501$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61502
61503    # Reset to default value
61504    FREETYPE_BASE_NAME=freetype
61505    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61506    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61507      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61508          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61509        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61510        # for the .6 version explicitly.
61511        FREETYPE_BASE_NAME=freetype.6
61512        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61513        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61514$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61515      else
61516        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61518        FOUND_FREETYPE=no
61519      fi
61520    else
61521      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61522        # On Windows, we will need both .lib and .dll file.
61523        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61524          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61525$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61526          FOUND_FREETYPE=no
61527        fi
61528      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61529          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61530        # Found lib in isa dir, use that instead.
61531        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61532        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61533$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61534      fi
61535    fi
61536  fi
61537
61538  if test "x$FOUND_FREETYPE" = xyes; then
61539
61540  # Only process if variable expands to non-empty
61541
61542  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61544
61545  # Input might be given as Windows format, start by converting to
61546  # unix format.
61547  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61548  new_path=`$CYGPATH -u "$path"`
61549
61550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61553  # "foo.exe" is OK but "foo" is an error.
61554  #
61555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61556  # It is also a way to make sure we got the proper file name for the real test later on.
61557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61558  if test "x$test_shortpath" = x; then
61559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61561    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61562  fi
61563
61564  # Call helper function which possibly converts this using DOS-style short mode.
61565  # If so, the updated path is stored in $new_path.
61566
61567  input_path="$new_path"
61568  # Check if we need to convert this using DOS-style short mode. If the path
61569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61570  # take no chances and rewrite it.
61571  # Note: m4 eats our [], so we need to use [ and ] instead.
61572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61573  if test "x$has_forbidden_chars" != x; then
61574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61578      # Going to short mode and back again did indeed matter. Since short mode is
61579      # case insensitive, let's make it lowercase to improve readability.
61580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61581      # Now convert it back to Unix-style (cygpath)
61582      input_path=`$CYGPATH -u "$shortmode_path"`
61583      new_path="$input_path"
61584    fi
61585  fi
61586
61587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61588  if test "x$test_cygdrive_prefix" = x; then
61589    # As a simple fix, exclude /usr/bin since it's not a real path.
61590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61592      # a path prefixed by /cygdrive for fixpath to work.
61593      new_path="$CYGWIN_ROOT_PATH$input_path"
61594    fi
61595  fi
61596
61597
61598  if test "x$path" != "x$new_path"; then
61599    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61602  fi
61603
61604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61605
61606  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61607  has_colon=`$ECHO $path | $GREP ^.:`
61608  new_path="$path"
61609  if test "x$has_colon" = x; then
61610    # Not in mixed or Windows style, start by that.
61611    new_path=`cmd //c echo $path`
61612  fi
61613
61614
61615  input_path="$new_path"
61616  # Check if we need to convert this using DOS-style short mode. If the path
61617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61618  # take no chances and rewrite it.
61619  # Note: m4 eats our [], so we need to use [ and ] instead.
61620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61621  if test "x$has_forbidden_chars" != x; then
61622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61624  fi
61625
61626
61627  windows_path="$new_path"
61628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61629    unix_path=`$CYGPATH -u "$windows_path"`
61630    new_path="$unix_path"
61631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61633    new_path="$unix_path"
61634  fi
61635
61636  if test "x$path" != "x$new_path"; then
61637    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61640  fi
61641
61642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61644
61645    else
61646      # We're on a unix platform. Hooray! :)
61647      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61648      has_space=`$ECHO "$path" | $GREP " "`
61649      if test "x$has_space" != x; then
61650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61653      fi
61654
61655      # Use eval to expand a potential ~
61656      eval path="$path"
61657      if test ! -f "$path" && test ! -d "$path"; then
61658        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61659      fi
61660
61661      if test -d "$path"; then
61662        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61663      else
61664        dir="`$DIRNAME "$path"`"
61665        base="`$BASENAME "$path"`"
61666        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61667      fi
61668    fi
61669  fi
61670
61671
61672  # Only process if variable expands to non-empty
61673
61674  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61676
61677  # Input might be given as Windows format, start by converting to
61678  # unix format.
61679  path="$POTENTIAL_FREETYPE_LIB_PATH"
61680  new_path=`$CYGPATH -u "$path"`
61681
61682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61685  # "foo.exe" is OK but "foo" is an error.
61686  #
61687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61688  # It is also a way to make sure we got the proper file name for the real test later on.
61689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61690  if test "x$test_shortpath" = x; then
61691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61692$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61693    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61694  fi
61695
61696  # Call helper function which possibly converts this using DOS-style short mode.
61697  # If so, the updated path is stored in $new_path.
61698
61699  input_path="$new_path"
61700  # Check if we need to convert this using DOS-style short mode. If the path
61701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61702  # take no chances and rewrite it.
61703  # Note: m4 eats our [], so we need to use [ and ] instead.
61704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61705  if test "x$has_forbidden_chars" != x; then
61706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61710      # Going to short mode and back again did indeed matter. Since short mode is
61711      # case insensitive, let's make it lowercase to improve readability.
61712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61713      # Now convert it back to Unix-style (cygpath)
61714      input_path=`$CYGPATH -u "$shortmode_path"`
61715      new_path="$input_path"
61716    fi
61717  fi
61718
61719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61720  if test "x$test_cygdrive_prefix" = x; then
61721    # As a simple fix, exclude /usr/bin since it's not a real path.
61722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61724      # a path prefixed by /cygdrive for fixpath to work.
61725      new_path="$CYGWIN_ROOT_PATH$input_path"
61726    fi
61727  fi
61728
61729
61730  if test "x$path" != "x$new_path"; then
61731    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61733$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61734  fi
61735
61736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61737
61738  path="$POTENTIAL_FREETYPE_LIB_PATH"
61739  has_colon=`$ECHO $path | $GREP ^.:`
61740  new_path="$path"
61741  if test "x$has_colon" = x; then
61742    # Not in mixed or Windows style, start by that.
61743    new_path=`cmd //c echo $path`
61744  fi
61745
61746
61747  input_path="$new_path"
61748  # Check if we need to convert this using DOS-style short mode. If the path
61749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61750  # take no chances and rewrite it.
61751  # Note: m4 eats our [], so we need to use [ and ] instead.
61752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61753  if test "x$has_forbidden_chars" != x; then
61754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61756  fi
61757
61758
61759  windows_path="$new_path"
61760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61761    unix_path=`$CYGPATH -u "$windows_path"`
61762    new_path="$unix_path"
61763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61765    new_path="$unix_path"
61766  fi
61767
61768  if test "x$path" != "x$new_path"; then
61769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61772  fi
61773
61774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61776
61777    else
61778      # We're on a unix platform. Hooray! :)
61779      path="$POTENTIAL_FREETYPE_LIB_PATH"
61780      has_space=`$ECHO "$path" | $GREP " "`
61781      if test "x$has_space" != x; then
61782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61783$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61785      fi
61786
61787      # Use eval to expand a potential ~
61788      eval path="$path"
61789      if test ! -f "$path" && test ! -d "$path"; then
61790        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61791      fi
61792
61793      if test -d "$path"; then
61794        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61795      else
61796        dir="`$DIRNAME "$path"`"
61797        base="`$BASENAME "$path"`"
61798        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61799      fi
61800    fi
61801  fi
61802
61803
61804    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61805    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61806$as_echo_n "checking for freetype includes... " >&6; }
61807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61808$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61809    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61811$as_echo_n "checking for freetype libraries... " >&6; }
61812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61813$as_echo "$FREETYPE_LIB_PATH" >&6; }
61814  fi
61815
61816              if test "x$FOUND_FREETYPE" != xyes; then
61817
61818  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61819  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61820  METHOD="well-known location"
61821
61822  # Let's start with an optimistic view of the world :-)
61823  FOUND_FREETYPE=yes
61824
61825  # First look for the canonical freetype main include file ft2build.h.
61826  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61827    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61828    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61829    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61830      # Fail.
61831      FOUND_FREETYPE=no
61832    fi
61833  fi
61834
61835  if test "x$FOUND_FREETYPE" = xyes; then
61836    # Include file found, let's continue the sanity check.
61837    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61838$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61839
61840    # Reset to default value
61841    FREETYPE_BASE_NAME=freetype
61842    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61843    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61844      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61845          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61846        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61847        # for the .6 version explicitly.
61848        FREETYPE_BASE_NAME=freetype.6
61849        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61850        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61851$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61852      else
61853        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61854$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61855        FOUND_FREETYPE=no
61856      fi
61857    else
61858      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61859        # On Windows, we will need both .lib and .dll file.
61860        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61861          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61863          FOUND_FREETYPE=no
61864        fi
61865      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61866          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61867        # Found lib in isa dir, use that instead.
61868        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61869        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61870$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61871      fi
61872    fi
61873  fi
61874
61875  if test "x$FOUND_FREETYPE" = xyes; then
61876
61877  # Only process if variable expands to non-empty
61878
61879  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61880    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61881
61882  # Input might be given as Windows format, start by converting to
61883  # unix format.
61884  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61885  new_path=`$CYGPATH -u "$path"`
61886
61887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61890  # "foo.exe" is OK but "foo" is an error.
61891  #
61892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61893  # It is also a way to make sure we got the proper file name for the real test later on.
61894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61895  if test "x$test_shortpath" = x; then
61896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61897$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61898    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61899  fi
61900
61901  # Call helper function which possibly converts this using DOS-style short mode.
61902  # If so, the updated path is stored in $new_path.
61903
61904  input_path="$new_path"
61905  # Check if we need to convert this using DOS-style short mode. If the path
61906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61907  # take no chances and rewrite it.
61908  # Note: m4 eats our [], so we need to use [ and ] instead.
61909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61910  if test "x$has_forbidden_chars" != x; then
61911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61915      # Going to short mode and back again did indeed matter. Since short mode is
61916      # case insensitive, let's make it lowercase to improve readability.
61917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61918      # Now convert it back to Unix-style (cygpath)
61919      input_path=`$CYGPATH -u "$shortmode_path"`
61920      new_path="$input_path"
61921    fi
61922  fi
61923
61924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61925  if test "x$test_cygdrive_prefix" = x; then
61926    # As a simple fix, exclude /usr/bin since it's not a real path.
61927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61929      # a path prefixed by /cygdrive for fixpath to work.
61930      new_path="$CYGWIN_ROOT_PATH$input_path"
61931    fi
61932  fi
61933
61934
61935  if test "x$path" != "x$new_path"; then
61936    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61938$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61939  fi
61940
61941    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61942
61943  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61944  has_colon=`$ECHO $path | $GREP ^.:`
61945  new_path="$path"
61946  if test "x$has_colon" = x; then
61947    # Not in mixed or Windows style, start by that.
61948    new_path=`cmd //c echo $path`
61949  fi
61950
61951
61952  input_path="$new_path"
61953  # Check if we need to convert this using DOS-style short mode. If the path
61954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61955  # take no chances and rewrite it.
61956  # Note: m4 eats our [], so we need to use [ and ] instead.
61957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61958  if test "x$has_forbidden_chars" != x; then
61959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61961  fi
61962
61963
61964  windows_path="$new_path"
61965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61966    unix_path=`$CYGPATH -u "$windows_path"`
61967    new_path="$unix_path"
61968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61970    new_path="$unix_path"
61971  fi
61972
61973  if test "x$path" != "x$new_path"; then
61974    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61976$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61977  fi
61978
61979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61981
61982    else
61983      # We're on a unix platform. Hooray! :)
61984      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61985      has_space=`$ECHO "$path" | $GREP " "`
61986      if test "x$has_space" != x; then
61987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61988$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61989        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61990      fi
61991
61992      # Use eval to expand a potential ~
61993      eval path="$path"
61994      if test ! -f "$path" && test ! -d "$path"; then
61995        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61996      fi
61997
61998      if test -d "$path"; then
61999        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62000      else
62001        dir="`$DIRNAME "$path"`"
62002        base="`$BASENAME "$path"`"
62003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62004      fi
62005    fi
62006  fi
62007
62008
62009  # Only process if variable expands to non-empty
62010
62011  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62013
62014  # Input might be given as Windows format, start by converting to
62015  # unix format.
62016  path="$POTENTIAL_FREETYPE_LIB_PATH"
62017  new_path=`$CYGPATH -u "$path"`
62018
62019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62022  # "foo.exe" is OK but "foo" is an error.
62023  #
62024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62025  # It is also a way to make sure we got the proper file name for the real test later on.
62026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62027  if test "x$test_shortpath" = x; then
62028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62030    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62031  fi
62032
62033  # Call helper function which possibly converts this using DOS-style short mode.
62034  # If so, the updated path is stored in $new_path.
62035
62036  input_path="$new_path"
62037  # Check if we need to convert this using DOS-style short mode. If the path
62038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62039  # take no chances and rewrite it.
62040  # Note: m4 eats our [], so we need to use [ and ] instead.
62041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62042  if test "x$has_forbidden_chars" != x; then
62043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62047      # Going to short mode and back again did indeed matter. Since short mode is
62048      # case insensitive, let's make it lowercase to improve readability.
62049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62050      # Now convert it back to Unix-style (cygpath)
62051      input_path=`$CYGPATH -u "$shortmode_path"`
62052      new_path="$input_path"
62053    fi
62054  fi
62055
62056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62057  if test "x$test_cygdrive_prefix" = x; then
62058    # As a simple fix, exclude /usr/bin since it's not a real path.
62059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62061      # a path prefixed by /cygdrive for fixpath to work.
62062      new_path="$CYGWIN_ROOT_PATH$input_path"
62063    fi
62064  fi
62065
62066
62067  if test "x$path" != "x$new_path"; then
62068    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62070$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62071  fi
62072
62073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62074
62075  path="$POTENTIAL_FREETYPE_LIB_PATH"
62076  has_colon=`$ECHO $path | $GREP ^.:`
62077  new_path="$path"
62078  if test "x$has_colon" = x; then
62079    # Not in mixed or Windows style, start by that.
62080    new_path=`cmd //c echo $path`
62081  fi
62082
62083
62084  input_path="$new_path"
62085  # Check if we need to convert this using DOS-style short mode. If the path
62086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62087  # take no chances and rewrite it.
62088  # Note: m4 eats our [], so we need to use [ and ] instead.
62089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62090  if test "x$has_forbidden_chars" != x; then
62091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62093  fi
62094
62095
62096  windows_path="$new_path"
62097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62098    unix_path=`$CYGPATH -u "$windows_path"`
62099    new_path="$unix_path"
62100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62102    new_path="$unix_path"
62103  fi
62104
62105  if test "x$path" != "x$new_path"; then
62106    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62108$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62109  fi
62110
62111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62113
62114    else
62115      # We're on a unix platform. Hooray! :)
62116      path="$POTENTIAL_FREETYPE_LIB_PATH"
62117      has_space=`$ECHO "$path" | $GREP " "`
62118      if test "x$has_space" != x; then
62119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62120$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62122      fi
62123
62124      # Use eval to expand a potential ~
62125      eval path="$path"
62126      if test ! -f "$path" && test ! -d "$path"; then
62127        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62128      fi
62129
62130      if test -d "$path"; then
62131        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62132      else
62133        dir="`$DIRNAME "$path"`"
62134        base="`$BASENAME "$path"`"
62135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62136      fi
62137    fi
62138  fi
62139
62140
62141    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62143$as_echo_n "checking for freetype includes... " >&6; }
62144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62145$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62146    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62147    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62148$as_echo_n "checking for freetype libraries... " >&6; }
62149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62150$as_echo "$FREETYPE_LIB_PATH" >&6; }
62151  fi
62152
62153              fi
62154            fi
62155          fi
62156        fi
62157      fi # end check in well-known locations
62158
62159      if test "x$FOUND_FREETYPE" != xyes; then
62160
62161  # Print a helpful message on how to acquire the necessary build dependency.
62162  # freetype is the help tag: freetype, cups, alsa etc
62163  MISSING_DEPENDENCY=freetype
62164
62165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62166    cygwin_help $MISSING_DEPENDENCY
62167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62168    msys_help $MISSING_DEPENDENCY
62169  else
62170    PKGHANDLER_COMMAND=
62171
62172    case $PKGHANDLER in
62173      apt-get)
62174        apt_help     $MISSING_DEPENDENCY ;;
62175      yum)
62176        yum_help     $MISSING_DEPENDENCY ;;
62177      port)
62178        port_help    $MISSING_DEPENDENCY ;;
62179      pkgutil)
62180        pkgutil_help $MISSING_DEPENDENCY ;;
62181      pkgadd)
62182        pkgadd_help  $MISSING_DEPENDENCY ;;
62183    esac
62184
62185    if test "x$PKGHANDLER_COMMAND" != x; then
62186      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62187    fi
62188  fi
62189
62190        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62191      fi
62192    fi # end user specified settings
62193
62194    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62195    if test "x$FREETYPE_CFLAGS" = x; then
62196
62197  # Only process if variable expands to non-empty
62198
62199  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62201
62202  # Input might be given as Windows format, start by converting to
62203  # unix format.
62204  path="$FREETYPE_INCLUDE_PATH"
62205  new_path=`$CYGPATH -u "$path"`
62206
62207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62210  # "foo.exe" is OK but "foo" is an error.
62211  #
62212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62213  # It is also a way to make sure we got the proper file name for the real test later on.
62214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62215  if test "x$test_shortpath" = x; then
62216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62217$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62218    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62219  fi
62220
62221  # Call helper function which possibly converts this using DOS-style short mode.
62222  # If so, the updated path is stored in $new_path.
62223
62224  input_path="$new_path"
62225  # Check if we need to convert this using DOS-style short mode. If the path
62226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62227  # take no chances and rewrite it.
62228  # Note: m4 eats our [], so we need to use [ and ] instead.
62229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62230  if test "x$has_forbidden_chars" != x; then
62231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62235      # Going to short mode and back again did indeed matter. Since short mode is
62236      # case insensitive, let's make it lowercase to improve readability.
62237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62238      # Now convert it back to Unix-style (cygpath)
62239      input_path=`$CYGPATH -u "$shortmode_path"`
62240      new_path="$input_path"
62241    fi
62242  fi
62243
62244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62245  if test "x$test_cygdrive_prefix" = x; then
62246    # As a simple fix, exclude /usr/bin since it's not a real path.
62247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62249      # a path prefixed by /cygdrive for fixpath to work.
62250      new_path="$CYGWIN_ROOT_PATH$input_path"
62251    fi
62252  fi
62253
62254
62255  if test "x$path" != "x$new_path"; then
62256    FREETYPE_INCLUDE_PATH="$new_path"
62257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62258$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62259  fi
62260
62261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62262
62263  path="$FREETYPE_INCLUDE_PATH"
62264  has_colon=`$ECHO $path | $GREP ^.:`
62265  new_path="$path"
62266  if test "x$has_colon" = x; then
62267    # Not in mixed or Windows style, start by that.
62268    new_path=`cmd //c echo $path`
62269  fi
62270
62271
62272  input_path="$new_path"
62273  # Check if we need to convert this using DOS-style short mode. If the path
62274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62275  # take no chances and rewrite it.
62276  # Note: m4 eats our [], so we need to use [ and ] instead.
62277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62278  if test "x$has_forbidden_chars" != x; then
62279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62281  fi
62282
62283
62284  windows_path="$new_path"
62285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62286    unix_path=`$CYGPATH -u "$windows_path"`
62287    new_path="$unix_path"
62288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62290    new_path="$unix_path"
62291  fi
62292
62293  if test "x$path" != "x$new_path"; then
62294    FREETYPE_INCLUDE_PATH="$new_path"
62295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62296$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62297  fi
62298
62299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62301
62302    else
62303      # We're on a unix platform. Hooray! :)
62304      path="$FREETYPE_INCLUDE_PATH"
62305      has_space=`$ECHO "$path" | $GREP " "`
62306      if test "x$has_space" != x; then
62307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62308$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62310      fi
62311
62312      # Use eval to expand a potential ~
62313      eval path="$path"
62314      if test ! -f "$path" && test ! -d "$path"; then
62315        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62316      fi
62317
62318      if test -d "$path"; then
62319        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62320      else
62321        dir="`$DIRNAME "$path"`"
62322        base="`$BASENAME "$path"`"
62323        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62324      fi
62325    fi
62326  fi
62327
62328      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62329        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62330      else
62331        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62332      fi
62333    fi
62334
62335    if test "x$FREETYPE_LIBS" = x; then
62336
62337  # Only process if variable expands to non-empty
62338
62339  if test "x$FREETYPE_LIB_PATH" != x; then
62340    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62341
62342  # Input might be given as Windows format, start by converting to
62343  # unix format.
62344  path="$FREETYPE_LIB_PATH"
62345  new_path=`$CYGPATH -u "$path"`
62346
62347  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62348  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62349  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62350  # "foo.exe" is OK but "foo" is an error.
62351  #
62352  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62353  # It is also a way to make sure we got the proper file name for the real test later on.
62354  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62355  if test "x$test_shortpath" = x; then
62356    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62357$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62358    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62359  fi
62360
62361  # Call helper function which possibly converts this using DOS-style short mode.
62362  # If so, the updated path is stored in $new_path.
62363
62364  input_path="$new_path"
62365  # Check if we need to convert this using DOS-style short mode. If the path
62366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62367  # take no chances and rewrite it.
62368  # Note: m4 eats our [], so we need to use [ and ] instead.
62369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62370  if test "x$has_forbidden_chars" != x; then
62371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62375      # Going to short mode and back again did indeed matter. Since short mode is
62376      # case insensitive, let's make it lowercase to improve readability.
62377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62378      # Now convert it back to Unix-style (cygpath)
62379      input_path=`$CYGPATH -u "$shortmode_path"`
62380      new_path="$input_path"
62381    fi
62382  fi
62383
62384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62385  if test "x$test_cygdrive_prefix" = x; then
62386    # As a simple fix, exclude /usr/bin since it's not a real path.
62387    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62389      # a path prefixed by /cygdrive for fixpath to work.
62390      new_path="$CYGWIN_ROOT_PATH$input_path"
62391    fi
62392  fi
62393
62394
62395  if test "x$path" != "x$new_path"; then
62396    FREETYPE_LIB_PATH="$new_path"
62397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62398$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62399  fi
62400
62401    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62402
62403  path="$FREETYPE_LIB_PATH"
62404  has_colon=`$ECHO $path | $GREP ^.:`
62405  new_path="$path"
62406  if test "x$has_colon" = x; then
62407    # Not in mixed or Windows style, start by that.
62408    new_path=`cmd //c echo $path`
62409  fi
62410
62411
62412  input_path="$new_path"
62413  # Check if we need to convert this using DOS-style short mode. If the path
62414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62415  # take no chances and rewrite it.
62416  # Note: m4 eats our [], so we need to use [ and ] instead.
62417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62418  if test "x$has_forbidden_chars" != x; then
62419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62421  fi
62422
62423
62424  windows_path="$new_path"
62425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62426    unix_path=`$CYGPATH -u "$windows_path"`
62427    new_path="$unix_path"
62428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62430    new_path="$unix_path"
62431  fi
62432
62433  if test "x$path" != "x$new_path"; then
62434    FREETYPE_LIB_PATH="$new_path"
62435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62436$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62437  fi
62438
62439  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62440  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62441
62442    else
62443      # We're on a unix platform. Hooray! :)
62444      path="$FREETYPE_LIB_PATH"
62445      has_space=`$ECHO "$path" | $GREP " "`
62446      if test "x$has_space" != x; then
62447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62448$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62449        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62450      fi
62451
62452      # Use eval to expand a potential ~
62453      eval path="$path"
62454      if test ! -f "$path" && test ! -d "$path"; then
62455        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62456      fi
62457
62458      if test -d "$path"; then
62459        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62460      else
62461        dir="`$DIRNAME "$path"`"
62462        base="`$BASENAME "$path"`"
62463        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62464      fi
62465    fi
62466  fi
62467
62468      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62469        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62470      else
62471        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62472      fi
62473    fi
62474
62475    # Try to compile it
62476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62477$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62478    ac_ext=cpp
62479ac_cpp='$CXXCPP $CPPFLAGS'
62480ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62481ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62482ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62483
62484    PREV_CXXCFLAGS="$CXXFLAGS"
62485    PREV_LIBS="$LIBS"
62486    PREV_CXX="$CXX"
62487    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62488    LIBS="$LIBS $FREETYPE_LIBS"
62489    CXX="$FIXPATH $CXX"
62490    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62491/* end confdefs.h.  */
62492
62493          #include<ft2build.h>
62494          #include FT_FREETYPE_H
62495          int main () {
62496            FT_Init_FreeType(NULL);
62497            return 0;
62498          }
62499
62500_ACEOF
62501if ac_fn_cxx_try_link "$LINENO"; then :
62502
62503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62504$as_echo "yes" >&6; }
62505
62506else
62507
62508          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62509$as_echo "no" >&6; }
62510          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62511$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62512          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62513$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62514
62515
62516  # Print a helpful message on how to acquire the necessary build dependency.
62517  # freetype is the help tag: freetype, cups, alsa etc
62518  MISSING_DEPENDENCY=freetype
62519
62520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62521    cygwin_help $MISSING_DEPENDENCY
62522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62523    msys_help $MISSING_DEPENDENCY
62524  else
62525    PKGHANDLER_COMMAND=
62526
62527    case $PKGHANDLER in
62528      apt-get)
62529        apt_help     $MISSING_DEPENDENCY ;;
62530      yum)
62531        yum_help     $MISSING_DEPENDENCY ;;
62532      port)
62533        port_help    $MISSING_DEPENDENCY ;;
62534      pkgutil)
62535        pkgutil_help $MISSING_DEPENDENCY ;;
62536      pkgadd)
62537        pkgadd_help  $MISSING_DEPENDENCY ;;
62538    esac
62539
62540    if test "x$PKGHANDLER_COMMAND" != x; then
62541      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62542    fi
62543  fi
62544
62545
62546          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62547
62548
62549fi
62550rm -f core conftest.err conftest.$ac_objext \
62551    conftest$ac_exeext conftest.$ac_ext
62552    CXXCFLAGS="$PREV_CXXFLAGS"
62553    LIBS="$PREV_LIBS"
62554    CXX="$PREV_CXX"
62555    ac_ext=cpp
62556ac_cpp='$CXXCPP $CPPFLAGS'
62557ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62558ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62559ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62560
62561
62562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62563$as_echo_n "checking if we should bundle freetype... " >&6; }
62564    if test "x$BUNDLE_FREETYPE" = xyes; then
62565      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62566    fi
62567    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62568$as_echo "$BUNDLE_FREETYPE" >&6; }
62569
62570  fi # end freetype needed
62571
62572
62573
62574
62575
62576
62577
62578# Check whether --with-alsa was given.
62579if test "${with_alsa+set}" = set; then :
62580  withval=$with_alsa;
62581fi
62582
62583
62584# Check whether --with-alsa-include was given.
62585if test "${with_alsa_include+set}" = set; then :
62586  withval=$with_alsa_include;
62587fi
62588
62589
62590# Check whether --with-alsa-lib was given.
62591if test "${with_alsa_lib+set}" = set; then :
62592  withval=$with_alsa_lib;
62593fi
62594
62595
62596  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62597    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62598        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62599        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62600      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62601$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62602    fi
62603    ALSA_CFLAGS=
62604    ALSA_LIBS=
62605  else
62606    ALSA_FOUND=no
62607
62608    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62609      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62610    fi
62611
62612    if test "x${with_alsa}" != x; then
62613      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62614      ALSA_CFLAGS="-I${with_alsa}/include"
62615      ALSA_FOUND=yes
62616    fi
62617    if test "x${with_alsa_include}" != x; then
62618      ALSA_CFLAGS="-I${with_alsa_include}"
62619      ALSA_FOUND=yes
62620    fi
62621    if test "x${with_alsa_lib}" != x; then
62622      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62623      ALSA_FOUND=yes
62624    fi
62625    # Do not try pkg-config if we have a sysroot set.
62626    if test "x$SYSROOT" = x; then
62627      if test "x$ALSA_FOUND" = xno; then
62628
62629pkg_failed=no
62630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62631$as_echo_n "checking for ALSA... " >&6; }
62632
62633if test -n "$ALSA_CFLAGS"; then
62634    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62635 elif test -n "$PKG_CONFIG"; then
62636    if test -n "$PKG_CONFIG" && \
62637    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62638  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62639  ac_status=$?
62640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62641  test $ac_status = 0; }; then
62642  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62643else
62644  pkg_failed=yes
62645fi
62646 else
62647    pkg_failed=untried
62648fi
62649if test -n "$ALSA_LIBS"; then
62650    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62651 elif test -n "$PKG_CONFIG"; then
62652    if test -n "$PKG_CONFIG" && \
62653    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62654  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62655  ac_status=$?
62656  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62657  test $ac_status = 0; }; then
62658  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62659else
62660  pkg_failed=yes
62661fi
62662 else
62663    pkg_failed=untried
62664fi
62665
62666
62667
62668if test $pkg_failed = yes; then
62669
62670if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62671        _pkg_short_errors_supported=yes
62672else
62673        _pkg_short_errors_supported=no
62674fi
62675        if test $_pkg_short_errors_supported = yes; then
62676	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62677        else
62678	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62679        fi
62680	# Put the nasty error message in config.log where it belongs
62681	echo "$ALSA_PKG_ERRORS" >&5
62682
62683	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62684$as_echo "no" >&6; }
62685                ALSA_FOUND=no
62686elif test $pkg_failed = untried; then
62687	ALSA_FOUND=no
62688else
62689	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62690	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62692$as_echo "yes" >&6; }
62693	ALSA_FOUND=yes
62694fi
62695      fi
62696    fi
62697    if test "x$ALSA_FOUND" = xno; then
62698      for ac_header in alsa/asoundlib.h
62699do :
62700  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62701if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62702  cat >>confdefs.h <<_ACEOF
62703#define HAVE_ALSA_ASOUNDLIB_H 1
62704_ACEOF
62705
62706            ALSA_FOUND=yes
62707            ALSA_CFLAGS=-Iignoreme
62708            ALSA_LIBS=-lasound
62709            DEFAULT_ALSA=yes
62710
62711else
62712  ALSA_FOUND=no
62713
62714fi
62715
62716done
62717
62718    fi
62719    if test "x$ALSA_FOUND" = xno; then
62720
62721  # Print a helpful message on how to acquire the necessary build dependency.
62722  # alsa is the help tag: freetype, cups, alsa etc
62723  MISSING_DEPENDENCY=alsa
62724
62725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62726    cygwin_help $MISSING_DEPENDENCY
62727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62728    msys_help $MISSING_DEPENDENCY
62729  else
62730    PKGHANDLER_COMMAND=
62731
62732    case $PKGHANDLER in
62733      apt-get)
62734        apt_help     $MISSING_DEPENDENCY ;;
62735      yum)
62736        yum_help     $MISSING_DEPENDENCY ;;
62737      port)
62738        port_help    $MISSING_DEPENDENCY ;;
62739      pkgutil)
62740        pkgutil_help $MISSING_DEPENDENCY ;;
62741      pkgadd)
62742        pkgadd_help  $MISSING_DEPENDENCY ;;
62743    esac
62744
62745    if test "x$PKGHANDLER_COMMAND" != x; then
62746      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62747    fi
62748  fi
62749
62750      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62751    fi
62752  fi
62753
62754
62755
62756
62757
62758
62759# Check whether --with-libffi was given.
62760if test "${with_libffi+set}" = set; then :
62761  withval=$with_libffi;
62762fi
62763
62764
62765# Check whether --with-libffi-include was given.
62766if test "${with_libffi_include+set}" = set; then :
62767  withval=$with_libffi_include;
62768fi
62769
62770
62771# Check whether --with-libffi-lib was given.
62772if test "${with_libffi_lib+set}" = set; then :
62773  withval=$with_libffi_lib;
62774fi
62775
62776
62777  if test "x$NEEDS_LIB_FFI" = xfalse; then
62778    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62779        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62780        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62781      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62782$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62783    fi
62784    LIBFFI_CFLAGS=
62785    LIBFFI_LIBS=
62786  else
62787    LIBFFI_FOUND=no
62788
62789    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62790      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62791    fi
62792
62793    if test "x${with_libffi}" != x; then
62794      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62795      LIBFFI_CFLAGS="-I${with_libffi}/include"
62796      LIBFFI_FOUND=yes
62797    fi
62798    if test "x${with_libffi_include}" != x; then
62799      LIBFFI_CFLAGS="-I${with_libffi_include}"
62800      LIBFFI_FOUND=yes
62801    fi
62802    if test "x${with_libffi_lib}" != x; then
62803      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62804      LIBFFI_FOUND=yes
62805    fi
62806    # Do not try pkg-config if we have a sysroot set.
62807    if test "x$SYSROOT" = x; then
62808      if test "x$LIBFFI_FOUND" = xno; then
62809        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62810
62811pkg_failed=no
62812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62813$as_echo_n "checking for LIBFFI... " >&6; }
62814
62815if test -n "$LIBFFI_CFLAGS"; then
62816    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62817 elif test -n "$PKG_CONFIG"; then
62818    if test -n "$PKG_CONFIG" && \
62819    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62820  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62821  ac_status=$?
62822  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62823  test $ac_status = 0; }; then
62824  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62825else
62826  pkg_failed=yes
62827fi
62828 else
62829    pkg_failed=untried
62830fi
62831if test -n "$LIBFFI_LIBS"; then
62832    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62833 elif test -n "$PKG_CONFIG"; then
62834    if test -n "$PKG_CONFIG" && \
62835    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62836  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62837  ac_status=$?
62838  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62839  test $ac_status = 0; }; then
62840  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62841else
62842  pkg_failed=yes
62843fi
62844 else
62845    pkg_failed=untried
62846fi
62847
62848
62849
62850if test $pkg_failed = yes; then
62851
62852if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62853        _pkg_short_errors_supported=yes
62854else
62855        _pkg_short_errors_supported=no
62856fi
62857        if test $_pkg_short_errors_supported = yes; then
62858	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62859        else
62860	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62861        fi
62862	# Put the nasty error message in config.log where it belongs
62863	echo "$LIBFFI_PKG_ERRORS" >&5
62864
62865	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62866$as_echo "no" >&6; }
62867                LIBFFI_FOUND=no
62868elif test $pkg_failed = untried; then
62869	LIBFFI_FOUND=no
62870else
62871	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62872	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62874$as_echo "yes" >&6; }
62875	LIBFFI_FOUND=yes
62876fi
62877      fi
62878    fi
62879    if test "x$LIBFFI_FOUND" = xno; then
62880      for ac_header in ffi.h
62881do :
62882  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62883if test "x$ac_cv_header_ffi_h" = xyes; then :
62884  cat >>confdefs.h <<_ACEOF
62885#define HAVE_FFI_H 1
62886_ACEOF
62887
62888            LIBFFI_FOUND=yes
62889            LIBFFI_CFLAGS=
62890            LIBFFI_LIBS=-lffi
62891
62892else
62893  LIBFFI_FOUND=no
62894
62895fi
62896
62897done
62898
62899    fi
62900    if test "x$LIBFFI_FOUND" = xno; then
62901
62902  # Print a helpful message on how to acquire the necessary build dependency.
62903  # ffi is the help tag: freetype, cups, alsa etc
62904  MISSING_DEPENDENCY=ffi
62905
62906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62907    cygwin_help $MISSING_DEPENDENCY
62908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62909    msys_help $MISSING_DEPENDENCY
62910  else
62911    PKGHANDLER_COMMAND=
62912
62913    case $PKGHANDLER in
62914      apt-get)
62915        apt_help     $MISSING_DEPENDENCY ;;
62916      yum)
62917        yum_help     $MISSING_DEPENDENCY ;;
62918      port)
62919        port_help    $MISSING_DEPENDENCY ;;
62920      pkgutil)
62921        pkgutil_help $MISSING_DEPENDENCY ;;
62922      pkgadd)
62923        pkgadd_help  $MISSING_DEPENDENCY ;;
62924    esac
62925
62926    if test "x$PKGHANDLER_COMMAND" != x; then
62927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62928    fi
62929  fi
62930
62931      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62932    fi
62933
62934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62935$as_echo_n "checking if libffi works... " >&6; }
62936    ac_ext=c
62937ac_cpp='$CPP $CPPFLAGS'
62938ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62939ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62940ac_compiler_gnu=$ac_cv_c_compiler_gnu
62941
62942    OLD_CFLAGS="$CFLAGS"
62943    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62944    OLD_LIBS="$LIBS"
62945    LIBS="$LIBS $LIBFFI_LIBS"
62946    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62947/* end confdefs.h.  */
62948#include <ffi.h>
62949int
62950main ()
62951{
62952
62953          ffi_call(NULL, NULL, NULL, NULL);
62954          return 0;
62955
62956  ;
62957  return 0;
62958}
62959_ACEOF
62960if ac_fn_c_try_link "$LINENO"; then :
62961  LIBFFI_WORKS=yes
62962else
62963  LIBFFI_WORKS=no
62964
62965fi
62966rm -f core conftest.err conftest.$ac_objext \
62967    conftest$ac_exeext conftest.$ac_ext
62968    CFLAGS="$OLD_CFLAGS"
62969    LIBS="$OLD_LIBS"
62970    ac_ext=cpp
62971ac_cpp='$CXXCPP $CPPFLAGS'
62972ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62973ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62974ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62975
62976    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62977$as_echo "$LIBFFI_WORKS" >&6; }
62978
62979    if test "x$LIBFFI_WORKS" = xno; then
62980
62981  # Print a helpful message on how to acquire the necessary build dependency.
62982  # ffi is the help tag: freetype, cups, alsa etc
62983  MISSING_DEPENDENCY=ffi
62984
62985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62986    cygwin_help $MISSING_DEPENDENCY
62987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62988    msys_help $MISSING_DEPENDENCY
62989  else
62990    PKGHANDLER_COMMAND=
62991
62992    case $PKGHANDLER in
62993      apt-get)
62994        apt_help     $MISSING_DEPENDENCY ;;
62995      yum)
62996        yum_help     $MISSING_DEPENDENCY ;;
62997      port)
62998        port_help    $MISSING_DEPENDENCY ;;
62999      pkgutil)
63000        pkgutil_help $MISSING_DEPENDENCY ;;
63001      pkgadd)
63002        pkgadd_help  $MISSING_DEPENDENCY ;;
63003    esac
63004
63005    if test "x$PKGHANDLER_COMMAND" != x; then
63006      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63007    fi
63008  fi
63009
63010      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63011    fi
63012  fi
63013
63014
63015
63016
63017
63018  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63019    # Extract the first word of "llvm-config", so it can be a program name with args.
63020set dummy llvm-config; ac_word=$2
63021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63022$as_echo_n "checking for $ac_word... " >&6; }
63023if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63024  $as_echo_n "(cached) " >&6
63025else
63026  if test -n "$LLVM_CONFIG"; then
63027  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63028else
63029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63030for as_dir in $PATH
63031do
63032  IFS=$as_save_IFS
63033  test -z "$as_dir" && as_dir=.
63034    for ac_exec_ext in '' $ac_executable_extensions; do
63035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63036    ac_cv_prog_LLVM_CONFIG="llvm-config"
63037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63038    break 2
63039  fi
63040done
63041  done
63042IFS=$as_save_IFS
63043
63044fi
63045fi
63046LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63047if test -n "$LLVM_CONFIG"; then
63048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63049$as_echo "$LLVM_CONFIG" >&6; }
63050else
63051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63052$as_echo "no" >&6; }
63053fi
63054
63055
63056
63057    if test "x$LLVM_CONFIG" != xllvm-config; then
63058      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63059    fi
63060
63061    llvm_components="jit mcjit engine nativecodegen native"
63062    unset LLVM_CFLAGS
63063    for flag in $("$LLVM_CONFIG" --cxxflags); do
63064      if echo "${flag}" | grep -q '^-[ID]'; then
63065        if test "${flag}" != "-D_DEBUG" ; then
63066          if test "${LLVM_CFLAGS}" != "" ; then
63067            LLVM_CFLAGS="${LLVM_CFLAGS} "
63068          fi
63069          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63070        fi
63071      fi
63072    done
63073    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63074    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63075
63076    unset LLVM_LDFLAGS
63077    for flag in $("${LLVM_CONFIG}" --ldflags); do
63078      if echo "${flag}" | grep -q '^-L'; then
63079        if test "${LLVM_LDFLAGS}" != ""; then
63080          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63081        fi
63082        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63083      fi
63084    done
63085
63086    unset LLVM_LIBS
63087    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63088      if echo "${flag}" | grep -q '^-l'; then
63089        if test "${LLVM_LIBS}" != ""; then
63090          LLVM_LIBS="${LLVM_LIBS} "
63091        fi
63092        LLVM_LIBS="${LLVM_LIBS}${flag}"
63093      fi
63094    done
63095
63096    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63097    # always properly detect -ltinfo
63098    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63099
63100
63101
63102
63103  fi
63104
63105
63106
63107# Check whether --with-libjpeg was given.
63108if test "${with_libjpeg+set}" = set; then :
63109  withval=$with_libjpeg;
63110fi
63111
63112
63113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63114$as_echo_n "checking for which libjpeg to use... " >&6; }
63115  # default is bundled
63116  DEFAULT_LIBJPEG=bundled
63117  # if user didn't specify, use DEFAULT_LIBJPEG
63118  if test "x${with_libjpeg}" = "x"; then
63119    with_libjpeg=${DEFAULT_LIBJPEG}
63120  fi
63121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63122$as_echo "${with_libjpeg}" >&6; }
63123
63124  if test "x${with_libjpeg}" = "xbundled"; then
63125    USE_EXTERNAL_LIBJPEG=false
63126  elif test "x${with_libjpeg}" = "xsystem"; then
63127    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63128if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63129
63130else
63131   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63132fi
63133
63134
63135    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63136$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63137if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63138  $as_echo_n "(cached) " >&6
63139else
63140  ac_check_lib_save_LIBS=$LIBS
63141LIBS="-ljpeg  $LIBS"
63142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63143/* end confdefs.h.  */
63144
63145/* Override any GCC internal prototype to avoid an error.
63146   Use char because int might match the return type of a GCC
63147   builtin and then its argument prototype would still apply.  */
63148#ifdef __cplusplus
63149extern "C"
63150#endif
63151char jpeg_CreateDecompress ();
63152int
63153main ()
63154{
63155return jpeg_CreateDecompress ();
63156  ;
63157  return 0;
63158}
63159_ACEOF
63160if ac_fn_cxx_try_link "$LINENO"; then :
63161  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63162else
63163  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63164fi
63165rm -f core conftest.err conftest.$ac_objext \
63166    conftest$ac_exeext conftest.$ac_ext
63167LIBS=$ac_check_lib_save_LIBS
63168fi
63169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63170$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63171if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63172  cat >>confdefs.h <<_ACEOF
63173#define HAVE_LIBJPEG 1
63174_ACEOF
63175
63176  LIBS="-ljpeg $LIBS"
63177
63178else
63179   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63180fi
63181
63182
63183    USE_EXTERNAL_LIBJPEG=true
63184  else
63185    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63186  fi
63187
63188
63189
63190
63191
63192# Check whether --with-giflib was given.
63193if test "${with_giflib+set}" = set; then :
63194  withval=$with_giflib;
63195fi
63196
63197
63198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63199$as_echo_n "checking for which giflib to use... " >&6; }
63200  # default is bundled
63201  DEFAULT_GIFLIB=bundled
63202  # if user didn't specify, use DEFAULT_GIFLIB
63203  if test "x${with_giflib}" = "x"; then
63204    with_giflib=${DEFAULT_GIFLIB}
63205  fi
63206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63207$as_echo "${with_giflib}" >&6; }
63208
63209  if test "x${with_giflib}" = "xbundled"; then
63210    USE_EXTERNAL_LIBGIF=false
63211  elif test "x${with_giflib}" = "xsystem"; then
63212    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63213if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63214
63215else
63216   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63217fi
63218
63219
63220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63221$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63222if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63223  $as_echo_n "(cached) " >&6
63224else
63225  ac_check_lib_save_LIBS=$LIBS
63226LIBS="-lgif  $LIBS"
63227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63228/* end confdefs.h.  */
63229
63230/* Override any GCC internal prototype to avoid an error.
63231   Use char because int might match the return type of a GCC
63232   builtin and then its argument prototype would still apply.  */
63233#ifdef __cplusplus
63234extern "C"
63235#endif
63236char DGifGetCode ();
63237int
63238main ()
63239{
63240return DGifGetCode ();
63241  ;
63242  return 0;
63243}
63244_ACEOF
63245if ac_fn_cxx_try_link "$LINENO"; then :
63246  ac_cv_lib_gif_DGifGetCode=yes
63247else
63248  ac_cv_lib_gif_DGifGetCode=no
63249fi
63250rm -f core conftest.err conftest.$ac_objext \
63251    conftest$ac_exeext conftest.$ac_ext
63252LIBS=$ac_check_lib_save_LIBS
63253fi
63254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63255$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63256if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63257  cat >>confdefs.h <<_ACEOF
63258#define HAVE_LIBGIF 1
63259_ACEOF
63260
63261  LIBS="-lgif $LIBS"
63262
63263else
63264   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63265fi
63266
63267
63268    USE_EXTERNAL_LIBGIF=true
63269  else
63270    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63271  fi
63272
63273
63274
63275
63276
63277# Check whether --with-libpng was given.
63278if test "${with_libpng+set}" = set; then :
63279  withval=$with_libpng;
63280fi
63281
63282
63283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63284$as_echo_n "checking for which libpng to use... " >&6; }
63285
63286  # default is bundled
63287  DEFAULT_LIBPNG=bundled
63288  # if user didn't specify, use DEFAULT_LIBPNG
63289  if test "x${with_libpng}" = "x"; then
63290      with_libpng=${DEFAULT_LIBPNG}
63291  fi
63292
63293  if test "x${with_libpng}" = "xbundled"; then
63294      USE_EXTERNAL_LIBPNG=false
63295      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63296$as_echo "bundled" >&6; }
63297  elif test "x${with_libpng}" = "xsystem"; then
63298
63299pkg_failed=no
63300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63301$as_echo_n "checking for PNG... " >&6; }
63302
63303if test -n "$PNG_CFLAGS"; then
63304    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63305 elif test -n "$PKG_CONFIG"; then
63306    if test -n "$PKG_CONFIG" && \
63307    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63308  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63309  ac_status=$?
63310  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63311  test $ac_status = 0; }; then
63312  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63313else
63314  pkg_failed=yes
63315fi
63316 else
63317    pkg_failed=untried
63318fi
63319if test -n "$PNG_LIBS"; then
63320    pkg_cv_PNG_LIBS="$PNG_LIBS"
63321 elif test -n "$PKG_CONFIG"; then
63322    if test -n "$PKG_CONFIG" && \
63323    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63324  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63325  ac_status=$?
63326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63327  test $ac_status = 0; }; then
63328  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63329else
63330  pkg_failed=yes
63331fi
63332 else
63333    pkg_failed=untried
63334fi
63335
63336
63337
63338if test $pkg_failed = yes; then
63339
63340if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63341        _pkg_short_errors_supported=yes
63342else
63343        _pkg_short_errors_supported=no
63344fi
63345        if test $_pkg_short_errors_supported = yes; then
63346	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63347        else
63348	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63349        fi
63350	# Put the nasty error message in config.log where it belongs
63351	echo "$PNG_PKG_ERRORS" >&5
63352
63353	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63354$as_echo "no" >&6; }
63355                 LIBPNG_FOUND=no
63356elif test $pkg_failed = untried; then
63357	 LIBPNG_FOUND=no
63358else
63359	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63360	PNG_LIBS=$pkg_cv_PNG_LIBS
63361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63362$as_echo "yes" >&6; }
63363	 LIBPNG_FOUND=yes
63364fi
63365      if test "x${LIBPNG_FOUND}" = "xyes"; then
63366          USE_EXTERNAL_LIBPNG=true
63367          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63368$as_echo "system" >&6; }
63369      else
63370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63371$as_echo "system not found" >&6; }
63372          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63373      fi
63374  else
63375      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63376  fi
63377
63378
63379
63380
63381
63382# Check whether --with-zlib was given.
63383if test "${with_zlib+set}" = set; then :
63384  withval=$with_zlib;
63385fi
63386
63387
63388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63389$as_echo_n "checking for compress in -lz... " >&6; }
63390if ${ac_cv_lib_z_compress+:} false; then :
63391  $as_echo_n "(cached) " >&6
63392else
63393  ac_check_lib_save_LIBS=$LIBS
63394LIBS="-lz  $LIBS"
63395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63396/* end confdefs.h.  */
63397
63398/* Override any GCC internal prototype to avoid an error.
63399   Use char because int might match the return type of a GCC
63400   builtin and then its argument prototype would still apply.  */
63401#ifdef __cplusplus
63402extern "C"
63403#endif
63404char compress ();
63405int
63406main ()
63407{
63408return compress ();
63409  ;
63410  return 0;
63411}
63412_ACEOF
63413if ac_fn_cxx_try_link "$LINENO"; then :
63414  ac_cv_lib_z_compress=yes
63415else
63416  ac_cv_lib_z_compress=no
63417fi
63418rm -f core conftest.err conftest.$ac_objext \
63419    conftest$ac_exeext conftest.$ac_ext
63420LIBS=$ac_check_lib_save_LIBS
63421fi
63422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63423$as_echo "$ac_cv_lib_z_compress" >&6; }
63424if test "x$ac_cv_lib_z_compress" = xyes; then :
63425   ZLIB_FOUND=yes
63426else
63427   ZLIB_FOUND=no
63428fi
63429
63430
63431  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63432$as_echo_n "checking for which zlib to use... " >&6; }
63433
63434  DEFAULT_ZLIB=system
63435  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63436    # On windows default is bundled...on others default is system
63437    DEFAULT_ZLIB=bundled
63438  fi
63439
63440  if test "x${ZLIB_FOUND}" != "xyes"; then
63441    # If we don't find any system...set default to bundled
63442    DEFAULT_ZLIB=bundled
63443  fi
63444
63445  # If user didn't specify, use DEFAULT_ZLIB
63446  if test "x${with_zlib}" = "x"; then
63447    with_zlib=${DEFAULT_ZLIB}
63448  fi
63449
63450  if test "x${with_zlib}" = "xbundled"; then
63451    USE_EXTERNAL_LIBZ=false
63452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63453$as_echo "bundled" >&6; }
63454  elif test "x${with_zlib}" = "xsystem"; then
63455    if test "x${ZLIB_FOUND}" = "xyes"; then
63456      USE_EXTERNAL_LIBZ=true
63457      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63458$as_echo "system" >&6; }
63459    else
63460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63461$as_echo "system not found" >&6; }
63462      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63463    fi
63464  else
63465    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63466  fi
63467
63468
63469
63470
63471
63472# Check whether --with-lcms was given.
63473if test "${with_lcms+set}" = set; then :
63474  withval=$with_lcms;
63475fi
63476
63477
63478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63479$as_echo_n "checking for which lcms to use... " >&6; }
63480
63481  DEFAULT_LCMS=bundled
63482  # If user didn't specify, use DEFAULT_LCMS
63483  if test "x${with_lcms}" = "x"; then
63484      with_lcms=${DEFAULT_LCMS}
63485  fi
63486
63487  if test "x${with_lcms}" = "xbundled"; then
63488    USE_EXTERNAL_LCMS=false
63489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63490$as_echo "bundled" >&6; }
63491  elif test "x${with_lcms}" = "xsystem"; then
63492    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63493$as_echo "system" >&6; }
63494
63495pkg_failed=no
63496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63497$as_echo_n "checking for LCMS... " >&6; }
63498
63499if test -n "$LCMS_CFLAGS"; then
63500    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63501 elif test -n "$PKG_CONFIG"; then
63502    if test -n "$PKG_CONFIG" && \
63503    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63504  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63505  ac_status=$?
63506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63507  test $ac_status = 0; }; then
63508  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63509else
63510  pkg_failed=yes
63511fi
63512 else
63513    pkg_failed=untried
63514fi
63515if test -n "$LCMS_LIBS"; then
63516    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63517 elif test -n "$PKG_CONFIG"; then
63518    if test -n "$PKG_CONFIG" && \
63519    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63520  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63521  ac_status=$?
63522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63523  test $ac_status = 0; }; then
63524  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63525else
63526  pkg_failed=yes
63527fi
63528 else
63529    pkg_failed=untried
63530fi
63531
63532
63533
63534if test $pkg_failed = yes; then
63535
63536if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63537        _pkg_short_errors_supported=yes
63538else
63539        _pkg_short_errors_supported=no
63540fi
63541        if test $_pkg_short_errors_supported = yes; then
63542	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63543        else
63544	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63545        fi
63546	# Put the nasty error message in config.log where it belongs
63547	echo "$LCMS_PKG_ERRORS" >&5
63548
63549	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63550$as_echo "no" >&6; }
63551                LCMS_FOUND=no
63552elif test $pkg_failed = untried; then
63553	LCMS_FOUND=no
63554else
63555	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63556	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63558$as_echo "yes" >&6; }
63559	LCMS_FOUND=yes
63560fi
63561    if test "x${LCMS_FOUND}" = "xyes"; then
63562      USE_EXTERNAL_LCMS=true
63563    else
63564      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63565    fi
63566  else
63567    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63568  fi
63569
63570
63571
63572
63573
63574
63575
63576
63577
63578
63579
63580  # Setup libm (the maths library)
63581  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63583$as_echo_n "checking for cos in -lm... " >&6; }
63584if ${ac_cv_lib_m_cos+:} false; then :
63585  $as_echo_n "(cached) " >&6
63586else
63587  ac_check_lib_save_LIBS=$LIBS
63588LIBS="-lm  $LIBS"
63589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63590/* end confdefs.h.  */
63591
63592/* Override any GCC internal prototype to avoid an error.
63593   Use char because int might match the return type of a GCC
63594   builtin and then its argument prototype would still apply.  */
63595#ifdef __cplusplus
63596extern "C"
63597#endif
63598char cos ();
63599int
63600main ()
63601{
63602return cos ();
63603  ;
63604  return 0;
63605}
63606_ACEOF
63607if ac_fn_cxx_try_link "$LINENO"; then :
63608  ac_cv_lib_m_cos=yes
63609else
63610  ac_cv_lib_m_cos=no
63611fi
63612rm -f core conftest.err conftest.$ac_objext \
63613    conftest$ac_exeext conftest.$ac_ext
63614LIBS=$ac_check_lib_save_LIBS
63615fi
63616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63617$as_echo "$ac_cv_lib_m_cos" >&6; }
63618if test "x$ac_cv_lib_m_cos" = xyes; then :
63619  cat >>confdefs.h <<_ACEOF
63620#define HAVE_LIBM 1
63621_ACEOF
63622
63623  LIBS="-lm $LIBS"
63624
63625else
63626
63627        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63628$as_echo "$as_me: Maths library was not found" >&6;}
63629
63630fi
63631
63632    LIBM="-lm"
63633  else
63634    LIBM=""
63635  fi
63636
63637
63638  # Setup libdl (for dynamic library loading)
63639  save_LIBS="$LIBS"
63640  LIBS=""
63641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63642$as_echo_n "checking for dlopen in -ldl... " >&6; }
63643if ${ac_cv_lib_dl_dlopen+:} false; then :
63644  $as_echo_n "(cached) " >&6
63645else
63646  ac_check_lib_save_LIBS=$LIBS
63647LIBS="-ldl  $LIBS"
63648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63649/* end confdefs.h.  */
63650
63651/* Override any GCC internal prototype to avoid an error.
63652   Use char because int might match the return type of a GCC
63653   builtin and then its argument prototype would still apply.  */
63654#ifdef __cplusplus
63655extern "C"
63656#endif
63657char dlopen ();
63658int
63659main ()
63660{
63661return dlopen ();
63662  ;
63663  return 0;
63664}
63665_ACEOF
63666if ac_fn_cxx_try_link "$LINENO"; then :
63667  ac_cv_lib_dl_dlopen=yes
63668else
63669  ac_cv_lib_dl_dlopen=no
63670fi
63671rm -f core conftest.err conftest.$ac_objext \
63672    conftest$ac_exeext conftest.$ac_ext
63673LIBS=$ac_check_lib_save_LIBS
63674fi
63675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63676$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63677if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63678  cat >>confdefs.h <<_ACEOF
63679#define HAVE_LIBDL 1
63680_ACEOF
63681
63682  LIBS="-ldl $LIBS"
63683
63684fi
63685
63686  LIBDL="$LIBS"
63687
63688  LIBS="$save_LIBS"
63689
63690  # Deprecated libraries, keep the flags for backwards compatibility
63691  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63692
63693
63694# Check whether --with-dxsdk was given.
63695if test "${with_dxsdk+set}" = set; then :
63696  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63697$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63698fi
63699
63700
63701
63702
63703# Check whether --with-dxsdk-lib was given.
63704if test "${with_dxsdk_lib+set}" = set; then :
63705  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63706$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63707fi
63708
63709
63710
63711
63712# Check whether --with-dxsdk-include was given.
63713if test "${with_dxsdk_include+set}" = set; then :
63714  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63715$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63716fi
63717
63718
63719  fi
63720
63721  # Control if libzip can use mmap. Available for purposes of overriding.
63722  LIBZIP_CAN_USE_MMAP=true
63723
63724
63725
63726
63727
63728
63729
63730
63731
63732
63733
63734
63735
63736
63737###############################################################################
63738#
63739# We need to do some final tweaking, when everything else is done.
63740#
63741###############################################################################
63742
63743
63744  # Check whether --enable-new-hotspot-build was given.
63745if test "${enable_new_hotspot_build+set}" = set; then :
63746  enableval=$enable_new_hotspot_build;
63747fi
63748
63749
63750   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63751     USE_NEW_HOTSPOT_BUILD=true
63752   else
63753     USE_NEW_HOTSPOT_BUILD=false
63754   fi
63755
63756
63757  case $HOTSPOT_DEBUG_LEVEL in
63758    product )
63759      VARIANT="OPT"
63760      FASTDEBUG="false"
63761      DEBUG_CLASSFILES="false"
63762      ;;
63763    fastdebug )
63764      VARIANT="DBG"
63765      FASTDEBUG="true"
63766      DEBUG_CLASSFILES="true"
63767      ;;
63768    debug )
63769      VARIANT="DBG"
63770      FASTDEBUG="false"
63771      DEBUG_CLASSFILES="true"
63772      ;;
63773    optimized )
63774      VARIANT="OPT"
63775      FASTDEBUG="false"
63776      DEBUG_CLASSFILES="false"
63777      ;;
63778  esac
63779
63780
63781
63782
63783  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63784    MACOSX_UNIVERSAL="true"
63785  fi
63786
63787
63788
63789  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63790  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63791
63792  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63793  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63794  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63795  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63796  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63797  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63798  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63799
63800  #####
63801  # Generate the legacy makefile targets for hotspot.
63802  HOTSPOT_TARGET=""
63803
63804  if test "x$JVM_VARIANT_SERVER" = xtrue; then
63805    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63806  fi
63807
63808  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63809    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63810  fi
63811
63812  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63813    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63814  fi
63815
63816  if test "x$JVM_VARIANT_ZERO" = xtrue; then
63817    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63818  fi
63819
63820  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63821    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63822  fi
63823
63824  if test "x$JVM_VARIANT_CORE" = xtrue; then
63825    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63826  fi
63827
63828  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63829
63830  # On Macosx universal binaries are produced, but they only contain
63831  # 64 bit intel. This invalidates control of which jvms are built
63832  # from configure, but only server is valid anyway. Fix this
63833  # when hotspot makefiles are rewritten.
63834  if test "x$MACOSX_UNIVERSAL" = xtrue; then
63835    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63836  fi
63837
63838  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63839
63840
63841  # Control wether Hotspot runs Queens test after build.
63842  # Check whether --enable-hotspot-test-in-build was given.
63843if test "${enable_hotspot_test_in_build+set}" = set; then :
63844  enableval=$enable_hotspot_test_in_build;
63845else
63846  enable_hotspot_test_in_build=no
63847fi
63848
63849  if test "x$enable_hotspot_test_in_build" = "xyes"; then
63850    TEST_IN_BUILD=true
63851  else
63852    TEST_IN_BUILD=false
63853  fi
63854
63855
63856  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63857    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63858      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63859        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63860      fi
63861    fi
63862    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63863      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63864        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63865      fi
63866    fi
63867    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63868        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63869    fi
63870  fi
63871
63872
63873
63874
63875
63876
63877
63878
63879
63880
63881
63882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63883$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63884
63885  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63886    ENABLE_INTREE_EC=yes
63887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63888$as_echo "yes" >&6; }
63889  else
63890    ENABLE_INTREE_EC=no
63891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63892$as_echo "no" >&6; }
63893  fi
63894
63895
63896
63897
63898  # Check whether --enable-jtreg-failure-handler was given.
63899if test "${enable_jtreg_failure_handler+set}" = set; then :
63900  enableval=$enable_jtreg_failure_handler;
63901fi
63902
63903
63904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63905$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63906
63907  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63908    if test "x$JT_HOME" = "x"; then
63909      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63910    else
63911      BUILD_FAILURE_HANDLER=true
63912      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63913$as_echo "yes, forced" >&6; }
63914    fi
63915  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63916    BUILD_FAILURE_HANDLER=false
63917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63918$as_echo "no, forced" >&6; }
63919  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63920      || test "x$enable_jtreg_failure_handler" = "x"; then
63921    if test "x$JT_HOME" = "x"; then
63922      BUILD_FAILURE_HANDLER=false
63923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63924$as_echo "no, missing jtreg" >&6; }
63925    else
63926      BUILD_FAILURE_HANDLER=true
63927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63928$as_echo "yes, jtreg present" >&6; }
63929    fi
63930  else
63931    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63932  fi
63933
63934
63935
63936
63937###############################################################################
63938#
63939# Configure parts of the build that only affect the build performance,
63940# not the result.
63941#
63942###############################################################################
63943
63944
63945  # How many cores do we have on this build system?
63946
63947# Check whether --with-num-cores was given.
63948if test "${with_num_cores+set}" = set; then :
63949  withval=$with_num_cores;
63950fi
63951
63952  if test "x$with_num_cores" = x; then
63953    # The number of cores were not specified, try to probe them.
63954
63955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63956$as_echo_n "checking for number of cores... " >&6; }
63957  NUM_CORES=1
63958  FOUND_CORES=no
63959
63960  if test -f /proc/cpuinfo; then
63961    # Looks like a Linux (or cygwin) system
63962    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63963    FOUND_CORES=yes
63964  elif test -x /usr/sbin/psrinfo; then
63965    # Looks like a Solaris system
63966    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63967    FOUND_CORES=yes
63968  elif test -x /usr/sbin/sysctl; then
63969    # Looks like a MacOSX system
63970    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63971    FOUND_CORES=yes
63972  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63973    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63974    FOUND_CORES=yes
63975  elif test -n "$NUMBER_OF_PROCESSORS"; then
63976    # On windows, look in the env
63977    NUM_CORES=$NUMBER_OF_PROCESSORS
63978    FOUND_CORES=yes
63979  fi
63980
63981  if test "x$FOUND_CORES" = xyes; then
63982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63983$as_echo "$NUM_CORES" >&6; }
63984  else
63985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63986$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63987    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63988$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63989  fi
63990
63991  else
63992    NUM_CORES=$with_num_cores
63993  fi
63994
63995
63996
63997  # How much memory do we have on this build system?
63998
63999# Check whether --with-memory-size was given.
64000if test "${with_memory_size+set}" = set; then :
64001  withval=$with_memory_size;
64002fi
64003
64004  if test "x$with_memory_size" = x; then
64005    # The memory size was not specified, try to probe it.
64006
64007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64008$as_echo_n "checking for memory size... " >&6; }
64009  # Default to 1024 MB
64010  MEMORY_SIZE=1024
64011  FOUND_MEM=no
64012
64013  if test -f /proc/meminfo; then
64014    # Looks like a Linux (or cygwin) system
64015    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64016    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64017    FOUND_MEM=yes
64018  elif test -x /usr/sbin/prtconf; then
64019    # Looks like a Solaris or AIX system
64020    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64021    FOUND_MEM=yes
64022  elif test -x /usr/sbin/sysctl; then
64023    # Looks like a MacOSX system
64024    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64025    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64026    FOUND_MEM=yes
64027  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64028    # Windows, but without cygwin
64029    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64030    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64031    FOUND_MEM=yes
64032  fi
64033
64034  if test "x$FOUND_MEM" = xyes; then
64035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64036$as_echo "$MEMORY_SIZE MB" >&6; }
64037  else
64038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64039$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64040    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64041$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64042  fi
64043
64044  else
64045    MEMORY_SIZE=$with_memory_size
64046  fi
64047
64048
64049
64050  # Provide a decent default number of parallel jobs for make depending on
64051  # number of cores, amount of memory and machine architecture.
64052
64053# Check whether --with-jobs was given.
64054if test "${with_jobs+set}" = set; then :
64055  withval=$with_jobs;
64056fi
64057
64058  if test "x$with_jobs" = x; then
64059    # Number of jobs was not specified, calculate.
64060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64061$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64062    # Approximate memory in GB.
64063    memory_gb=`expr $MEMORY_SIZE / 1024`
64064    # Pick the lowest of memory in gb and number of cores.
64065    if test "$memory_gb" -lt "$NUM_CORES"; then
64066      JOBS="$memory_gb"
64067    else
64068      JOBS="$NUM_CORES"
64069    fi
64070    if test "$JOBS" -eq "0"; then
64071      JOBS=1
64072    fi
64073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64074$as_echo "$JOBS" >&6; }
64075  else
64076    JOBS=$with_jobs
64077  fi
64078
64079
64080
64081  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64082
64083# Check whether --with-test-jobs was given.
64084if test "${with_test_jobs+set}" = set; then :
64085  withval=$with_test_jobs;
64086fi
64087
64088  if test "x$with_test_jobs" = x; then
64089      TEST_JOBS=0
64090  else
64091      TEST_JOBS=$with_test_jobs
64092  fi
64093
64094
64095
64096# Setup arguments for the boot jdk (after cores and memory have been setup)
64097
64098  ##############################################################################
64099  #
64100  # Specify jvm options for anything that is run with the Boot JDK.
64101  # Not all JVM:s accept the same arguments on the command line.
64102  #
64103
64104# Check whether --with-boot-jdk-jvmargs was given.
64105if test "${with_boot_jdk_jvmargs+set}" = set; then :
64106  withval=$with_boot_jdk_jvmargs;
64107fi
64108
64109
64110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64111$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64112
64113  # Disable special log output when a debug build is used as Boot JDK...
64114
64115  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64116  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64117  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64118  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64119  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64120  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64121    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64122    JVM_ARG_OK=true
64123  else
64124    $ECHO "Arg failed:" >&5
64125    $ECHO "$OUTPUT" >&5
64126    JVM_ARG_OK=false
64127  fi
64128
64129
64130  # Apply user provided options.
64131
64132  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64133  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64134  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64135  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64136  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64137  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64138    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64139    JVM_ARG_OK=true
64140  else
64141    $ECHO "Arg failed:" >&5
64142    $ECHO "$OUTPUT" >&5
64143    JVM_ARG_OK=false
64144  fi
64145
64146
64147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64148$as_echo "$boot_jdk_jvmargs" >&6; }
64149
64150  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64151  JAVA_FLAGS=$boot_jdk_jvmargs
64152
64153
64154
64155  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64156$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64157
64158  # Starting amount of heap memory.
64159
64160  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64161  $ECHO "Command: $JAVA -Xms64M -version" >&5
64162  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64163  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64164  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64165  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64166    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64167    JVM_ARG_OK=true
64168  else
64169    $ECHO "Arg failed:" >&5
64170    $ECHO "$OUTPUT" >&5
64171    JVM_ARG_OK=false
64172  fi
64173
64174
64175  # Maximum amount of heap memory.
64176  # Maximum stack size.
64177  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64178  if test "x$BOOT_JDK_BITS" = "x32"; then
64179    if test "$JVM_MAX_HEAP" -gt "1100"; then
64180      JVM_MAX_HEAP=1100
64181    elif test "$JVM_MAX_HEAP" -lt "512"; then
64182      JVM_MAX_HEAP=512
64183    fi
64184    STACK_SIZE=768
64185  else
64186    # Running a 64 bit JVM allows for and requires a bigger heap
64187    if test "$JVM_MAX_HEAP" -gt "1600"; then
64188      JVM_MAX_HEAP=1600
64189    elif test "$JVM_MAX_HEAP" -lt "512"; then
64190      JVM_MAX_HEAP=512
64191    fi
64192    STACK_SIZE=1536
64193  fi
64194
64195  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64196  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64197  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64198  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64199  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64200  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64201    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64202    JVM_ARG_OK=true
64203  else
64204    $ECHO "Arg failed:" >&5
64205    $ECHO "$OUTPUT" >&5
64206    JVM_ARG_OK=false
64207  fi
64208
64209
64210  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64211  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64212  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64213  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64214  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64215  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64216    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64217    JVM_ARG_OK=true
64218  else
64219    $ECHO "Arg failed:" >&5
64220    $ECHO "$OUTPUT" >&5
64221    JVM_ARG_OK=false
64222  fi
64223
64224
64225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64226$as_echo "$boot_jdk_jvmargs_big" >&6; }
64227
64228  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64229
64230
64231  # By default, the main javac compilations use big
64232  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64233
64234
64235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64236$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64237
64238  # Use serial gc for small short lived tools if possible
64239
64240  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64241  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64242  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64243  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64244  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64245  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64246    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64247    JVM_ARG_OK=true
64248  else
64249    $ECHO "Arg failed:" >&5
64250    $ECHO "$OUTPUT" >&5
64251    JVM_ARG_OK=false
64252  fi
64253
64254
64255  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64256  $ECHO "Command: $JAVA -Xms32M -version" >&5
64257  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64258  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64259  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64260  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64261    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64262    JVM_ARG_OK=true
64263  else
64264    $ECHO "Arg failed:" >&5
64265    $ECHO "$OUTPUT" >&5
64266    JVM_ARG_OK=false
64267  fi
64268
64269
64270  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64271  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64272  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64273  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64274  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64275  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64276    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64277    JVM_ARG_OK=true
64278  else
64279    $ECHO "Arg failed:" >&5
64280    $ECHO "$OUTPUT" >&5
64281    JVM_ARG_OK=false
64282  fi
64283
64284
64285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64286$as_echo "$boot_jdk_jvmargs_small" >&6; }
64287
64288  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64289
64290
64291  JAVA_TOOL_FLAGS_SMALL=""
64292  for f in $JAVA_FLAGS_SMALL; do
64293    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64294  done
64295
64296
64297
64298# Setup smart javac (after cores and memory have been setup)
64299
64300
64301# Check whether --with-sjavac-server-java was given.
64302if test "${with_sjavac_server_java+set}" = set; then :
64303  withval=$with_sjavac_server_java;
64304fi
64305
64306
64307  if test "x$with_sjavac_server_java" != x; then
64308    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64309    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64310    if test "x$FOUND_VERSION" = x; then
64311      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64312    fi
64313  else
64314    SJAVAC_SERVER_JAVA="$JAVA"
64315  fi
64316
64317
64318  if test "$MEMORY_SIZE" -gt "3000"; then
64319
64320  $ECHO "Check if jvm arg is ok: -d64" >&5
64321  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64322  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64323  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64324  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64325  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64326    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64327    JVM_ARG_OK=true
64328  else
64329    $ECHO "Arg failed:" >&5
64330    $ECHO "$OUTPUT" >&5
64331    JVM_ARG_OK=false
64332  fi
64333
64334    if test "$JVM_ARG_OK" = true; then
64335      JVM_64BIT=true
64336      JVM_ARG_OK=false
64337    fi
64338  fi
64339
64340  MX_VALUE=`expr $MEMORY_SIZE / 2`
64341  if test "$JVM_64BIT" = true; then
64342    # Set ms lower than mx since more than one instance of the server might
64343    # get launched at the same time before they figure out which instance won.
64344    MS_VALUE=512
64345    if test "$MX_VALUE" -gt "2048"; then
64346      MX_VALUE=2048
64347    fi
64348  else
64349    MS_VALUE=256
64350    if test "$MX_VALUE" -gt "1500"; then
64351      MX_VALUE=1500
64352    fi
64353  fi
64354  if test "$MX_VALUE" -lt "512"; then
64355    MX_VALUE=512
64356  fi
64357
64358  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64359  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64360  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64361  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64362  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64363  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64364    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64365    JVM_ARG_OK=true
64366  else
64367    $ECHO "Arg failed:" >&5
64368    $ECHO "$OUTPUT" >&5
64369    JVM_ARG_OK=false
64370  fi
64371
64372
64373
64374  # Check whether --enable-sjavac was given.
64375if test "${enable_sjavac+set}" = set; then :
64376  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64377else
64378  ENABLE_SJAVAC="no"
64379fi
64380
64381  if test "x$JVM_ARG_OK" = "xfalse"; then
64382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64383$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64384    ENABLE_SJAVAC="no"
64385  fi
64386  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64387$as_echo_n "checking whether to use sjavac... " >&6; }
64388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64389$as_echo "$ENABLE_SJAVAC" >&6; }
64390
64391
64392  # Check whether --enable-javac-server was given.
64393if test "${enable_javac_server+set}" = set; then :
64394  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64395else
64396  ENABLE_JAVAC_SERVER="yes"
64397fi
64398
64399  if test "x$JVM_ARG_OK" = "xfalse"; then
64400    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64401$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64402    ENABLE_JAVAC_SERVER="no"
64403  fi
64404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64405$as_echo_n "checking whether to use javac server... " >&6; }
64406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64407$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64408
64409
64410  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64411    # When using a server javac, the small client instances do not need much
64412    # resources.
64413    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64414  fi
64415
64416
64417# Setup use of icecc if requested
64418
64419  # Check whether --enable-icecc was given.
64420if test "${enable_icecc+set}" = set; then :
64421  enableval=$enable_icecc;
64422fi
64423
64424
64425  if test "x${enable_icecc}" = "xyes"; then
64426
64427
64428
64429  # Publish this variable in the help.
64430
64431
64432  if [ -z "${ICECC_CMD+x}" ]; then
64433    # The variable is not set by user, try to locate tool using the code snippet
64434    for ac_prog in icecc
64435do
64436  # Extract the first word of "$ac_prog", so it can be a program name with args.
64437set dummy $ac_prog; ac_word=$2
64438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64439$as_echo_n "checking for $ac_word... " >&6; }
64440if ${ac_cv_path_ICECC_CMD+:} false; then :
64441  $as_echo_n "(cached) " >&6
64442else
64443  case $ICECC_CMD in
64444  [\\/]* | ?:[\\/]*)
64445  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64446  ;;
64447  *)
64448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64449for as_dir in $PATH
64450do
64451  IFS=$as_save_IFS
64452  test -z "$as_dir" && as_dir=.
64453    for ac_exec_ext in '' $ac_executable_extensions; do
64454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64455    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64457    break 2
64458  fi
64459done
64460  done
64461IFS=$as_save_IFS
64462
64463  ;;
64464esac
64465fi
64466ICECC_CMD=$ac_cv_path_ICECC_CMD
64467if test -n "$ICECC_CMD"; then
64468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64469$as_echo "$ICECC_CMD" >&6; }
64470else
64471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64472$as_echo "no" >&6; }
64473fi
64474
64475
64476  test -n "$ICECC_CMD" && break
64477done
64478
64479  else
64480    # The variable is set, but is it from the command line or the environment?
64481
64482    # Try to remove the string !ICECC_CMD! from our list.
64483    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64484    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64485      # If it failed, the variable was not from the command line. Ignore it,
64486      # but warn the user (except for BASH, which is always set by the calling BASH).
64487      if test "xICECC_CMD" != xBASH; then
64488        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64489$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64490      fi
64491      # Try to locate tool using the code snippet
64492      for ac_prog in icecc
64493do
64494  # Extract the first word of "$ac_prog", so it can be a program name with args.
64495set dummy $ac_prog; ac_word=$2
64496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64497$as_echo_n "checking for $ac_word... " >&6; }
64498if ${ac_cv_path_ICECC_CMD+:} false; then :
64499  $as_echo_n "(cached) " >&6
64500else
64501  case $ICECC_CMD in
64502  [\\/]* | ?:[\\/]*)
64503  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64504  ;;
64505  *)
64506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64507for as_dir in $PATH
64508do
64509  IFS=$as_save_IFS
64510  test -z "$as_dir" && as_dir=.
64511    for ac_exec_ext in '' $ac_executable_extensions; do
64512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64513    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64515    break 2
64516  fi
64517done
64518  done
64519IFS=$as_save_IFS
64520
64521  ;;
64522esac
64523fi
64524ICECC_CMD=$ac_cv_path_ICECC_CMD
64525if test -n "$ICECC_CMD"; then
64526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64527$as_echo "$ICECC_CMD" >&6; }
64528else
64529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64530$as_echo "no" >&6; }
64531fi
64532
64533
64534  test -n "$ICECC_CMD" && break
64535done
64536
64537    else
64538      # If it succeeded, then it was overridden by the user. We will use it
64539      # for the tool.
64540
64541      # First remove it from the list of overridden variables, so we can test
64542      # for unknown variables in the end.
64543      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64544
64545      # Check if we try to supply an empty value
64546      if test "x$ICECC_CMD" = x; then
64547        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64548$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64549        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64550$as_echo_n "checking for ICECC_CMD... " >&6; }
64551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64552$as_echo "disabled" >&6; }
64553      else
64554        # Check if the provided tool contains a complete path.
64555        tool_specified="$ICECC_CMD"
64556        tool_basename="${tool_specified##*/}"
64557        if test "x$tool_basename" = "x$tool_specified"; then
64558          # A command without a complete path is provided, search $PATH.
64559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64560$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64561          # Extract the first word of "$tool_basename", so it can be a program name with args.
64562set dummy $tool_basename; ac_word=$2
64563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64564$as_echo_n "checking for $ac_word... " >&6; }
64565if ${ac_cv_path_ICECC_CMD+:} false; then :
64566  $as_echo_n "(cached) " >&6
64567else
64568  case $ICECC_CMD in
64569  [\\/]* | ?:[\\/]*)
64570  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64571  ;;
64572  *)
64573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64574for as_dir in $PATH
64575do
64576  IFS=$as_save_IFS
64577  test -z "$as_dir" && as_dir=.
64578    for ac_exec_ext in '' $ac_executable_extensions; do
64579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64580    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64582    break 2
64583  fi
64584done
64585  done
64586IFS=$as_save_IFS
64587
64588  ;;
64589esac
64590fi
64591ICECC_CMD=$ac_cv_path_ICECC_CMD
64592if test -n "$ICECC_CMD"; then
64593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64594$as_echo "$ICECC_CMD" >&6; }
64595else
64596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64597$as_echo "no" >&6; }
64598fi
64599
64600
64601          if test "x$ICECC_CMD" = x; then
64602            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64603          fi
64604        else
64605          # Otherwise we believe it is a complete path. Use it as it is.
64606          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64607$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64608          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64609$as_echo_n "checking for ICECC_CMD... " >&6; }
64610          if test ! -x "$tool_specified"; then
64611            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64612$as_echo "not found" >&6; }
64613            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64614          fi
64615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64616$as_echo "$tool_specified" >&6; }
64617        fi
64618      fi
64619    fi
64620
64621  fi
64622
64623
64624
64625  if test "x$ICECC_CMD" = x; then
64626    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64627  fi
64628
64629
64630    old_path="$PATH"
64631
64632    # Look for icecc-create-env in some known places
64633    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64634
64635
64636
64637  # Publish this variable in the help.
64638
64639
64640  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64641    # The variable is not set by user, try to locate tool using the code snippet
64642    for ac_prog in icecc-create-env
64643do
64644  # Extract the first word of "$ac_prog", so it can be a program name with args.
64645set dummy $ac_prog; ac_word=$2
64646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64647$as_echo_n "checking for $ac_word... " >&6; }
64648if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64649  $as_echo_n "(cached) " >&6
64650else
64651  case $ICECC_CREATE_ENV in
64652  [\\/]* | ?:[\\/]*)
64653  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64654  ;;
64655  *)
64656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64657for as_dir in $PATH
64658do
64659  IFS=$as_save_IFS
64660  test -z "$as_dir" && as_dir=.
64661    for ac_exec_ext in '' $ac_executable_extensions; do
64662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64663    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64665    break 2
64666  fi
64667done
64668  done
64669IFS=$as_save_IFS
64670
64671  ;;
64672esac
64673fi
64674ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64675if test -n "$ICECC_CREATE_ENV"; then
64676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64677$as_echo "$ICECC_CREATE_ENV" >&6; }
64678else
64679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64680$as_echo "no" >&6; }
64681fi
64682
64683
64684  test -n "$ICECC_CREATE_ENV" && break
64685done
64686
64687  else
64688    # The variable is set, but is it from the command line or the environment?
64689
64690    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64693      # If it failed, the variable was not from the command line. Ignore it,
64694      # but warn the user (except for BASH, which is always set by the calling BASH).
64695      if test "xICECC_CREATE_ENV" != xBASH; then
64696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64697$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64698      fi
64699      # Try to locate tool using the code snippet
64700      for ac_prog in icecc-create-env
64701do
64702  # Extract the first word of "$ac_prog", so it can be a program name with args.
64703set dummy $ac_prog; ac_word=$2
64704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64705$as_echo_n "checking for $ac_word... " >&6; }
64706if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64707  $as_echo_n "(cached) " >&6
64708else
64709  case $ICECC_CREATE_ENV in
64710  [\\/]* | ?:[\\/]*)
64711  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64712  ;;
64713  *)
64714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64715for as_dir in $PATH
64716do
64717  IFS=$as_save_IFS
64718  test -z "$as_dir" && as_dir=.
64719    for ac_exec_ext in '' $ac_executable_extensions; do
64720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64721    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64723    break 2
64724  fi
64725done
64726  done
64727IFS=$as_save_IFS
64728
64729  ;;
64730esac
64731fi
64732ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64733if test -n "$ICECC_CREATE_ENV"; then
64734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64735$as_echo "$ICECC_CREATE_ENV" >&6; }
64736else
64737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64738$as_echo "no" >&6; }
64739fi
64740
64741
64742  test -n "$ICECC_CREATE_ENV" && break
64743done
64744
64745    else
64746      # If it succeeded, then it was overridden by the user. We will use it
64747      # for the tool.
64748
64749      # First remove it from the list of overridden variables, so we can test
64750      # for unknown variables in the end.
64751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64752
64753      # Check if we try to supply an empty value
64754      if test "x$ICECC_CREATE_ENV" = x; then
64755        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64756$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64757        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64758$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64759        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64760$as_echo "disabled" >&6; }
64761      else
64762        # Check if the provided tool contains a complete path.
64763        tool_specified="$ICECC_CREATE_ENV"
64764        tool_basename="${tool_specified##*/}"
64765        if test "x$tool_basename" = "x$tool_specified"; then
64766          # A command without a complete path is provided, search $PATH.
64767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64768$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64769          # Extract the first word of "$tool_basename", so it can be a program name with args.
64770set dummy $tool_basename; ac_word=$2
64771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64772$as_echo_n "checking for $ac_word... " >&6; }
64773if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64774  $as_echo_n "(cached) " >&6
64775else
64776  case $ICECC_CREATE_ENV in
64777  [\\/]* | ?:[\\/]*)
64778  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64779  ;;
64780  *)
64781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64782for as_dir in $PATH
64783do
64784  IFS=$as_save_IFS
64785  test -z "$as_dir" && as_dir=.
64786    for ac_exec_ext in '' $ac_executable_extensions; do
64787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64788    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64790    break 2
64791  fi
64792done
64793  done
64794IFS=$as_save_IFS
64795
64796  ;;
64797esac
64798fi
64799ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64800if test -n "$ICECC_CREATE_ENV"; then
64801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64802$as_echo "$ICECC_CREATE_ENV" >&6; }
64803else
64804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64805$as_echo "no" >&6; }
64806fi
64807
64808
64809          if test "x$ICECC_CREATE_ENV" = x; then
64810            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64811          fi
64812        else
64813          # Otherwise we believe it is a complete path. Use it as it is.
64814          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64815$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64816          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64817$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64818          if test ! -x "$tool_specified"; then
64819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64820$as_echo "not found" >&6; }
64821            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64822          fi
64823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64824$as_echo "$tool_specified" >&6; }
64825        fi
64826      fi
64827    fi
64828
64829  fi
64830
64831
64832
64833  if test "x$ICECC_CREATE_ENV" = x; then
64834    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64835  fi
64836
64837
64838    # Use icecc-create-env to create a minimal compilation environment that can
64839    # be sent to the other hosts in the icecream cluster.
64840    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64841    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64842    # Older versions of icecc does not have the --gcc parameter
64843    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64844      icecc_gcc_arg="--gcc"
64845    fi
64846    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64847
64848  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64849      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64850          ${icecc_create_env_log} 2>&1 )
64851  if test "$?" != "0"; then
64852    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64853$as_echo "$as_me: icecc-create-env output:" >&6;}
64854    cat \
64855          ${icecc_create_env_log}
64856    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64857  fi
64858
64859    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64860      # For clang, the icecc compilerwrapper is needed. It usually resides next
64861      # to icecc-create-env.
64862
64863
64864
64865  # Publish this variable in the help.
64866
64867
64868  if [ -z "${ICECC_WRAPPER+x}" ]; then
64869    # The variable is not set by user, try to locate tool using the code snippet
64870    for ac_prog in compilerwrapper
64871do
64872  # Extract the first word of "$ac_prog", so it can be a program name with args.
64873set dummy $ac_prog; ac_word=$2
64874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64875$as_echo_n "checking for $ac_word... " >&6; }
64876if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64877  $as_echo_n "(cached) " >&6
64878else
64879  case $ICECC_WRAPPER in
64880  [\\/]* | ?:[\\/]*)
64881  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64882  ;;
64883  *)
64884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64885for as_dir in $PATH
64886do
64887  IFS=$as_save_IFS
64888  test -z "$as_dir" && as_dir=.
64889    for ac_exec_ext in '' $ac_executable_extensions; do
64890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64891    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64893    break 2
64894  fi
64895done
64896  done
64897IFS=$as_save_IFS
64898
64899  ;;
64900esac
64901fi
64902ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64903if test -n "$ICECC_WRAPPER"; then
64904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64905$as_echo "$ICECC_WRAPPER" >&6; }
64906else
64907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64908$as_echo "no" >&6; }
64909fi
64910
64911
64912  test -n "$ICECC_WRAPPER" && break
64913done
64914
64915  else
64916    # The variable is set, but is it from the command line or the environment?
64917
64918    # Try to remove the string !ICECC_WRAPPER! from our list.
64919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64921      # If it failed, the variable was not from the command line. Ignore it,
64922      # but warn the user (except for BASH, which is always set by the calling BASH).
64923      if test "xICECC_WRAPPER" != xBASH; then
64924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64925$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64926      fi
64927      # Try to locate tool using the code snippet
64928      for ac_prog in compilerwrapper
64929do
64930  # Extract the first word of "$ac_prog", so it can be a program name with args.
64931set dummy $ac_prog; ac_word=$2
64932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64933$as_echo_n "checking for $ac_word... " >&6; }
64934if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64935  $as_echo_n "(cached) " >&6
64936else
64937  case $ICECC_WRAPPER in
64938  [\\/]* | ?:[\\/]*)
64939  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64940  ;;
64941  *)
64942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64943for as_dir in $PATH
64944do
64945  IFS=$as_save_IFS
64946  test -z "$as_dir" && as_dir=.
64947    for ac_exec_ext in '' $ac_executable_extensions; do
64948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64949    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64951    break 2
64952  fi
64953done
64954  done
64955IFS=$as_save_IFS
64956
64957  ;;
64958esac
64959fi
64960ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64961if test -n "$ICECC_WRAPPER"; then
64962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64963$as_echo "$ICECC_WRAPPER" >&6; }
64964else
64965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64966$as_echo "no" >&6; }
64967fi
64968
64969
64970  test -n "$ICECC_WRAPPER" && break
64971done
64972
64973    else
64974      # If it succeeded, then it was overridden by the user. We will use it
64975      # for the tool.
64976
64977      # First remove it from the list of overridden variables, so we can test
64978      # for unknown variables in the end.
64979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64980
64981      # Check if we try to supply an empty value
64982      if test "x$ICECC_WRAPPER" = x; then
64983        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
64984$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
64985        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
64986$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
64987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64988$as_echo "disabled" >&6; }
64989      else
64990        # Check if the provided tool contains a complete path.
64991        tool_specified="$ICECC_WRAPPER"
64992        tool_basename="${tool_specified##*/}"
64993        if test "x$tool_basename" = "x$tool_specified"; then
64994          # A command without a complete path is provided, search $PATH.
64995          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
64996$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
64997          # Extract the first word of "$tool_basename", so it can be a program name with args.
64998set dummy $tool_basename; ac_word=$2
64999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65000$as_echo_n "checking for $ac_word... " >&6; }
65001if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65002  $as_echo_n "(cached) " >&6
65003else
65004  case $ICECC_WRAPPER in
65005  [\\/]* | ?:[\\/]*)
65006  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65007  ;;
65008  *)
65009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65010for as_dir in $PATH
65011do
65012  IFS=$as_save_IFS
65013  test -z "$as_dir" && as_dir=.
65014    for ac_exec_ext in '' $ac_executable_extensions; do
65015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65016    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65018    break 2
65019  fi
65020done
65021  done
65022IFS=$as_save_IFS
65023
65024  ;;
65025esac
65026fi
65027ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65028if test -n "$ICECC_WRAPPER"; then
65029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65030$as_echo "$ICECC_WRAPPER" >&6; }
65031else
65032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65033$as_echo "no" >&6; }
65034fi
65035
65036
65037          if test "x$ICECC_WRAPPER" = x; then
65038            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65039          fi
65040        else
65041          # Otherwise we believe it is a complete path. Use it as it is.
65042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65043$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65044          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65045$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65046          if test ! -x "$tool_specified"; then
65047            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65048$as_echo "not found" >&6; }
65049            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65050          fi
65051          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65052$as_echo "$tool_specified" >&6; }
65053        fi
65054      fi
65055    fi
65056
65057  fi
65058
65059
65060
65061  if test "x$ICECC_WRAPPER" = x; then
65062    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65063  fi
65064
65065
65066
65067  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65068      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65069  if test "$?" != "0"; then
65070    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65071$as_echo "$as_me: icecc-create-env output:" >&6;}
65072    cat ${icecc_create_env_log}
65073    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65074  fi
65075
65076    else
65077      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65078    fi
65079    PATH="$old_path"
65080    # The bundle with the compiler gets a name based on checksums. Parse log file
65081    # to find it.
65082    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65083    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65084    if test ! -f ${ICECC_ENV_BUNDLE}; then
65085      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65086    fi
65087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65088$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65089    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65090$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65091    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65092
65093    if test "x${COMPILE_TYPE}" = "xcross"; then
65094      # If cross compiling, create a separate env package for the build compiler
65095      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65096      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65097      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65098
65099  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65100      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65101            ${icecc_create_env_log_build} 2>&1 )
65102  if test "$?" != "0"; then
65103    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65104$as_echo "$as_me: icecc-create-env output:" >&6;}
65105    cat \
65106            ${icecc_create_env_log_build}
65107    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65108  fi
65109
65110      elif test "x${BUILD_CC##*/}" = "xclang"; then
65111
65112  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65113      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65114  if test "$?" != "0"; then
65115    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65116$as_echo "$as_me: icecc-create-env output:" >&6;}
65117    cat ${icecc_create_env_log_build}
65118    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65119  fi
65120
65121      else
65122        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65123      fi
65124      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65125      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65126      if test ! -f ${ICECC_ENV_BUNDLE}; then
65127        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65128      fi
65129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65130$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65132$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65133      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65134          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65135    else
65136      BUILD_ICECC="${ICECC}"
65137    fi
65138
65139
65140  fi
65141
65142
65143# Can the C/C++ compiler use precompiled headers?
65144
65145
65146  ###############################################################################
65147  #
65148  # Can the C/C++ compiler use precompiled headers?
65149  #
65150  # Check whether --enable-precompiled-headers was given.
65151if test "${enable_precompiled_headers+set}" = set; then :
65152  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65153else
65154  ENABLE_PRECOMPH=yes
65155fi
65156
65157
65158  USE_PRECOMPILED_HEADER=1
65159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65160$as_echo_n "checking If precompiled header is enabled... " >&6; }
65161  if test "x$ENABLE_PRECOMPH" = xno; then
65162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65163$as_echo "no, forced" >&6; }
65164    USE_PRECOMPILED_HEADER=0
65165  elif test "x$ICECC" != "x"; then
65166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65167$as_echo "no, does not work effectively with icecc" >&6; }
65168    USE_PRECOMPILED_HEADER=0
65169  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65171$as_echo "no, does not work with Solaris Studio" >&6; }
65172    USE_PRECOMPILED_HEADER=0
65173  else
65174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65175$as_echo "yes" >&6; }
65176  fi
65177
65178  if test "x$ENABLE_PRECOMPH" = xyes; then
65179    # Check that the compiler actually supports precomp headers.
65180    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65181      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65182$as_echo_n "checking that precompiled headers work... " >&6; }
65183      echo "int alfa();" > conftest.h
65184      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65185      if test ! -f conftest.hpp.gch; then
65186        USE_PRECOMPILED_HEADER=0
65187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65188$as_echo "no" >&6; }
65189      else
65190        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65191$as_echo "yes" >&6; }
65192      fi
65193      rm -f conftest.h conftest.hpp.gch
65194    fi
65195  fi
65196
65197
65198
65199
65200# Setup use of ccache, if available
65201
65202  # Check whether --enable-ccache was given.
65203if test "${enable_ccache+set}" = set; then :
65204  enableval=$enable_ccache;
65205fi
65206
65207
65208  CCACHE=
65209  CCACHE_STATUS=
65210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65211$as_echo_n "checking is ccache enabled... " >&6; }
65212  if test "x$enable_ccache" = xyes; then
65213    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65214      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65215$as_echo "yes" >&6; }
65216      OLD_PATH="$PATH"
65217      if test "x$TOOLCHAIN_PATH" != x; then
65218        PATH=$TOOLCHAIN_PATH:$PATH
65219      fi
65220
65221
65222
65223  # Publish this variable in the help.
65224
65225
65226  if [ -z "${CCACHE+x}" ]; then
65227    # The variable is not set by user, try to locate tool using the code snippet
65228    for ac_prog in ccache
65229do
65230  # Extract the first word of "$ac_prog", so it can be a program name with args.
65231set dummy $ac_prog; ac_word=$2
65232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65233$as_echo_n "checking for $ac_word... " >&6; }
65234if ${ac_cv_path_CCACHE+:} false; then :
65235  $as_echo_n "(cached) " >&6
65236else
65237  case $CCACHE in
65238  [\\/]* | ?:[\\/]*)
65239  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65240  ;;
65241  *)
65242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65243for as_dir in $PATH
65244do
65245  IFS=$as_save_IFS
65246  test -z "$as_dir" && as_dir=.
65247    for ac_exec_ext in '' $ac_executable_extensions; do
65248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65249    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65251    break 2
65252  fi
65253done
65254  done
65255IFS=$as_save_IFS
65256
65257  ;;
65258esac
65259fi
65260CCACHE=$ac_cv_path_CCACHE
65261if test -n "$CCACHE"; then
65262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65263$as_echo "$CCACHE" >&6; }
65264else
65265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65266$as_echo "no" >&6; }
65267fi
65268
65269
65270  test -n "$CCACHE" && break
65271done
65272
65273  else
65274    # The variable is set, but is it from the command line or the environment?
65275
65276    # Try to remove the string !CCACHE! from our list.
65277    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65278    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65279      # If it failed, the variable was not from the command line. Ignore it,
65280      # but warn the user (except for BASH, which is always set by the calling BASH).
65281      if test "xCCACHE" != xBASH; then
65282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65283$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65284      fi
65285      # Try to locate tool using the code snippet
65286      for ac_prog in ccache
65287do
65288  # Extract the first word of "$ac_prog", so it can be a program name with args.
65289set dummy $ac_prog; ac_word=$2
65290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65291$as_echo_n "checking for $ac_word... " >&6; }
65292if ${ac_cv_path_CCACHE+:} false; then :
65293  $as_echo_n "(cached) " >&6
65294else
65295  case $CCACHE in
65296  [\\/]* | ?:[\\/]*)
65297  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65298  ;;
65299  *)
65300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65301for as_dir in $PATH
65302do
65303  IFS=$as_save_IFS
65304  test -z "$as_dir" && as_dir=.
65305    for ac_exec_ext in '' $ac_executable_extensions; do
65306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65307    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65309    break 2
65310  fi
65311done
65312  done
65313IFS=$as_save_IFS
65314
65315  ;;
65316esac
65317fi
65318CCACHE=$ac_cv_path_CCACHE
65319if test -n "$CCACHE"; then
65320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65321$as_echo "$CCACHE" >&6; }
65322else
65323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65324$as_echo "no" >&6; }
65325fi
65326
65327
65328  test -n "$CCACHE" && break
65329done
65330
65331    else
65332      # If it succeeded, then it was overridden by the user. We will use it
65333      # for the tool.
65334
65335      # First remove it from the list of overridden variables, so we can test
65336      # for unknown variables in the end.
65337      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65338
65339      # Check if we try to supply an empty value
65340      if test "x$CCACHE" = x; then
65341        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65342$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65343        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65344$as_echo_n "checking for CCACHE... " >&6; }
65345        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65346$as_echo "disabled" >&6; }
65347      else
65348        # Check if the provided tool contains a complete path.
65349        tool_specified="$CCACHE"
65350        tool_basename="${tool_specified##*/}"
65351        if test "x$tool_basename" = "x$tool_specified"; then
65352          # A command without a complete path is provided, search $PATH.
65353          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65354$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65355          # Extract the first word of "$tool_basename", so it can be a program name with args.
65356set dummy $tool_basename; ac_word=$2
65357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65358$as_echo_n "checking for $ac_word... " >&6; }
65359if ${ac_cv_path_CCACHE+:} false; then :
65360  $as_echo_n "(cached) " >&6
65361else
65362  case $CCACHE in
65363  [\\/]* | ?:[\\/]*)
65364  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65365  ;;
65366  *)
65367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65368for as_dir in $PATH
65369do
65370  IFS=$as_save_IFS
65371  test -z "$as_dir" && as_dir=.
65372    for ac_exec_ext in '' $ac_executable_extensions; do
65373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65374    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65376    break 2
65377  fi
65378done
65379  done
65380IFS=$as_save_IFS
65381
65382  ;;
65383esac
65384fi
65385CCACHE=$ac_cv_path_CCACHE
65386if test -n "$CCACHE"; then
65387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65388$as_echo "$CCACHE" >&6; }
65389else
65390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65391$as_echo "no" >&6; }
65392fi
65393
65394
65395          if test "x$CCACHE" = x; then
65396            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65397          fi
65398        else
65399          # Otherwise we believe it is a complete path. Use it as it is.
65400          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65401$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65402          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65403$as_echo_n "checking for CCACHE... " >&6; }
65404          if test ! -x "$tool_specified"; then
65405            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65406$as_echo "not found" >&6; }
65407            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65408          fi
65409          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65410$as_echo "$tool_specified" >&6; }
65411        fi
65412      fi
65413    fi
65414
65415  fi
65416
65417
65418
65419  if test "x$CCACHE" = x; then
65420    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65421  fi
65422
65423
65424      PATH="$OLD_PATH"
65425      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65426      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65427    else
65428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65429$as_echo "no" >&6; }
65430      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65431$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65432    fi
65433  elif test "x$enable_ccache" = xno; then
65434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65435$as_echo "no, explicitly disabled" >&6; }
65436    CCACHE_STATUS="Disabled"
65437  elif test "x$enable_ccache" = x; then
65438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65439$as_echo "no" >&6; }
65440  else
65441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65442$as_echo "unknown" >&6; }
65443    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65444  fi
65445
65446
65447
65448# Check whether --with-ccache-dir was given.
65449if test "${with_ccache_dir+set}" = set; then :
65450  withval=$with_ccache_dir;
65451fi
65452
65453
65454  if test "x$with_ccache_dir" != x; then
65455    # When using a non home ccache directory, assume the use is to share ccache files
65456    # with other users. Thus change the umask.
65457    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65458    if test "x$CCACHE" = x; then
65459      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65460$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65461    fi
65462  fi
65463
65464  if test "x$CCACHE" != x; then
65465
65466  if test "x$CCACHE" != x; then
65467    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65468      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65469          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65470      if test "x$HAS_BAD_CCACHE" != "x"; then
65471        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65472      fi
65473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65474$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65475      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65476      PUSHED_FLAGS="$CXXFLAGS"
65477      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65478      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65479/* end confdefs.h.  */
65480
65481int
65482main ()
65483{
65484
65485  ;
65486  return 0;
65487}
65488_ACEOF
65489if ac_fn_cxx_try_compile "$LINENO"; then :
65490  CC_KNOWS_CCACHE_TRICK=yes
65491else
65492  CC_KNOWS_CCACHE_TRICK=no
65493fi
65494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65495      CXXFLAGS="$PUSHED_FLAGS"
65496      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65498$as_echo "yes" >&6; }
65499        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65500
65501        CCACHE_SLOPPINESS=pch_defines,time_macros
65502      else
65503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65504$as_echo "no" >&6; }
65505        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65506      fi
65507    fi
65508
65509    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65510        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65511
65512    if test "x$SET_CCACHE_DIR" != x; then
65513      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65514      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65515    fi
65516  fi
65517
65518  fi
65519
65520
65521###############################################################################
65522#
65523# And now the finish...
65524#
65525###############################################################################
65526
65527# Check for some common pitfalls
65528
65529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65530    file_to_test="$SRC_ROOT/LICENSE"
65531    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65532      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
65533    fi
65534  fi
65535
65536
65537  # Did user specify any unknown variables?
65538
65539  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65540    # Replace the separating ! with spaces before presenting for end user.
65541    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65542    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65543$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65544  fi
65545
65546
65547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65548$as_echo_n "checking if build directory is on local disk... " >&6; }
65549
65550  # df -l lists only local disks; if the given directory is not found then
65551  # a non-zero exit code is given
65552  if test "x$DF" = x; then
65553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65554      # msys does not have df; use Windows "net use" instead.
65555      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65556      if test "x$IS_NETWORK_DISK" = x; then
65557        OUTPUT_DIR_IS_LOCAL="yes"
65558      else
65559        OUTPUT_DIR_IS_LOCAL="no"
65560      fi
65561    else
65562      # No df here, say it's local
65563      OUTPUT_DIR_IS_LOCAL="yes"
65564    fi
65565  else
65566    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65567      OUTPUT_DIR_IS_LOCAL="yes"
65568    else
65569      OUTPUT_DIR_IS_LOCAL="no"
65570    fi
65571  fi
65572
65573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65574$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65575
65576
65577
65578  # Check if the user has any old-style ALT_ variables set.
65579  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65580
65581  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65582  # Since we can't properly handle the dependencies for this, warn the user about the situation
65583  if test -e $OUTPUT_ROOT/spec.gmk; then
65584    IS_RECONFIGURE=yes
65585  else
65586    IS_RECONFIGURE=no
65587  fi
65588
65589
65590# At the end, call the custom hook. (Dummy macro if no custom sources available)
65591
65592
65593# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65594
65595  # Keep feature lists sorted and free of duplicates
65596  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65597  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65598  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65599  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65600  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65601  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65602  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65603
65604  # Validate features
65605  for variant in $JVM_VARIANTS; do
65606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65607$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65608    features_var_name=JVM_FEATURES_$variant
65609    JVM_FEATURES_TO_TEST=${!features_var_name}
65610    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65611$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65612    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65613    if test "x$INVALID_FEATURES" != x; then
65614      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65615    fi
65616  done
65617
65618
65619# We're messing a bit with internal autoconf variables to put the config.status
65620# in the output directory instead of the current directory.
65621CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65622
65623# Create the actual output files. Now the main work of configure is done.
65624cat >confcache <<\_ACEOF
65625# This file is a shell script that caches the results of configure
65626# tests run on this system so they can be shared between configure
65627# scripts and configure runs, see configure's option --config-cache.
65628# It is not useful on other systems.  If it contains results you don't
65629# want to keep, you may remove or edit it.
65630#
65631# config.status only pays attention to the cache file if you give it
65632# the --recheck option to rerun configure.
65633#
65634# `ac_cv_env_foo' variables (set or unset) will be overridden when
65635# loading this file, other *unset* `ac_cv_foo' will be assigned the
65636# following values.
65637
65638_ACEOF
65639
65640# The following way of writing the cache mishandles newlines in values,
65641# but we know of no workaround that is simple, portable, and efficient.
65642# So, we kill variables containing newlines.
65643# Ultrix sh set writes to stderr and can't be redirected directly,
65644# and sets the high bit in the cache file unless we assign to the vars.
65645(
65646  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65647    eval ac_val=\$$ac_var
65648    case $ac_val in #(
65649    *${as_nl}*)
65650      case $ac_var in #(
65651      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65652$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65653      esac
65654      case $ac_var in #(
65655      _ | IFS | as_nl) ;; #(
65656      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65657      *) { eval $ac_var=; unset $ac_var;} ;;
65658      esac ;;
65659    esac
65660  done
65661
65662  (set) 2>&1 |
65663    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65664    *${as_nl}ac_space=\ *)
65665      # `set' does not quote correctly, so add quotes: double-quote
65666      # substitution turns \\\\ into \\, and sed turns \\ into \.
65667      sed -n \
65668	"s/'/'\\\\''/g;
65669	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65670      ;; #(
65671    *)
65672      # `set' quotes correctly as required by POSIX, so do not add quotes.
65673      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65674      ;;
65675    esac |
65676    sort
65677) |
65678  sed '
65679     /^ac_cv_env_/b end
65680     t clear
65681     :clear
65682     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65683     t end
65684     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65685     :end' >>confcache
65686if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65687  if test -w "$cache_file"; then
65688    if test "x$cache_file" != "x/dev/null"; then
65689      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65690$as_echo "$as_me: updating cache $cache_file" >&6;}
65691      if test ! -f "$cache_file" || test -h "$cache_file"; then
65692	cat confcache >"$cache_file"
65693      else
65694        case $cache_file in #(
65695        */* | ?:*)
65696	  mv -f confcache "$cache_file"$$ &&
65697	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65698        *)
65699	  mv -f confcache "$cache_file" ;;
65700	esac
65701      fi
65702    fi
65703  else
65704    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65705$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65706  fi
65707fi
65708rm -f confcache
65709
65710test "x$prefix" = xNONE && prefix=$ac_default_prefix
65711# Let make expand exec_prefix.
65712test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65713
65714# Transform confdefs.h into DEFS.
65715# Protect against shell expansion while executing Makefile rules.
65716# Protect against Makefile macro expansion.
65717#
65718# If the first sed substitution is executed (which looks for macros that
65719# take arguments), then branch to the quote section.  Otherwise,
65720# look for a macro that doesn't take arguments.
65721ac_script='
65722:mline
65723/\\$/{
65724 N
65725 s,\\\n,,
65726 b mline
65727}
65728t clear
65729:clear
65730s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65731t quote
65732s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65733t quote
65734b any
65735:quote
65736s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65737s/\[/\\&/g
65738s/\]/\\&/g
65739s/\$/$$/g
65740H
65741:any
65742${
65743	g
65744	s/^\n//
65745	s/\n/ /g
65746	p
65747}
65748'
65749DEFS=`sed -n "$ac_script" confdefs.h`
65750
65751
65752ac_libobjs=
65753ac_ltlibobjs=
65754U=
65755for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65756  # 1. Remove the extension, and $U if already installed.
65757  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65758  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65759  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65760  #    will be set to the directory where LIBOBJS objects are built.
65761  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65762  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65763done
65764LIBOBJS=$ac_libobjs
65765
65766LTLIBOBJS=$ac_ltlibobjs
65767
65768
65769
65770: "${CONFIG_STATUS=./config.status}"
65771ac_write_fail=0
65772ac_clean_files_save=$ac_clean_files
65773ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65774{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65775$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65776as_write_fail=0
65777cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65778#! $SHELL
65779# Generated by $as_me.
65780# Run this file to recreate the current configuration.
65781# Compiler output produced by configure, useful for debugging
65782# configure, is in config.log if it exists.
65783
65784debug=false
65785ac_cs_recheck=false
65786ac_cs_silent=false
65787
65788SHELL=\${CONFIG_SHELL-$SHELL}
65789export SHELL
65790_ASEOF
65791cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65792## -------------------- ##
65793## M4sh Initialization. ##
65794## -------------------- ##
65795
65796# Be more Bourne compatible
65797DUALCASE=1; export DUALCASE # for MKS sh
65798if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65799  emulate sh
65800  NULLCMD=:
65801  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65802  # is contrary to our usage.  Disable this feature.
65803  alias -g '${1+"$@"}'='"$@"'
65804  setopt NO_GLOB_SUBST
65805else
65806  case `(set -o) 2>/dev/null` in #(
65807  *posix*) :
65808    set -o posix ;; #(
65809  *) :
65810     ;;
65811esac
65812fi
65813
65814
65815as_nl='
65816'
65817export as_nl
65818# Printing a long string crashes Solaris 7 /usr/bin/printf.
65819as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65820as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65821as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65822# Prefer a ksh shell builtin over an external printf program on Solaris,
65823# but without wasting forks for bash or zsh.
65824if test -z "$BASH_VERSION$ZSH_VERSION" \
65825    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65826  as_echo='print -r --'
65827  as_echo_n='print -rn --'
65828elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65829  as_echo='printf %s\n'
65830  as_echo_n='printf %s'
65831else
65832  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65833    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65834    as_echo_n='/usr/ucb/echo -n'
65835  else
65836    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65837    as_echo_n_body='eval
65838      arg=$1;
65839      case $arg in #(
65840      *"$as_nl"*)
65841	expr "X$arg" : "X\\(.*\\)$as_nl";
65842	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65843      esac;
65844      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65845    '
65846    export as_echo_n_body
65847    as_echo_n='sh -c $as_echo_n_body as_echo'
65848  fi
65849  export as_echo_body
65850  as_echo='sh -c $as_echo_body as_echo'
65851fi
65852
65853# The user is always right.
65854if test "${PATH_SEPARATOR+set}" != set; then
65855  PATH_SEPARATOR=:
65856  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65857    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65858      PATH_SEPARATOR=';'
65859  }
65860fi
65861
65862
65863# IFS
65864# We need space, tab and new line, in precisely that order.  Quoting is
65865# there to prevent editors from complaining about space-tab.
65866# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65867# splitting by setting IFS to empty value.)
65868IFS=" ""	$as_nl"
65869
65870# Find who we are.  Look in the path if we contain no directory separator.
65871as_myself=
65872case $0 in #((
65873  *[\\/]* ) as_myself=$0 ;;
65874  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65875for as_dir in $PATH
65876do
65877  IFS=$as_save_IFS
65878  test -z "$as_dir" && as_dir=.
65879    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65880  done
65881IFS=$as_save_IFS
65882
65883     ;;
65884esac
65885# We did not find ourselves, most probably we were run as `sh COMMAND'
65886# in which case we are not to be found in the path.
65887if test "x$as_myself" = x; then
65888  as_myself=$0
65889fi
65890if test ! -f "$as_myself"; then
65891  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65892  exit 1
65893fi
65894
65895# Unset variables that we do not need and which cause bugs (e.g. in
65896# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65897# suppresses any "Segmentation fault" message there.  '((' could
65898# trigger a bug in pdksh 5.2.14.
65899for as_var in BASH_ENV ENV MAIL MAILPATH
65900do eval test x\${$as_var+set} = xset \
65901  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65902done
65903PS1='$ '
65904PS2='> '
65905PS4='+ '
65906
65907# NLS nuisances.
65908LC_ALL=C
65909export LC_ALL
65910LANGUAGE=C
65911export LANGUAGE
65912
65913# CDPATH.
65914(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65915
65916
65917# as_fn_error STATUS ERROR [LINENO LOG_FD]
65918# ----------------------------------------
65919# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65920# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65921# script with STATUS, using 1 if that was 0.
65922as_fn_error ()
65923{
65924  as_status=$1; test $as_status -eq 0 && as_status=1
65925  if test "$4"; then
65926    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65927    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65928  fi
65929  $as_echo "$as_me: error: $2" >&2
65930  as_fn_exit $as_status
65931} # as_fn_error
65932
65933
65934# as_fn_set_status STATUS
65935# -----------------------
65936# Set $? to STATUS, without forking.
65937as_fn_set_status ()
65938{
65939  return $1
65940} # as_fn_set_status
65941
65942# as_fn_exit STATUS
65943# -----------------
65944# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65945as_fn_exit ()
65946{
65947  set +e
65948  as_fn_set_status $1
65949  exit $1
65950} # as_fn_exit
65951
65952# as_fn_unset VAR
65953# ---------------
65954# Portably unset VAR.
65955as_fn_unset ()
65956{
65957  { eval $1=; unset $1;}
65958}
65959as_unset=as_fn_unset
65960# as_fn_append VAR VALUE
65961# ----------------------
65962# Append the text in VALUE to the end of the definition contained in VAR. Take
65963# advantage of any shell optimizations that allow amortized linear growth over
65964# repeated appends, instead of the typical quadratic growth present in naive
65965# implementations.
65966if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65967  eval 'as_fn_append ()
65968  {
65969    eval $1+=\$2
65970  }'
65971else
65972  as_fn_append ()
65973  {
65974    eval $1=\$$1\$2
65975  }
65976fi # as_fn_append
65977
65978# as_fn_arith ARG...
65979# ------------------
65980# Perform arithmetic evaluation on the ARGs, and store the result in the
65981# global $as_val. Take advantage of shells that can avoid forks. The arguments
65982# must be portable across $(()) and expr.
65983if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
65984  eval 'as_fn_arith ()
65985  {
65986    as_val=$(( $* ))
65987  }'
65988else
65989  as_fn_arith ()
65990  {
65991    as_val=`expr "$@" || test $? -eq 1`
65992  }
65993fi # as_fn_arith
65994
65995
65996if expr a : '\(a\)' >/dev/null 2>&1 &&
65997   test "X`expr 00001 : '.*\(...\)'`" = X001; then
65998  as_expr=expr
65999else
66000  as_expr=false
66001fi
66002
66003if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66004  as_basename=basename
66005else
66006  as_basename=false
66007fi
66008
66009if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66010  as_dirname=dirname
66011else
66012  as_dirname=false
66013fi
66014
66015as_me=`$as_basename -- "$0" ||
66016$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66017	 X"$0" : 'X\(//\)$' \| \
66018	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66019$as_echo X/"$0" |
66020    sed '/^.*\/\([^/][^/]*\)\/*$/{
66021	    s//\1/
66022	    q
66023	  }
66024	  /^X\/\(\/\/\)$/{
66025	    s//\1/
66026	    q
66027	  }
66028	  /^X\/\(\/\).*/{
66029	    s//\1/
66030	    q
66031	  }
66032	  s/.*/./; q'`
66033
66034# Avoid depending upon Character Ranges.
66035as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66036as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66037as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66038as_cr_digits='0123456789'
66039as_cr_alnum=$as_cr_Letters$as_cr_digits
66040
66041ECHO_C= ECHO_N= ECHO_T=
66042case `echo -n x` in #(((((
66043-n*)
66044  case `echo 'xy\c'` in
66045  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66046  xy)  ECHO_C='\c';;
66047  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66048       ECHO_T='	';;
66049  esac;;
66050*)
66051  ECHO_N='-n';;
66052esac
66053
66054rm -f conf$$ conf$$.exe conf$$.file
66055if test -d conf$$.dir; then
66056  rm -f conf$$.dir/conf$$.file
66057else
66058  rm -f conf$$.dir
66059  mkdir conf$$.dir 2>/dev/null
66060fi
66061if (echo >conf$$.file) 2>/dev/null; then
66062  if ln -s conf$$.file conf$$ 2>/dev/null; then
66063    as_ln_s='ln -s'
66064    # ... but there are two gotchas:
66065    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66066    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66067    # In both cases, we have to default to `cp -pR'.
66068    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66069      as_ln_s='cp -pR'
66070  elif ln conf$$.file conf$$ 2>/dev/null; then
66071    as_ln_s=ln
66072  else
66073    as_ln_s='cp -pR'
66074  fi
66075else
66076  as_ln_s='cp -pR'
66077fi
66078rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66079rmdir conf$$.dir 2>/dev/null
66080
66081
66082# as_fn_mkdir_p
66083# -------------
66084# Create "$as_dir" as a directory, including parents if necessary.
66085as_fn_mkdir_p ()
66086{
66087
66088  case $as_dir in #(
66089  -*) as_dir=./$as_dir;;
66090  esac
66091  test -d "$as_dir" || eval $as_mkdir_p || {
66092    as_dirs=
66093    while :; do
66094      case $as_dir in #(
66095      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66096      *) as_qdir=$as_dir;;
66097      esac
66098      as_dirs="'$as_qdir' $as_dirs"
66099      as_dir=`$as_dirname -- "$as_dir" ||
66100$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66101	 X"$as_dir" : 'X\(//\)[^/]' \| \
66102	 X"$as_dir" : 'X\(//\)$' \| \
66103	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66104$as_echo X"$as_dir" |
66105    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66106	    s//\1/
66107	    q
66108	  }
66109	  /^X\(\/\/\)[^/].*/{
66110	    s//\1/
66111	    q
66112	  }
66113	  /^X\(\/\/\)$/{
66114	    s//\1/
66115	    q
66116	  }
66117	  /^X\(\/\).*/{
66118	    s//\1/
66119	    q
66120	  }
66121	  s/.*/./; q'`
66122      test -d "$as_dir" && break
66123    done
66124    test -z "$as_dirs" || eval "mkdir $as_dirs"
66125  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66126
66127
66128} # as_fn_mkdir_p
66129if mkdir -p . 2>/dev/null; then
66130  as_mkdir_p='mkdir -p "$as_dir"'
66131else
66132  test -d ./-p && rmdir ./-p
66133  as_mkdir_p=false
66134fi
66135
66136
66137# as_fn_executable_p FILE
66138# -----------------------
66139# Test if FILE is an executable regular file.
66140as_fn_executable_p ()
66141{
66142  test -f "$1" && test -x "$1"
66143} # as_fn_executable_p
66144as_test_x='test -x'
66145as_executable_p=as_fn_executable_p
66146
66147# Sed expression to map a string onto a valid CPP name.
66148as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66149
66150# Sed expression to map a string onto a valid variable name.
66151as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66152
66153
66154exec 6>&1
66155## ----------------------------------- ##
66156## Main body of $CONFIG_STATUS script. ##
66157## ----------------------------------- ##
66158_ASEOF
66159test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66160
66161cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66162# Save the log message, to keep $0 and so on meaningful, and to
66163# report actual input values of CONFIG_FILES etc. instead of their
66164# values after options handling.
66165ac_log="
66166This file was extended by OpenJDK $as_me jdk9, which was
66167generated by GNU Autoconf 2.69.  Invocation command line was
66168
66169  CONFIG_FILES    = $CONFIG_FILES
66170  CONFIG_HEADERS  = $CONFIG_HEADERS
66171  CONFIG_LINKS    = $CONFIG_LINKS
66172  CONFIG_COMMANDS = $CONFIG_COMMANDS
66173  $ $0 $@
66174
66175on `(hostname || uname -n) 2>/dev/null | sed 1q`
66176"
66177
66178_ACEOF
66179
66180case $ac_config_files in *"
66181"*) set x $ac_config_files; shift; ac_config_files=$*;;
66182esac
66183
66184
66185
66186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66187# Files that config.status was made for.
66188config_files="$ac_config_files"
66189
66190_ACEOF
66191
66192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66193ac_cs_usage="\
66194\`$as_me' instantiates files and other configuration actions
66195from templates according to the current configuration.  Unless the files
66196and actions are specified as TAGs, all are instantiated by default.
66197
66198Usage: $0 [OPTION]... [TAG]...
66199
66200  -h, --help       print this help, then exit
66201  -V, --version    print version number and configuration settings, then exit
66202      --config     print configuration, then exit
66203  -q, --quiet, --silent
66204                   do not print progress messages
66205  -d, --debug      don't remove temporary files
66206      --recheck    update $as_me by reconfiguring in the same conditions
66207      --file=FILE[:TEMPLATE]
66208                   instantiate the configuration file FILE
66209
66210Configuration files:
66211$config_files
66212
66213Report bugs to <build-dev@openjdk.java.net>.
66214OpenJDK home page: <http://openjdk.java.net>."
66215
66216_ACEOF
66217cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66218ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66219ac_cs_version="\\
66220OpenJDK config.status jdk9
66221configured by $0, generated by GNU Autoconf 2.69,
66222  with options \\"\$ac_cs_config\\"
66223
66224Copyright (C) 2012 Free Software Foundation, Inc.
66225This config.status script is free software; the Free Software Foundation
66226gives unlimited permission to copy, distribute and modify it."
66227
66228ac_pwd='$ac_pwd'
66229srcdir='$srcdir'
66230AWK='$AWK'
66231test -n "\$AWK" || AWK=awk
66232_ACEOF
66233
66234cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66235# The default lists apply if the user does not specify any file.
66236ac_need_defaults=:
66237while test $# != 0
66238do
66239  case $1 in
66240  --*=?*)
66241    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66242    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66243    ac_shift=:
66244    ;;
66245  --*=)
66246    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66247    ac_optarg=
66248    ac_shift=:
66249    ;;
66250  *)
66251    ac_option=$1
66252    ac_optarg=$2
66253    ac_shift=shift
66254    ;;
66255  esac
66256
66257  case $ac_option in
66258  # Handling of the options.
66259  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66260    ac_cs_recheck=: ;;
66261  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66262    $as_echo "$ac_cs_version"; exit ;;
66263  --config | --confi | --conf | --con | --co | --c )
66264    $as_echo "$ac_cs_config"; exit ;;
66265  --debug | --debu | --deb | --de | --d | -d )
66266    debug=: ;;
66267  --file | --fil | --fi | --f )
66268    $ac_shift
66269    case $ac_optarg in
66270    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66271    '') as_fn_error $? "missing file argument" ;;
66272    esac
66273    as_fn_append CONFIG_FILES " '$ac_optarg'"
66274    ac_need_defaults=false;;
66275  --he | --h |  --help | --hel | -h )
66276    $as_echo "$ac_cs_usage"; exit ;;
66277  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66278  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66279    ac_cs_silent=: ;;
66280
66281  # This is an error.
66282  -*) as_fn_error $? "unrecognized option: \`$1'
66283Try \`$0 --help' for more information." ;;
66284
66285  *) as_fn_append ac_config_targets " $1"
66286     ac_need_defaults=false ;;
66287
66288  esac
66289  shift
66290done
66291
66292ac_configure_extra_args=
66293
66294if $ac_cs_silent; then
66295  exec 6>/dev/null
66296  ac_configure_extra_args="$ac_configure_extra_args --silent"
66297fi
66298
66299_ACEOF
66300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66301if \$ac_cs_recheck; then
66302  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66303  shift
66304  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66305  CONFIG_SHELL='$SHELL'
66306  export CONFIG_SHELL
66307  exec "\$@"
66308fi
66309
66310_ACEOF
66311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66312exec 5>>config.log
66313{
66314  echo
66315  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66316## Running $as_me. ##
66317_ASBOX
66318  $as_echo "$ac_log"
66319} >&5
66320
66321_ACEOF
66322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66323_ACEOF
66324
66325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66326
66327# Handling of arguments.
66328for ac_config_target in $ac_config_targets
66329do
66330  case $ac_config_target in
66331    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66332    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66333    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66334    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66335    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66336    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66337
66338  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66339  esac
66340done
66341
66342
66343# If the user did not use the arguments to specify the items to instantiate,
66344# then the envvar interface is used.  Set only those that are not.
66345# We use the long form for the default assignment because of an extremely
66346# bizarre bug on SunOS 4.1.3.
66347if $ac_need_defaults; then
66348  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66349fi
66350
66351# Have a temporary directory for convenience.  Make it in the build tree
66352# simply because there is no reason against having it here, and in addition,
66353# creating and moving files from /tmp can sometimes cause problems.
66354# Hook for its removal unless debugging.
66355# Note that there is a small window in which the directory will not be cleaned:
66356# after its creation but before its name has been assigned to `$tmp'.
66357$debug ||
66358{
66359  tmp= ac_tmp=
66360  trap 'exit_status=$?
66361  : "${ac_tmp:=$tmp}"
66362  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66363' 0
66364  trap 'as_fn_exit 1' 1 2 13 15
66365}
66366# Create a (secure) tmp directory for tmp files.
66367
66368{
66369  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66370  test -d "$tmp"
66371}  ||
66372{
66373  tmp=./conf$$-$RANDOM
66374  (umask 077 && mkdir "$tmp")
66375} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66376ac_tmp=$tmp
66377
66378# Set up the scripts for CONFIG_FILES section.
66379# No need to generate them if there are no CONFIG_FILES.
66380# This happens for instance with `./config.status config.h'.
66381if test -n "$CONFIG_FILES"; then
66382
66383
66384ac_cr=`echo X | tr X '\015'`
66385# On cygwin, bash can eat \r inside `` if the user requested igncr.
66386# But we know of no other shell where ac_cr would be empty at this
66387# point, so we can use a bashism as a fallback.
66388if test "x$ac_cr" = x; then
66389  eval ac_cr=\$\'\\r\'
66390fi
66391ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66392if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66393  ac_cs_awk_cr='\\r'
66394else
66395  ac_cs_awk_cr=$ac_cr
66396fi
66397
66398echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66399_ACEOF
66400
66401
66402{
66403  echo "cat >conf$$subs.awk <<_ACEOF" &&
66404  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66405  echo "_ACEOF"
66406} >conf$$subs.sh ||
66407  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66408ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66409ac_delim='%!_!# '
66410for ac_last_try in false false false false false :; do
66411  . ./conf$$subs.sh ||
66412    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66413
66414  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66415  if test $ac_delim_n = $ac_delim_num; then
66416    break
66417  elif $ac_last_try; then
66418    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66419  else
66420    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66421  fi
66422done
66423rm -f conf$$subs.sh
66424
66425cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66426cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66427_ACEOF
66428sed -n '
66429h
66430s/^/S["/; s/!.*/"]=/
66431p
66432g
66433s/^[^!]*!//
66434:repl
66435t repl
66436s/'"$ac_delim"'$//
66437t delim
66438:nl
66439h
66440s/\(.\{148\}\)..*/\1/
66441t more1
66442s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66443p
66444n
66445b repl
66446:more1
66447s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66448p
66449g
66450s/.\{148\}//
66451t nl
66452:delim
66453h
66454s/\(.\{148\}\)..*/\1/
66455t more2
66456s/["\\]/\\&/g; s/^/"/; s/$/"/
66457p
66458b
66459:more2
66460s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66461p
66462g
66463s/.\{148\}//
66464t delim
66465' <conf$$subs.awk | sed '
66466/^[^""]/{
66467  N
66468  s/\n//
66469}
66470' >>$CONFIG_STATUS || ac_write_fail=1
66471rm -f conf$$subs.awk
66472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66473_ACAWK
66474cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66475  for (key in S) S_is_set[key] = 1
66476  FS = ""
66477
66478}
66479{
66480  line = $ 0
66481  nfields = split(line, field, "@")
66482  substed = 0
66483  len = length(field[1])
66484  for (i = 2; i < nfields; i++) {
66485    key = field[i]
66486    keylen = length(key)
66487    if (S_is_set[key]) {
66488      value = S[key]
66489      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66490      len += length(value) + length(field[++i])
66491      substed = 1
66492    } else
66493      len += 1 + keylen
66494  }
66495
66496  print line
66497}
66498
66499_ACAWK
66500_ACEOF
66501cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66502if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66503  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66504else
66505  cat
66506fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66507  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66508_ACEOF
66509
66510# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66511# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66512# trailing colons and then remove the whole line if VPATH becomes empty
66513# (actually we leave an empty line to preserve line numbers).
66514if test "x$srcdir" = x.; then
66515  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66516h
66517s///
66518s/^/:/
66519s/[	 ]*$/:/
66520s/:\$(srcdir):/:/g
66521s/:\${srcdir}:/:/g
66522s/:@srcdir@:/:/g
66523s/^:*//
66524s/:*$//
66525x
66526s/\(=[	 ]*\).*/\1/
66527G
66528s/\n//
66529s/^[^=]*=[	 ]*$//
66530}'
66531fi
66532
66533cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66534fi # test -n "$CONFIG_FILES"
66535
66536
66537eval set X "  :F $CONFIG_FILES      "
66538shift
66539for ac_tag
66540do
66541  case $ac_tag in
66542  :[FHLC]) ac_mode=$ac_tag; continue;;
66543  esac
66544  case $ac_mode$ac_tag in
66545  :[FHL]*:*);;
66546  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66547  :[FH]-) ac_tag=-:-;;
66548  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66549  esac
66550  ac_save_IFS=$IFS
66551  IFS=:
66552  set x $ac_tag
66553  IFS=$ac_save_IFS
66554  shift
66555  ac_file=$1
66556  shift
66557
66558  case $ac_mode in
66559  :L) ac_source=$1;;
66560  :[FH])
66561    ac_file_inputs=
66562    for ac_f
66563    do
66564      case $ac_f in
66565      -) ac_f="$ac_tmp/stdin";;
66566      *) # Look for the file first in the build tree, then in the source tree
66567	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66568	 # because $ac_f cannot contain `:'.
66569	 test -f "$ac_f" ||
66570	   case $ac_f in
66571	   [\\/$]*) false;;
66572	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66573	   esac ||
66574	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66575      esac
66576      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66577      as_fn_append ac_file_inputs " '$ac_f'"
66578    done
66579
66580    # Let's still pretend it is `configure' which instantiates (i.e., don't
66581    # use $as_me), people would be surprised to read:
66582    #    /* config.h.  Generated by config.status.  */
66583    configure_input='Generated from '`
66584	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66585	`' by configure.'
66586    if test x"$ac_file" != x-; then
66587      configure_input="$ac_file.  $configure_input"
66588      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66589$as_echo "$as_me: creating $ac_file" >&6;}
66590    fi
66591    # Neutralize special characters interpreted by sed in replacement strings.
66592    case $configure_input in #(
66593    *\&* | *\|* | *\\* )
66594       ac_sed_conf_input=`$as_echo "$configure_input" |
66595       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66596    *) ac_sed_conf_input=$configure_input;;
66597    esac
66598
66599    case $ac_tag in
66600    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66601      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66602    esac
66603    ;;
66604  esac
66605
66606  ac_dir=`$as_dirname -- "$ac_file" ||
66607$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66608	 X"$ac_file" : 'X\(//\)[^/]' \| \
66609	 X"$ac_file" : 'X\(//\)$' \| \
66610	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66611$as_echo X"$ac_file" |
66612    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66613	    s//\1/
66614	    q
66615	  }
66616	  /^X\(\/\/\)[^/].*/{
66617	    s//\1/
66618	    q
66619	  }
66620	  /^X\(\/\/\)$/{
66621	    s//\1/
66622	    q
66623	  }
66624	  /^X\(\/\).*/{
66625	    s//\1/
66626	    q
66627	  }
66628	  s/.*/./; q'`
66629  as_dir="$ac_dir"; as_fn_mkdir_p
66630  ac_builddir=.
66631
66632case "$ac_dir" in
66633.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66634*)
66635  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66636  # A ".." for each directory in $ac_dir_suffix.
66637  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66638  case $ac_top_builddir_sub in
66639  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66640  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66641  esac ;;
66642esac
66643ac_abs_top_builddir=$ac_pwd
66644ac_abs_builddir=$ac_pwd$ac_dir_suffix
66645# for backward compatibility:
66646ac_top_builddir=$ac_top_build_prefix
66647
66648case $srcdir in
66649  .)  # We are building in place.
66650    ac_srcdir=.
66651    ac_top_srcdir=$ac_top_builddir_sub
66652    ac_abs_top_srcdir=$ac_pwd ;;
66653  [\\/]* | ?:[\\/]* )  # Absolute name.
66654    ac_srcdir=$srcdir$ac_dir_suffix;
66655    ac_top_srcdir=$srcdir
66656    ac_abs_top_srcdir=$srcdir ;;
66657  *) # Relative name.
66658    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66659    ac_top_srcdir=$ac_top_build_prefix$srcdir
66660    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66661esac
66662ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66663
66664
66665  case $ac_mode in
66666  :F)
66667  #
66668  # CONFIG_FILE
66669  #
66670
66671_ACEOF
66672
66673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66674# If the template does not know about datarootdir, expand it.
66675# FIXME: This hack should be removed a few years after 2.60.
66676ac_datarootdir_hack=; ac_datarootdir_seen=
66677ac_sed_dataroot='
66678/datarootdir/ {
66679  p
66680  q
66681}
66682/@datadir@/p
66683/@docdir@/p
66684/@infodir@/p
66685/@localedir@/p
66686/@mandir@/p'
66687case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66688*datarootdir*) ac_datarootdir_seen=yes;;
66689*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66690  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66691$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66692_ACEOF
66693cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66694  ac_datarootdir_hack='
66695  s&@datadir@&$datadir&g
66696  s&@docdir@&$docdir&g
66697  s&@infodir@&$infodir&g
66698  s&@localedir@&$localedir&g
66699  s&@mandir@&$mandir&g
66700  s&\\\${datarootdir}&$datarootdir&g' ;;
66701esac
66702_ACEOF
66703
66704# Neutralize VPATH when `$srcdir' = `.'.
66705# Shell code in configure.ac might set extrasub.
66706# FIXME: do we really want to maintain this feature?
66707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66708ac_sed_extra="$ac_vpsub
66709$extrasub
66710_ACEOF
66711cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66712:t
66713/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66714s|@configure_input@|$ac_sed_conf_input|;t t
66715s&@top_builddir@&$ac_top_builddir_sub&;t t
66716s&@top_build_prefix@&$ac_top_build_prefix&;t t
66717s&@srcdir@&$ac_srcdir&;t t
66718s&@abs_srcdir@&$ac_abs_srcdir&;t t
66719s&@top_srcdir@&$ac_top_srcdir&;t t
66720s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66721s&@builddir@&$ac_builddir&;t t
66722s&@abs_builddir@&$ac_abs_builddir&;t t
66723s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66724$ac_datarootdir_hack
66725"
66726eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66727  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66728
66729test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66730  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66731  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66732      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66733  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66734which seems to be undefined.  Please make sure it is defined" >&5
66735$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66736which seems to be undefined.  Please make sure it is defined" >&2;}
66737
66738  rm -f "$ac_tmp/stdin"
66739  case $ac_file in
66740  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66741  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66742  esac \
66743  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66744 ;;
66745
66746
66747
66748  esac
66749
66750done # for ac_tag
66751
66752
66753as_fn_exit 0
66754_ACEOF
66755ac_clean_files=$ac_clean_files_save
66756
66757test $ac_write_fail = 0 ||
66758  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66759
66760
66761# configure is writing to config.log, and then calls config.status.
66762# config.status does its own redirection, appending to config.log.
66763# Unfortunately, on DOS this fails, as config.log is still kept open
66764# by configure, so config.status won't be able to write to it; its
66765# output is simply discarded.  So we exec the FD to /dev/null,
66766# effectively closing config.log, so it can be properly (re)opened and
66767# appended to by config.status.  When coming back to configure, we
66768# need to make the FD available again.
66769if test "$no_create" != yes; then
66770  ac_cs_success=:
66771  ac_config_status_args=
66772  test "$silent" = yes &&
66773    ac_config_status_args="$ac_config_status_args --quiet"
66774  exec 5>/dev/null
66775  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66776  exec 5>>config.log
66777  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66778  # would make configure fail if this is the last instruction.
66779  $ac_cs_success || as_fn_exit 1
66780fi
66781if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66782  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66783$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66784fi
66785
66786
66787# After AC_OUTPUT, we need to do final work
66788
66789
66790  # Try to move config.log (generated by autoconf) to the configure-support directory.
66791  if test -e ./config.log; then
66792    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66793  fi
66794
66795  # Rotate our log file (configure.log)
66796  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66797    $RM -f "$OUTPUT_ROOT/configure.log.old"
66798  fi
66799  if test -e "$OUTPUT_ROOT/configure.log"; then
66800    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66801  fi
66802
66803  # Move configure.log from current directory to the build output root
66804  if test -e ./configure.log; then
66805    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66806  fi
66807
66808  # Make the compare script executable
66809  $CHMOD +x $OUTPUT_ROOT/compare.sh
66810
66811
66812# Finally output some useful information to the user
66813
66814  # Finally output some useful information to the user
66815
66816  printf "\n"
66817  printf "====================================================\n"
66818  if test "x$no_create" != "xyes"; then
66819    if test "x$IS_RECONFIGURE" != "xyes"; then
66820      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66821    else
66822      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66823    fi
66824  else
66825    if test "x$IS_RECONFIGURE" != "xyes"; then
66826      printf "A configuration has been successfully checked but not created\n"
66827    else
66828      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66829    fi
66830  fi
66831  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66832    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66833  else
66834    printf "using default settings.\n"
66835  fi
66836
66837  printf "\n"
66838  printf "Configuration summary:\n"
66839  printf "* Debug level:    $DEBUG_LEVEL\n"
66840  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66841  printf "* JDK variant:    $JDK_VARIANT\n"
66842  printf "* JVM variants:   $JVM_VARIANTS\n"
66843  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66844  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66845
66846  printf "\n"
66847  printf "Tools summary:\n"
66848  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66849    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66850  fi
66851  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66852  if test "x$TOOLCHAIN_VERSION" != "x"; then
66853    print_version=" $TOOLCHAIN_VERSION"
66854  fi
66855  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66856  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66857  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66858
66859  printf "\n"
66860  printf "Build performance summary:\n"
66861  printf "* Cores to use:   $JOBS\n"
66862  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66863  if test "x$CCACHE_STATUS" != "x"; then
66864    printf "* ccache status:  $CCACHE_STATUS\n"
66865  fi
66866  printf "\n"
66867
66868  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66869    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66870    printf "will result in longer build times.\n"
66871    printf "\n"
66872  fi
66873
66874  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66875    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66876    printf "These are not respected, and will be ignored. It is recommended\n"
66877    printf "that you clean your environment. The following variables are set:\n"
66878    printf "$FOUND_ALT_VARIABLES\n"
66879    printf "\n"
66880  fi
66881
66882  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66883    printf "WARNING: Your build output directory is not on a local disk.\n"
66884    printf "This will severely degrade build performance!\n"
66885    printf "It is recommended that you create an output directory on a local disk,\n"
66886    printf "and run the configure script again from that directory.\n"
66887    printf "\n"
66888  fi
66889
66890  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66891    printf "WARNING: The result of this configuration has overridden an older\n"
66892    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66893    printf "proper build. Failure to do so might result in strange build problems.\n"
66894    printf "\n"
66895  fi
66896
66897  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66898    printf "WARNING: The result of this configuration was not saved.\n"
66899    printf "You should run without '--no-create | -n' to create the configuration.\n"
66900    printf "\n"
66901  fi
66902
66903
66904
66905  # Locate config.log.
66906  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66907    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66908  elif test -e "./config.log"; then
66909    CONFIG_LOG_PATH="."
66910  fi
66911
66912  if test -e "$CONFIG_LOG_PATH/config.log"; then
66913    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66914    if test $? -eq 0; then
66915      printf "The following warnings were produced. Repeated here for convenience:\n"
66916      # We must quote sed expression (using []) to stop m4 from eating the [].
66917      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66918      printf "\n"
66919    fi
66920  fi
66921
66922