generated-configure.sh revision 2052:f70030d86af1
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
899EXTERNAL_BUILDJDK
900BUILD_JDK
901CREATE_BUILDJDK
902BOOT_JDK_BITS
903JAVAC_FLAGS
904BOOT_JDK_MODULAR
905BOOT_JDK_SOURCETARGET
906JARSIGNER
907JAR
908JAVAH
909JAVAC
910JAVA
911BOOT_JDK
912JAVA_CHECK
913JAVAC_CHECK
914VERSION_IS_GA
915VERSION_SHORT
916VERSION_STRING
917VERSION_NUMBER_FOUR_POSITIONS
918VERSION_NUMBER
919VERSION_OPT
920VERSION_BUILD
921VERSION_PRE
922VERSION_PATCH
923VERSION_SECURITY
924VERSION_MINOR
925VERSION_MAJOR
926MACOSX_BUNDLE_ID_BASE
927MACOSX_BUNDLE_NAME_BASE
928HOTSPOT_VM_DISTRO
929COMPANY_NAME
930JDK_RC_PLATFORM_NAME
931PRODUCT_SUFFIX
932PRODUCT_NAME
933LAUNCHER_NAME
934JLINK_KEEP_PACKAGED_MODULES
935COPYRIGHT_YEAR
936COMPRESS_JARS
937INCLUDE_SA
938UNLIMITED_CRYPTO
939CACERTS_FILE
940BUILD_HEADLESS
941SUPPORT_HEADFUL
942SUPPORT_HEADLESS
943DEFAULT_MAKE_TARGET
944OS_VERSION_MICRO
945OS_VERSION_MINOR
946OS_VERSION_MAJOR
947PKG_CONFIG
948BASH_ARGS
949SETFILE
950CODESIGN
951XATTR
952DSYMUTIL
953IS_GNU_TIME
954PATCH
955DTRACE
956TIME
957STAT
958HG
959READELF
960OTOOL
961LDD
962ZIP
963UNZIP
964FIND_DELETE
965OUTPUT_SYNC
966OUTPUT_SYNC_SUPPORTED
967CHECK_TOOLSDIR_MAKE
968CHECK_TOOLSDIR_GMAKE
969CHECK_MAKE
970CHECK_GMAKE
971MAKE
972PKGHANDLER
973CONFIGURESUPPORT_OUTPUTDIR
974OUTPUT_ROOT
975CONF_NAME
976SPEC
977SDKROOT
978XCODEBUILD
979VALID_JVM_VARIANTS
980JVM_VARIANTS
981DEBUG_LEVEL
982HOTSPOT_DEBUG_LEVEL
983JDK_VARIANT
984SET_OPENJDK
985USERNAME
986CANONICAL_TOPDIR
987ORIGINAL_TOPDIR
988TOPDIR
989PATH_SEP
990ZERO_ARCHDEF
991HOTSPOT_BUILD_CPU_DEFINE
992HOTSPOT_BUILD_CPU_ARCH
993HOTSPOT_BUILD_CPU
994HOTSPOT_BUILD_OS_TYPE
995HOTSPOT_BUILD_OS
996OPENJDK_BUILD_OS_EXPORT_DIR
997OPENJDK_BUILD_CPU_JLI_CFLAGS
998OPENJDK_BUILD_CPU_OSARCH
999OPENJDK_BUILD_CPU_ISADIR
1000OPENJDK_BUILD_CPU_LIBDIR
1001OPENJDK_BUILD_CPU_LEGACY_LIB
1002OPENJDK_BUILD_CPU_LEGACY
1003HOTSPOT_TARGET_CPU_DEFINE
1004HOTSPOT_TARGET_CPU_ARCH
1005HOTSPOT_TARGET_CPU
1006HOTSPOT_TARGET_OS_TYPE
1007HOTSPOT_TARGET_OS
1008DEFINE_CROSS_COMPILE_ARCH
1009LP64
1010OPENJDK_TARGET_OS_EXPORT_DIR
1011OPENJDK_TARGET_CPU_JLI_CFLAGS
1012OPENJDK_TARGET_CPU_OSARCH
1013OPENJDK_TARGET_CPU_ISADIR
1014OPENJDK_TARGET_CPU_LIBDIR
1015OPENJDK_TARGET_CPU_LEGACY_LIB
1016OPENJDK_TARGET_CPU_LEGACY
1017REQUIRED_OS_VERSION
1018REQUIRED_OS_NAME
1019COMPILE_TYPE
1020OPENJDK_TARGET_CPU_ENDIAN
1021OPENJDK_TARGET_CPU_BITS
1022OPENJDK_TARGET_CPU_ARCH
1023OPENJDK_TARGET_CPU
1024OPENJDK_TARGET_OS_ENV
1025OPENJDK_TARGET_OS_TYPE
1026OPENJDK_TARGET_OS
1027OPENJDK_BUILD_CPU_ENDIAN
1028OPENJDK_BUILD_CPU_BITS
1029OPENJDK_BUILD_CPU_ARCH
1030OPENJDK_BUILD_CPU
1031OPENJDK_BUILD_OS_ENV
1032OPENJDK_BUILD_OS_TYPE
1033OPENJDK_BUILD_OS
1034OPENJDK_BUILD_AUTOCONF_NAME
1035OPENJDK_TARGET_AUTOCONF_NAME
1036target_os
1037target_vendor
1038target_cpu
1039target
1040host_os
1041host_vendor
1042host_cpu
1043host
1044build_os
1045build_vendor
1046build_cpu
1047build
1048NICE
1049CPIO
1050DF
1051READLINK
1052CYGPATH
1053SED
1054FGREP
1055EGREP
1056GREP
1057AWK
1058XARGS
1059WHICH
1060WC
1061UNIQ
1062UNAME
1063TR
1064TOUCH
1065TEE
1066TAR
1067TAIL
1068SORT
1069SH
1070RMDIR
1071RM
1072PRINTF
1073NAWK
1074MV
1075MKTEMP
1076MKDIR
1077LS
1078LN
1079HEAD
1080FIND
1081FILE
1082EXPR
1083ECHO
1084DIRNAME
1085DIFF
1086DATE
1087CUT
1088CP
1089COMM
1090CMP
1091CHMOD
1092CAT
1093BASH
1094BASENAME
1095DATE_WHEN_CONFIGURED
1096ORIGINAL_PATH
1097CONFIGURE_COMMAND_LINE
1098target_alias
1099host_alias
1100build_alias
1101LIBS
1102ECHO_T
1103ECHO_N
1104ECHO_C
1105DEFS
1106mandir
1107localedir
1108libdir
1109psdir
1110pdfdir
1111dvidir
1112htmldir
1113infodir
1114docdir
1115oldincludedir
1116includedir
1117localstatedir
1118sharedstatedir
1119sysconfdir
1120datadir
1121datarootdir
1122libexecdir
1123sbindir
1124bindir
1125program_transform_name
1126prefix
1127exec_prefix
1128PACKAGE_URL
1129PACKAGE_BUGREPORT
1130PACKAGE_STRING
1131PACKAGE_VERSION
1132PACKAGE_TARNAME
1133PACKAGE_NAME
1134PATH_SEPARATOR
1135SHELL'
1136ac_subst_files=''
1137ac_user_opts='
1138enable_option_checking
1139with_target_bits
1140enable_openjdk_only
1141with_custom_make_dir
1142with_jdk_variant
1143enable_debug
1144with_debug_level
1145with_jvm_variants
1146with_devkit
1147with_sys_root
1148with_sysroot
1149with_tools_dir
1150with_toolchain_path
1151with_extra_path
1152with_sdk_name
1153with_conf_name
1154with_output_sync
1155with_default_make_target
1156enable_headful
1157with_cacerts_file
1158enable_unlimited_crypto
1159with_copyright_year
1160enable_keep_packaged_modules
1161with_milestone
1162with_update_version
1163with_user_release_suffix
1164with_build_number
1165with_version_string
1166with_version_pre
1167with_version_opt
1168with_version_build
1169with_version_major
1170with_version_minor
1171with_version_security
1172with_version_patch
1173with_boot_jdk
1174with_build_jdk
1175with_add_source_root
1176with_override_source_root
1177with_adds_and_overrides
1178with_override_langtools
1179with_override_corba
1180with_override_jaxp
1181with_override_jaxws
1182with_override_hotspot
1183with_override_nashorn
1184with_override_jdk
1185with_import_hotspot
1186with_import_modules
1187enable_static_build
1188with_toolchain_type
1189with_extra_cflags
1190with_extra_cxxflags
1191with_extra_ldflags
1192with_toolchain_version
1193with_build_devkit
1194with_jtreg
1195enable_warnings_as_errors
1196with_native_debug_symbols
1197enable_debug_symbols
1198enable_zip_debug_info
1199enable_native_coverage
1200enable_dtrace
1201with_jvm_features
1202with_jvm_interpreter
1203with_stdc__lib
1204with_msvcr_dll
1205with_msvcp_dll
1206with_x
1207with_cups
1208with_cups_include
1209with_freetype
1210with_freetype_include
1211with_freetype_lib
1212with_freetype_src
1213enable_freetype_bundling
1214with_alsa
1215with_alsa_include
1216with_alsa_lib
1217with_libffi
1218with_libffi_include
1219with_libffi_lib
1220with_libjpeg
1221with_giflib
1222with_libpng
1223with_zlib
1224with_lcms
1225with_dxsdk
1226with_dxsdk_lib
1227with_dxsdk_include
1228enable_new_hotspot_build
1229enable_hotspot_test_in_build
1230enable_jtreg_failure_handler
1231with_num_cores
1232with_memory_size
1233with_jobs
1234with_test_jobs
1235with_boot_jdk_jvmargs
1236with_sjavac_server_java
1237enable_sjavac
1238enable_javac_server
1239enable_icecc
1240enable_precompiled_headers
1241enable_ccache
1242with_ccache_dir
1243'
1244      ac_precious_vars='build_alias
1245host_alias
1246target_alias
1247BASENAME
1248BASH
1249CAT
1250CHMOD
1251CMP
1252COMM
1253CP
1254CUT
1255DATE
1256DIFF
1257DIRNAME
1258ECHO
1259EXPR
1260FILE
1261FIND
1262HEAD
1263LN
1264LS
1265MKDIR
1266MKTEMP
1267MV
1268NAWK
1269PRINTF
1270RM
1271RMDIR
1272SH
1273SORT
1274TAIL
1275TAR
1276TEE
1277TOUCH
1278TR
1279UNAME
1280UNIQ
1281WC
1282WHICH
1283XARGS
1284AWK
1285GREP
1286EGREP
1287FGREP
1288SED
1289CYGPATH
1290READLINK
1291DF
1292CPIO
1293NICE
1294MAKE
1295UNZIP
1296ZIP
1297LDD
1298OTOOL
1299READELF
1300HG
1301STAT
1302TIME
1303DTRACE
1304PATCH
1305DSYMUTIL
1306XATTR
1307CODESIGN
1308SETFILE
1309PKG_CONFIG
1310JAVA
1311JAVAC
1312JAVAH
1313JAR
1314JARSIGNER
1315CC
1316CFLAGS
1317LDFLAGS
1318LIBS
1319CPPFLAGS
1320CXX
1321CXXFLAGS
1322CCC
1323CPP
1324CXXCPP
1325AS
1326AR
1327LIPO
1328STRIP
1329NM
1330GNM
1331OBJCOPY
1332OBJDUMP
1333BUILD_CC
1334BUILD_CXX
1335BUILD_NM
1336BUILD_AR
1337BUILD_OBJCOPY
1338BUILD_STRIP
1339JTREGEXE
1340XMKMF
1341FREETYPE_CFLAGS
1342FREETYPE_LIBS
1343ALSA_CFLAGS
1344ALSA_LIBS
1345LIBFFI_CFLAGS
1346LIBFFI_LIBS
1347PNG_CFLAGS
1348PNG_LIBS
1349LCMS_CFLAGS
1350LCMS_LIBS
1351ICECC_CMD
1352ICECC_CREATE_ENV
1353ICECC_WRAPPER
1354CCACHE'
1355
1356
1357# Initialize some variables set by options.
1358ac_init_help=
1359ac_init_version=false
1360ac_unrecognized_opts=
1361ac_unrecognized_sep=
1362# The variables have the same names as the options, with
1363# dashes changed to underlines.
1364cache_file=/dev/null
1365exec_prefix=NONE
1366no_create=
1367no_recursion=
1368prefix=NONE
1369program_prefix=NONE
1370program_suffix=NONE
1371program_transform_name=s,x,x,
1372silent=
1373site=
1374srcdir=
1375verbose=
1376x_includes=NONE
1377x_libraries=NONE
1378
1379# Installation directory options.
1380# These are left unexpanded so users can "make install exec_prefix=/foo"
1381# and all the variables that are supposed to be based on exec_prefix
1382# by default will actually change.
1383# Use braces instead of parens because sh, perl, etc. also accept them.
1384# (The list follows the same order as the GNU Coding Standards.)
1385bindir='${exec_prefix}/bin'
1386sbindir='${exec_prefix}/sbin'
1387libexecdir='${exec_prefix}/libexec'
1388datarootdir='${prefix}/share'
1389datadir='${datarootdir}'
1390sysconfdir='${prefix}/etc'
1391sharedstatedir='${prefix}/com'
1392localstatedir='${prefix}/var'
1393includedir='${prefix}/include'
1394oldincludedir='/usr/include'
1395docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1396infodir='${datarootdir}/info'
1397htmldir='${docdir}'
1398dvidir='${docdir}'
1399pdfdir='${docdir}'
1400psdir='${docdir}'
1401libdir='${exec_prefix}/lib'
1402localedir='${datarootdir}/locale'
1403mandir='${datarootdir}/man'
1404
1405ac_prev=
1406ac_dashdash=
1407for ac_option
1408do
1409  # If the previous option needs an argument, assign it.
1410  if test -n "$ac_prev"; then
1411    eval $ac_prev=\$ac_option
1412    ac_prev=
1413    continue
1414  fi
1415
1416  case $ac_option in
1417  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1418  *=)   ac_optarg= ;;
1419  *)    ac_optarg=yes ;;
1420  esac
1421
1422  # Accept the important Cygnus configure options, so we can diagnose typos.
1423
1424  case $ac_dashdash$ac_option in
1425  --)
1426    ac_dashdash=yes ;;
1427
1428  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1429    ac_prev=bindir ;;
1430  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1431    bindir=$ac_optarg ;;
1432
1433  -build | --build | --buil | --bui | --bu)
1434    ac_prev=build_alias ;;
1435  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1436    build_alias=$ac_optarg ;;
1437
1438  -cache-file | --cache-file | --cache-fil | --cache-fi \
1439  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1440    ac_prev=cache_file ;;
1441  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1442  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1443    cache_file=$ac_optarg ;;
1444
1445  --config-cache | -C)
1446    cache_file=config.cache ;;
1447
1448  -datadir | --datadir | --datadi | --datad)
1449    ac_prev=datadir ;;
1450  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1451    datadir=$ac_optarg ;;
1452
1453  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1454  | --dataroo | --dataro | --datar)
1455    ac_prev=datarootdir ;;
1456  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1457  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1458    datarootdir=$ac_optarg ;;
1459
1460  -disable-* | --disable-*)
1461    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1462    # Reject names that are not valid shell variable names.
1463    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1464      as_fn_error $? "invalid feature name: $ac_useropt"
1465    ac_useropt_orig=$ac_useropt
1466    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1467    case $ac_user_opts in
1468      *"
1469"enable_$ac_useropt"
1470"*) ;;
1471      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1472	 ac_unrecognized_sep=', ';;
1473    esac
1474    eval enable_$ac_useropt=no ;;
1475
1476  -docdir | --docdir | --docdi | --doc | --do)
1477    ac_prev=docdir ;;
1478  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1479    docdir=$ac_optarg ;;
1480
1481  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1482    ac_prev=dvidir ;;
1483  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1484    dvidir=$ac_optarg ;;
1485
1486  -enable-* | --enable-*)
1487    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1488    # Reject names that are not valid shell variable names.
1489    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1490      as_fn_error $? "invalid feature name: $ac_useropt"
1491    ac_useropt_orig=$ac_useropt
1492    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1493    case $ac_user_opts in
1494      *"
1495"enable_$ac_useropt"
1496"*) ;;
1497      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1498	 ac_unrecognized_sep=', ';;
1499    esac
1500    eval enable_$ac_useropt=\$ac_optarg ;;
1501
1502  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1503  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1504  | --exec | --exe | --ex)
1505    ac_prev=exec_prefix ;;
1506  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1507  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1508  | --exec=* | --exe=* | --ex=*)
1509    exec_prefix=$ac_optarg ;;
1510
1511  -gas | --gas | --ga | --g)
1512    # Obsolete; use --with-gas.
1513    with_gas=yes ;;
1514
1515  -help | --help | --hel | --he | -h)
1516    ac_init_help=long ;;
1517  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1518    ac_init_help=recursive ;;
1519  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1520    ac_init_help=short ;;
1521
1522  -host | --host | --hos | --ho)
1523    ac_prev=host_alias ;;
1524  -host=* | --host=* | --hos=* | --ho=*)
1525    host_alias=$ac_optarg ;;
1526
1527  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1528    ac_prev=htmldir ;;
1529  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1530  | --ht=*)
1531    htmldir=$ac_optarg ;;
1532
1533  -includedir | --includedir | --includedi | --included | --include \
1534  | --includ | --inclu | --incl | --inc)
1535    ac_prev=includedir ;;
1536  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1537  | --includ=* | --inclu=* | --incl=* | --inc=*)
1538    includedir=$ac_optarg ;;
1539
1540  -infodir | --infodir | --infodi | --infod | --info | --inf)
1541    ac_prev=infodir ;;
1542  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1543    infodir=$ac_optarg ;;
1544
1545  -libdir | --libdir | --libdi | --libd)
1546    ac_prev=libdir ;;
1547  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1548    libdir=$ac_optarg ;;
1549
1550  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1551  | --libexe | --libex | --libe)
1552    ac_prev=libexecdir ;;
1553  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1554  | --libexe=* | --libex=* | --libe=*)
1555    libexecdir=$ac_optarg ;;
1556
1557  -localedir | --localedir | --localedi | --localed | --locale)
1558    ac_prev=localedir ;;
1559  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1560    localedir=$ac_optarg ;;
1561
1562  -localstatedir | --localstatedir | --localstatedi | --localstated \
1563  | --localstate | --localstat | --localsta | --localst | --locals)
1564    ac_prev=localstatedir ;;
1565  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1566  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1567    localstatedir=$ac_optarg ;;
1568
1569  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1570    ac_prev=mandir ;;
1571  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1572    mandir=$ac_optarg ;;
1573
1574  -nfp | --nfp | --nf)
1575    # Obsolete; use --without-fp.
1576    with_fp=no ;;
1577
1578  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1579  | --no-cr | --no-c | -n)
1580    no_create=yes ;;
1581
1582  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1583  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1584    no_recursion=yes ;;
1585
1586  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1587  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1588  | --oldin | --oldi | --old | --ol | --o)
1589    ac_prev=oldincludedir ;;
1590  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1591  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1592  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1593    oldincludedir=$ac_optarg ;;
1594
1595  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1596    ac_prev=prefix ;;
1597  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1598    prefix=$ac_optarg ;;
1599
1600  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1601  | --program-pre | --program-pr | --program-p)
1602    ac_prev=program_prefix ;;
1603  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1604  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1605    program_prefix=$ac_optarg ;;
1606
1607  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1608  | --program-suf | --program-su | --program-s)
1609    ac_prev=program_suffix ;;
1610  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1611  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1612    program_suffix=$ac_optarg ;;
1613
1614  -program-transform-name | --program-transform-name \
1615  | --program-transform-nam | --program-transform-na \
1616  | --program-transform-n | --program-transform- \
1617  | --program-transform | --program-transfor \
1618  | --program-transfo | --program-transf \
1619  | --program-trans | --program-tran \
1620  | --progr-tra | --program-tr | --program-t)
1621    ac_prev=program_transform_name ;;
1622  -program-transform-name=* | --program-transform-name=* \
1623  | --program-transform-nam=* | --program-transform-na=* \
1624  | --program-transform-n=* | --program-transform-=* \
1625  | --program-transform=* | --program-transfor=* \
1626  | --program-transfo=* | --program-transf=* \
1627  | --program-trans=* | --program-tran=* \
1628  | --progr-tra=* | --program-tr=* | --program-t=*)
1629    program_transform_name=$ac_optarg ;;
1630
1631  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1632    ac_prev=pdfdir ;;
1633  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1634    pdfdir=$ac_optarg ;;
1635
1636  -psdir | --psdir | --psdi | --psd | --ps)
1637    ac_prev=psdir ;;
1638  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1639    psdir=$ac_optarg ;;
1640
1641  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1642  | -silent | --silent | --silen | --sile | --sil)
1643    silent=yes ;;
1644
1645  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1646    ac_prev=sbindir ;;
1647  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1648  | --sbi=* | --sb=*)
1649    sbindir=$ac_optarg ;;
1650
1651  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1652  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1653  | --sharedst | --shareds | --shared | --share | --shar \
1654  | --sha | --sh)
1655    ac_prev=sharedstatedir ;;
1656  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1657  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1658  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1659  | --sha=* | --sh=*)
1660    sharedstatedir=$ac_optarg ;;
1661
1662  -site | --site | --sit)
1663    ac_prev=site ;;
1664  -site=* | --site=* | --sit=*)
1665    site=$ac_optarg ;;
1666
1667  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1668    ac_prev=srcdir ;;
1669  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1670    srcdir=$ac_optarg ;;
1671
1672  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1673  | --syscon | --sysco | --sysc | --sys | --sy)
1674    ac_prev=sysconfdir ;;
1675  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1676  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1677    sysconfdir=$ac_optarg ;;
1678
1679  -target | --target | --targe | --targ | --tar | --ta | --t)
1680    ac_prev=target_alias ;;
1681  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1682    target_alias=$ac_optarg ;;
1683
1684  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1685    verbose=yes ;;
1686
1687  -version | --version | --versio | --versi | --vers | -V)
1688    ac_init_version=: ;;
1689
1690  -with-* | --with-*)
1691    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1692    # Reject names that are not valid shell variable names.
1693    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694      as_fn_error $? "invalid package name: $ac_useropt"
1695    ac_useropt_orig=$ac_useropt
1696    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697    case $ac_user_opts in
1698      *"
1699"with_$ac_useropt"
1700"*) ;;
1701      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1702	 ac_unrecognized_sep=', ';;
1703    esac
1704    eval with_$ac_useropt=\$ac_optarg ;;
1705
1706  -without-* | --without-*)
1707    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1708    # Reject names that are not valid shell variable names.
1709    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1710      as_fn_error $? "invalid package name: $ac_useropt"
1711    ac_useropt_orig=$ac_useropt
1712    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1713    case $ac_user_opts in
1714      *"
1715"with_$ac_useropt"
1716"*) ;;
1717      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1718	 ac_unrecognized_sep=', ';;
1719    esac
1720    eval with_$ac_useropt=no ;;
1721
1722  --x)
1723    # Obsolete; use --with-x.
1724    with_x=yes ;;
1725
1726  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1727  | --x-incl | --x-inc | --x-in | --x-i)
1728    ac_prev=x_includes ;;
1729  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1730  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1731    x_includes=$ac_optarg ;;
1732
1733  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1734  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1735    ac_prev=x_libraries ;;
1736  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1737  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1738    x_libraries=$ac_optarg ;;
1739
1740  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1741Try \`$0 --help' for more information"
1742    ;;
1743
1744  *=*)
1745    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1746    # Reject names that are not valid shell variable names.
1747    case $ac_envvar in #(
1748      '' | [0-9]* | *[!_$as_cr_alnum]* )
1749      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1750    esac
1751    eval $ac_envvar=\$ac_optarg
1752    export $ac_envvar ;;
1753
1754  *)
1755    # FIXME: should be removed in autoconf 3.0.
1756    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1757    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1758      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1759    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1760    ;;
1761
1762  esac
1763done
1764
1765if test -n "$ac_prev"; then
1766  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1767  as_fn_error $? "missing argument to $ac_option"
1768fi
1769
1770if test -n "$ac_unrecognized_opts"; then
1771  case $enable_option_checking in
1772    no) ;;
1773    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1774    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1775  esac
1776fi
1777
1778# Check all directory arguments for consistency.
1779for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1780		datadir sysconfdir sharedstatedir localstatedir includedir \
1781		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1782		libdir localedir mandir
1783do
1784  eval ac_val=\$$ac_var
1785  # Remove trailing slashes.
1786  case $ac_val in
1787    */ )
1788      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1789      eval $ac_var=\$ac_val;;
1790  esac
1791  # Be sure to have absolute directory names.
1792  case $ac_val in
1793    [\\/$]* | ?:[\\/]* )  continue;;
1794    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1795  esac
1796  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1797done
1798
1799# There might be people who depend on the old broken behavior: `$host'
1800# used to hold the argument of --host etc.
1801# FIXME: To remove some day.
1802build=$build_alias
1803host=$host_alias
1804target=$target_alias
1805
1806# FIXME: To remove some day.
1807if test "x$host_alias" != x; then
1808  if test "x$build_alias" = x; then
1809    cross_compiling=maybe
1810  elif test "x$build_alias" != "x$host_alias"; then
1811    cross_compiling=yes
1812  fi
1813fi
1814
1815ac_tool_prefix=
1816test -n "$host_alias" && ac_tool_prefix=$host_alias-
1817
1818test "$silent" = yes && exec 6>/dev/null
1819
1820
1821ac_pwd=`pwd` && test -n "$ac_pwd" &&
1822ac_ls_di=`ls -di .` &&
1823ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1824  as_fn_error $? "working directory cannot be determined"
1825test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1826  as_fn_error $? "pwd does not report name of working directory"
1827
1828
1829# Find the source files, if location was not specified.
1830if test -z "$srcdir"; then
1831  ac_srcdir_defaulted=yes
1832  # Try the directory containing this script, then the parent directory.
1833  ac_confdir=`$as_dirname -- "$as_myself" ||
1834$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1835	 X"$as_myself" : 'X\(//\)[^/]' \| \
1836	 X"$as_myself" : 'X\(//\)$' \| \
1837	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1838$as_echo X"$as_myself" |
1839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1840	    s//\1/
1841	    q
1842	  }
1843	  /^X\(\/\/\)[^/].*/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)$/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\).*/{
1852	    s//\1/
1853	    q
1854	  }
1855	  s/.*/./; q'`
1856  srcdir=$ac_confdir
1857  if test ! -r "$srcdir/$ac_unique_file"; then
1858    srcdir=..
1859  fi
1860else
1861  ac_srcdir_defaulted=no
1862fi
1863if test ! -r "$srcdir/$ac_unique_file"; then
1864  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1865  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1866fi
1867ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1868ac_abs_confdir=`(
1869	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1870	pwd)`
1871# When building in place, set srcdir=.
1872if test "$ac_abs_confdir" = "$ac_pwd"; then
1873  srcdir=.
1874fi
1875# Remove unnecessary trailing slashes from srcdir.
1876# Double slashes in file names in object file debugging info
1877# mess up M-x gdb in Emacs.
1878case $srcdir in
1879*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1880esac
1881for ac_var in $ac_precious_vars; do
1882  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1883  eval ac_env_${ac_var}_value=\$${ac_var}
1884  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1886done
1887
1888#
1889# Report the --help message.
1890#
1891if test "$ac_init_help" = "long"; then
1892  # Omit some internal or obsolete options to make the list less imposing.
1893  # This message is too long to be a string in the A/UX 3.1 sh.
1894  cat <<_ACEOF
1895\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1896
1897Usage: $0 [OPTION]... [VAR=VALUE]...
1898
1899To assign environment variables (e.g., CC, CFLAGS...), specify them as
1900VAR=VALUE.  See below for descriptions of some of the useful variables.
1901
1902Defaults for the options are specified in brackets.
1903
1904Configuration:
1905  -h, --help              display this help and exit
1906      --help=short        display options specific to this package
1907      --help=recursive    display the short help of all the included packages
1908  -V, --version           display version information and exit
1909  -q, --quiet, --silent   do not print \`checking ...' messages
1910      --cache-file=FILE   cache test results in FILE [disabled]
1911  -C, --config-cache      alias for \`--cache-file=config.cache'
1912  -n, --no-create         do not create output files
1913      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1914
1915Installation directories:
1916  --prefix=PREFIX         install architecture-independent files in PREFIX
1917                          [$ac_default_prefix]
1918  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1919                          [PREFIX]
1920
1921By default, \`make install' will install all the files in
1922\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1923an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1924for instance \`--prefix=\$HOME'.
1925
1926For better control, use the options below.
1927
1928Fine tuning of the installation directories:
1929  --bindir=DIR            user executables [EPREFIX/bin]
1930  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1931  --libexecdir=DIR        program executables [EPREFIX/libexec]
1932  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1933  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1934  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1935  --libdir=DIR            object code libraries [EPREFIX/lib]
1936  --includedir=DIR        C header files [PREFIX/include]
1937  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1938  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1939  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1940  --infodir=DIR           info documentation [DATAROOTDIR/info]
1941  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1942  --mandir=DIR            man documentation [DATAROOTDIR/man]
1943  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1944  --htmldir=DIR           html documentation [DOCDIR]
1945  --dvidir=DIR            dvi documentation [DOCDIR]
1946  --pdfdir=DIR            pdf documentation [DOCDIR]
1947  --psdir=DIR             ps documentation [DOCDIR]
1948_ACEOF
1949
1950  cat <<\_ACEOF
1951
1952X features:
1953  --x-includes=DIR    X include files are in DIR
1954  --x-libraries=DIR   X library files are in DIR
1955
1956System types:
1957  --build=BUILD     configure for building on BUILD [guessed]
1958  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1959  --target=TARGET   configure for building compilers for TARGET [HOST]
1960_ACEOF
1961fi
1962
1963if test -n "$ac_init_help"; then
1964  case $ac_init_help in
1965     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1966   esac
1967  cat <<\_ACEOF
1968
1969Optional Features:
1970  --disable-option-checking  ignore unrecognized --enable/--with options
1971  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1972  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1973  --enable-openjdk-only   suppress building custom source even if present
1974                          [disabled]
1975  --enable-debug          set the debug level to fastdebug (shorthand for
1976                          --with-debug-level=fastdebug) [disabled]
1977  --disable-headful       disable building headful support (graphical UI
1978                          support) [enabled]
1979  --enable-unlimited-crypto
1980                          Enable unlimited crypto policy [disabled]
1981  --disable-keep-packaged-modules
1982                          Do not keep packaged modules in jdk image [enable]
1983  --enable-static-build   enable static library build [disabled]
1984  --disable-warnings-as-errors
1985                          do not consider native warnings to be an error
1986                          [enabled]
1987  --enable-debug-symbols  Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --enable-zip-debug-info Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-native-coverage
1992                          enable native compilation with code coverage
1993                          data[disabled]
1994  --enable-dtrace[=yes/no/auto]
1995                          enable dtrace. Default is auto, where dtrace is
1996                          enabled if all dependencies are present.
1997  --disable-freetype-bundling
1998                          disable bundling of the freetype library with the
1999                          build result [enabled on Windows or when using
2000                          --with-freetype, disabled otherwise]
2001  --disable-new-hotspot-build
2002                          disable the new hotspot build system (use the old)
2003                          [enabled]
2004  --enable-hotspot-test-in-build
2005                          run the Queens test after Hotspot build [disabled]
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --enable-sjavac         use sjavac to do fast incremental compiles
2013                          [disabled]
2014  --disable-javac-server  disable javac server [enabled]
2015  --enable-icecc          enable distribted compilation of native code using
2016                          icecc/icecream [disabled]
2017  --disable-precompiled-headers
2018                          disable using precompiled headers when compiling C++
2019                          [enabled]
2020  --enable-ccache         enable using ccache to speed up recompilations
2021                          [disabled]
2022
2023Optional Packages:
2024  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2025  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2026  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2027                          support it), e.g. --with-target-bits=32 [guessed]
2028  --with-custom-make-dir  Deprecated. Option is kept for backwards
2029                          compatibility and is ignored
2030  --with-jdk-variant      JDK variant to build (normal) [normal]
2031  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2032                          optimized) [release]
2033  --with-jvm-variants     JVM variants (separated by commas) to build
2034                          (server,client,minimal,core,zero,zeroshark,custom)
2035                          [server]
2036  --with-devkit           use this devkit for compilers, tools and resources
2037  --with-sys-root         alias for --with-sysroot for backwards compatability
2038  --with-sysroot          use this directory as sysroot
2039  --with-tools-dir        alias for --with-toolchain-path for backwards
2040                          compatibility
2041  --with-toolchain-path   prepend these directories when searching for
2042                          toolchain binaries (compilers etc)
2043  --with-extra-path       prepend these directories to the default path
2044  --with-sdk-name         use the platform SDK of the given name. [macosx]
2045  --with-conf-name        use this as the name of the configuration [generated
2046                          from important configuration options]
2047  --with-output-sync      set make output sync type if supported by make.
2048                          [recurse]
2049  --with-default-make-target
2050                          set the default make target [exploded-image]
2051  --with-cacerts-file     specify alternative cacerts file
2052  --with-copyright-year   Set copyright year value for build [current year]
2053  --with-milestone        Deprecated. Option is kept for backwards
2054                          compatibility and is ignored
2055  --with-update-version   Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-user-release-suffix
2058                          Deprecated. Option is kept for backwards
2059                          compatibility and is ignored
2060  --with-build-number     Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-version-string   Set version string [calculated]
2063  --with-version-pre      Set the base part of the version 'PRE' field
2064                          (pre-release identifier) ['internal']
2065  --with-version-opt      Set version 'OPT' field (build metadata)
2066                          [<timestamp>.<user>.<dirname>]
2067  --with-version-build    Set version 'BUILD' field (build number) [not
2068                          specified]
2069  --with-version-major    Set version 'MAJOR' field (first number) [current
2070                          source value]
2071  --with-version-minor    Set version 'MINOR' field (second number) [current
2072                          source value]
2073  --with-version-security Set version 'SECURITY' field (third number) [current
2074                          source value]
2075  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2076                          specified]
2077  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2078  --with-build-jdk        path to JDK of same version as is being built[the
2079                          newly built JDK]
2080  --with-add-source-root  Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-override-source-root
2083                          Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-adds-and-overrides
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-langtools
2089                          Deprecated. Option is kept for backwards
2090                          compatibility and is ignored
2091  --with-override-corba   Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-jaxp    Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxws   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-hotspot Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-nashorn Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-jdk     Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-import-hotspot   import hotspot binaries from this jdk image or
2104                          hotspot build dist dir instead of building from
2105                          source
2106  --with-import-modules   import a set of prebuilt modules either as a zip
2107                          file or an exploded directory
2108  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2109                          to show possible values [platform dependent]
2110  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2111  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2112  --with-extra-ldflags    extra flags to be used when linking jdk
2113  --with-toolchain-version
2114                          the version of the toolchain to look for, use
2115                          '--help' to show possible values [platform
2116                          dependent]
2117  --with-build-devkit     Devkit to use for the build platform toolchain
2118  --with-jtreg            Regression Test Harness [probed]
2119  --with-native-debug-symbols
2120                          set the native debug symbol configuration (none,
2121                          internal, external, zipped) [varying]
2122  --with-jvm-features     additional JVM features to enable (separated by
2123                          comma), use '--help' to show possible values [none]
2124  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2125                          compatibility and is ignored
2126  --with-stdc++lib=<static>,<dynamic>,<default>
2127                          force linking of the C++ runtime on Linux to either
2128                          static or dynamic, default is static with dynamic as
2129                          fallback
2130  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2131                          (Windows only) [probed]
2132  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2133                          (Windows only) [probed]
2134  --with-x                use the X Window System
2135  --with-cups             specify prefix directory for the cups package
2136                          (expecting the headers under PATH/include)
2137  --with-cups-include     specify directory for the cups include files
2138  --with-freetype         specify prefix directory for the freetype package
2139                          (expecting the libraries under PATH/lib and the
2140                          headers under PATH/include)
2141  --with-freetype-include specify directory for the freetype include files
2142  --with-freetype-lib     specify directory for the freetype library
2143  --with-freetype-src     specify directory with freetype sources to
2144                          automatically build the library (experimental,
2145                          Windows-only)
2146  --with-alsa             specify prefix directory for the alsa package
2147                          (expecting the libraries under PATH/lib and the
2148                          headers under PATH/include)
2149  --with-alsa-include     specify directory for the alsa include files
2150  --with-alsa-lib         specify directory for the alsa library
2151  --with-libffi           specify prefix directory for the libffi package
2152                          (expecting the libraries under PATH/lib and the
2153                          headers under PATH/include)
2154  --with-libffi-include   specify directory for the libffi include files
2155  --with-libffi-lib       specify directory for the libffi library
2156  --with-libjpeg          use libjpeg from build system or OpenJDK source
2157                          (system, bundled) [bundled]
2158  --with-giflib           use giflib from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-libpng           use libpng from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-zlib             use zlib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-lcms             use lcms2 from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-dxsdk            Deprecated. Option is kept for backwards
2167                          compatibility and is ignored
2168  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-include    Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-num-cores        number of cores in the build system, e.g.
2173                          --with-num-cores=8 [probed]
2174  --with-memory-size      memory (in MB) available in the build system, e.g.
2175                          --with-memory-size=1024 [probed]
2176  --with-jobs             number of parallel jobs to let make run [calculated
2177                          based on cores and memory]
2178  --with-test-jobs        number of parallel tests jobs to run [based on build
2179                          jobs]
2180  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2181                          invocations of boot JDK, overriding the default
2182                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2183                          -enableassertions"
2184  --with-sjavac-server-java
2185                          use this java binary for running the sjavac
2186                          background server [Boot JDK java]
2187  --with-ccache-dir       where to store ccache files [~/.ccache]
2188
2189Some influential environment variables:
2190  BASENAME    Override default value for BASENAME
2191  BASH        Override default value for BASH
2192  CAT         Override default value for CAT
2193  CHMOD       Override default value for CHMOD
2194  CMP         Override default value for CMP
2195  COMM        Override default value for COMM
2196  CP          Override default value for CP
2197  CUT         Override default value for CUT
2198  DATE        Override default value for DATE
2199  DIFF        Override default value for DIFF
2200  DIRNAME     Override default value for DIRNAME
2201  ECHO        Override default value for ECHO
2202  EXPR        Override default value for EXPR
2203  FILE        Override default value for FILE
2204  FIND        Override default value for FIND
2205  HEAD        Override default value for HEAD
2206  LN          Override default value for LN
2207  LS          Override default value for LS
2208  MKDIR       Override default value for MKDIR
2209  MKTEMP      Override default value for MKTEMP
2210  MV          Override default value for MV
2211  NAWK        Override default value for NAWK
2212  PRINTF      Override default value for PRINTF
2213  RM          Override default value for RM
2214  RMDIR       Override default value for RMDIR
2215  SH          Override default value for SH
2216  SORT        Override default value for SORT
2217  TAIL        Override default value for TAIL
2218  TAR         Override default value for TAR
2219  TEE         Override default value for TEE
2220  TOUCH       Override default value for TOUCH
2221  TR          Override default value for TR
2222  UNAME       Override default value for UNAME
2223  UNIQ        Override default value for UNIQ
2224  WC          Override default value for WC
2225  WHICH       Override default value for WHICH
2226  XARGS       Override default value for XARGS
2227  AWK         Override default value for AWK
2228  GREP        Override default value for GREP
2229  EGREP       Override default value for EGREP
2230  FGREP       Override default value for FGREP
2231  SED         Override default value for SED
2232  CYGPATH     Override default value for CYGPATH
2233  READLINK    Override default value for READLINK
2234  DF          Override default value for DF
2235  CPIO        Override default value for CPIO
2236  NICE        Override default value for NICE
2237  MAKE        Override default value for MAKE
2238  UNZIP       Override default value for UNZIP
2239  ZIP         Override default value for ZIP
2240  LDD         Override default value for LDD
2241  OTOOL       Override default value for OTOOL
2242  READELF     Override default value for READELF
2243  HG          Override default value for HG
2244  STAT        Override default value for STAT
2245  TIME        Override default value for TIME
2246  DTRACE      Override default value for DTRACE
2247  PATCH       Override default value for PATCH
2248  DSYMUTIL    Override default value for DSYMUTIL
2249  XATTR       Override default value for XATTR
2250  CODESIGN    Override default value for CODESIGN
2251  SETFILE     Override default value for SETFILE
2252  PKG_CONFIG  path to pkg-config utility
2253  JAVA        Override default value for JAVA
2254  JAVAC       Override default value for JAVAC
2255  JAVAH       Override default value for JAVAH
2256  JAR         Override default value for JAR
2257  JARSIGNER   Override default value for JARSIGNER
2258  CC          C compiler command
2259  CFLAGS      C compiler flags
2260  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2261              nonstandard directory <lib dir>
2262  LIBS        libraries to pass to the linker, e.g. -l<library>
2263  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2264              you have headers in a nonstandard directory <include dir>
2265  CXX         C++ compiler command
2266  CXXFLAGS    C++ compiler flags
2267  CPP         C preprocessor
2268  CXXCPP      C++ preprocessor
2269  AS          Override default value for AS
2270  AR          Override default value for AR
2271  LIPO        Override default value for LIPO
2272  STRIP       Override default value for STRIP
2273  NM          Override default value for NM
2274  GNM         Override default value for GNM
2275  OBJCOPY     Override default value for OBJCOPY
2276  OBJDUMP     Override default value for OBJDUMP
2277  BUILD_CC    Override default value for BUILD_CC
2278  BUILD_CXX   Override default value for BUILD_CXX
2279  BUILD_NM    Override default value for BUILD_NM
2280  BUILD_AR    Override default value for BUILD_AR
2281  BUILD_OBJCOPY
2282              Override default value for BUILD_OBJCOPY
2283  BUILD_STRIP Override default value for BUILD_STRIP
2284  JTREGEXE    Override default value for JTREGEXE
2285  XMKMF       Path to xmkmf, Makefile generator for X Window System
2286  FREETYPE_CFLAGS
2287              C compiler flags for FREETYPE, overriding pkg-config
2288  FREETYPE_LIBS
2289              linker flags for FREETYPE, overriding pkg-config
2290  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2291  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2292  LIBFFI_CFLAGS
2293              C compiler flags for LIBFFI, overriding pkg-config
2294  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2295  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2296  PNG_LIBS    linker flags for PNG, overriding pkg-config
2297  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2298  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2299  ICECC_CMD   Override default value for ICECC_CMD
2300  ICECC_CREATE_ENV
2301              Override default value for ICECC_CREATE_ENV
2302  ICECC_WRAPPER
2303              Override default value for ICECC_WRAPPER
2304  CCACHE      Override default value for CCACHE
2305
2306Use these variables to override the choices made by `configure' or to help
2307it to find libraries and programs with nonstandard names/locations.
2308
2309Report bugs to <build-dev@openjdk.java.net>.
2310OpenJDK home page: <http://openjdk.java.net>.
2311_ACEOF
2312ac_status=$?
2313fi
2314
2315if test "$ac_init_help" = "recursive"; then
2316  # If there are subdirs, report their specific --help.
2317  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2318    test -d "$ac_dir" ||
2319      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2320      continue
2321    ac_builddir=.
2322
2323case "$ac_dir" in
2324.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2325*)
2326  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2327  # A ".." for each directory in $ac_dir_suffix.
2328  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2329  case $ac_top_builddir_sub in
2330  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2332  esac ;;
2333esac
2334ac_abs_top_builddir=$ac_pwd
2335ac_abs_builddir=$ac_pwd$ac_dir_suffix
2336# for backward compatibility:
2337ac_top_builddir=$ac_top_build_prefix
2338
2339case $srcdir in
2340  .)  # We are building in place.
2341    ac_srcdir=.
2342    ac_top_srcdir=$ac_top_builddir_sub
2343    ac_abs_top_srcdir=$ac_pwd ;;
2344  [\\/]* | ?:[\\/]* )  # Absolute name.
2345    ac_srcdir=$srcdir$ac_dir_suffix;
2346    ac_top_srcdir=$srcdir
2347    ac_abs_top_srcdir=$srcdir ;;
2348  *) # Relative name.
2349    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2350    ac_top_srcdir=$ac_top_build_prefix$srcdir
2351    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2352esac
2353ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2354
2355    cd "$ac_dir" || { ac_status=$?; continue; }
2356    # Check for guested configure.
2357    if test -f "$ac_srcdir/configure.gnu"; then
2358      echo &&
2359      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2360    elif test -f "$ac_srcdir/configure"; then
2361      echo &&
2362      $SHELL "$ac_srcdir/configure" --help=recursive
2363    else
2364      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2365    fi || ac_status=$?
2366    cd "$ac_pwd" || { ac_status=$?; break; }
2367  done
2368fi
2369
2370test -n "$ac_init_help" && exit $ac_status
2371if $ac_init_version; then
2372  cat <<\_ACEOF
2373OpenJDK configure jdk9
2374generated by GNU Autoconf 2.69
2375
2376Copyright (C) 2012 Free Software Foundation, Inc.
2377This configure script is free software; the Free Software Foundation
2378gives unlimited permission to copy, distribute and modify it.
2379_ACEOF
2380  exit
2381fi
2382
2383## ------------------------ ##
2384## Autoconf initialization. ##
2385## ------------------------ ##
2386
2387# ac_fn_c_try_compile LINENO
2388# --------------------------
2389# Try to compile conftest.$ac_ext, and return whether this succeeded.
2390ac_fn_c_try_compile ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  rm -f conftest.$ac_objext
2394  if { { ac_try="$ac_compile"
2395case "(($ac_try" in
2396  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2397  *) ac_try_echo=$ac_try;;
2398esac
2399eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2400$as_echo "$ac_try_echo"; } >&5
2401  (eval "$ac_compile") 2>conftest.err
2402  ac_status=$?
2403  if test -s conftest.err; then
2404    grep -v '^ *+' conftest.err >conftest.er1
2405    cat conftest.er1 >&5
2406    mv -f conftest.er1 conftest.err
2407  fi
2408  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2409  test $ac_status = 0; } && {
2410	 test -z "$ac_c_werror_flag" ||
2411	 test ! -s conftest.err
2412       } && test -s conftest.$ac_objext; then :
2413  ac_retval=0
2414else
2415  $as_echo "$as_me: failed program was:" >&5
2416sed 's/^/| /' conftest.$ac_ext >&5
2417
2418	ac_retval=1
2419fi
2420  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2421  as_fn_set_status $ac_retval
2422
2423} # ac_fn_c_try_compile
2424
2425# ac_fn_cxx_try_compile LINENO
2426# ----------------------------
2427# Try to compile conftest.$ac_ext, and return whether this succeeded.
2428ac_fn_cxx_try_compile ()
2429{
2430  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2431  rm -f conftest.$ac_objext
2432  if { { ac_try="$ac_compile"
2433case "(($ac_try" in
2434  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2435  *) ac_try_echo=$ac_try;;
2436esac
2437eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2438$as_echo "$ac_try_echo"; } >&5
2439  (eval "$ac_compile") 2>conftest.err
2440  ac_status=$?
2441  if test -s conftest.err; then
2442    grep -v '^ *+' conftest.err >conftest.er1
2443    cat conftest.er1 >&5
2444    mv -f conftest.er1 conftest.err
2445  fi
2446  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2447  test $ac_status = 0; } && {
2448	 test -z "$ac_cxx_werror_flag" ||
2449	 test ! -s conftest.err
2450       } && test -s conftest.$ac_objext; then :
2451  ac_retval=0
2452else
2453  $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456	ac_retval=1
2457fi
2458  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459  as_fn_set_status $ac_retval
2460
2461} # ac_fn_cxx_try_compile
2462
2463# ac_fn_c_try_cpp LINENO
2464# ----------------------
2465# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2466ac_fn_c_try_cpp ()
2467{
2468  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469  if { { ac_try="$ac_cpp conftest.$ac_ext"
2470case "(($ac_try" in
2471  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2472  *) ac_try_echo=$ac_try;;
2473esac
2474eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2475$as_echo "$ac_try_echo"; } >&5
2476  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2477  ac_status=$?
2478  if test -s conftest.err; then
2479    grep -v '^ *+' conftest.err >conftest.er1
2480    cat conftest.er1 >&5
2481    mv -f conftest.er1 conftest.err
2482  fi
2483  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2484  test $ac_status = 0; } > conftest.i && {
2485	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2486	 test ! -s conftest.err
2487       }; then :
2488  ac_retval=0
2489else
2490  $as_echo "$as_me: failed program was:" >&5
2491sed 's/^/| /' conftest.$ac_ext >&5
2492
2493    ac_retval=1
2494fi
2495  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2496  as_fn_set_status $ac_retval
2497
2498} # ac_fn_c_try_cpp
2499
2500# ac_fn_cxx_try_cpp LINENO
2501# ------------------------
2502# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2503ac_fn_cxx_try_cpp ()
2504{
2505  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506  if { { ac_try="$ac_cpp conftest.$ac_ext"
2507case "(($ac_try" in
2508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2509  *) ac_try_echo=$ac_try;;
2510esac
2511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2512$as_echo "$ac_try_echo"; } >&5
2513  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2514  ac_status=$?
2515  if test -s conftest.err; then
2516    grep -v '^ *+' conftest.err >conftest.er1
2517    cat conftest.er1 >&5
2518    mv -f conftest.er1 conftest.err
2519  fi
2520  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2521  test $ac_status = 0; } > conftest.i && {
2522	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2523	 test ! -s conftest.err
2524       }; then :
2525  ac_retval=0
2526else
2527  $as_echo "$as_me: failed program was:" >&5
2528sed 's/^/| /' conftest.$ac_ext >&5
2529
2530    ac_retval=1
2531fi
2532  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2533  as_fn_set_status $ac_retval
2534
2535} # ac_fn_cxx_try_cpp
2536
2537# ac_fn_c_try_link LINENO
2538# -----------------------
2539# Try to link conftest.$ac_ext, and return whether this succeeded.
2540ac_fn_c_try_link ()
2541{
2542  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2543  rm -f conftest.$ac_objext conftest$ac_exeext
2544  if { { ac_try="$ac_link"
2545case "(($ac_try" in
2546  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2547  *) ac_try_echo=$ac_try;;
2548esac
2549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2550$as_echo "$ac_try_echo"; } >&5
2551  (eval "$ac_link") 2>conftest.err
2552  ac_status=$?
2553  if test -s conftest.err; then
2554    grep -v '^ *+' conftest.err >conftest.er1
2555    cat conftest.er1 >&5
2556    mv -f conftest.er1 conftest.err
2557  fi
2558  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2559  test $ac_status = 0; } && {
2560	 test -z "$ac_c_werror_flag" ||
2561	 test ! -s conftest.err
2562       } && test -s conftest$ac_exeext && {
2563	 test "$cross_compiling" = yes ||
2564	 test -x conftest$ac_exeext
2565       }; then :
2566  ac_retval=0
2567else
2568  $as_echo "$as_me: failed program was:" >&5
2569sed 's/^/| /' conftest.$ac_ext >&5
2570
2571	ac_retval=1
2572fi
2573  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2574  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2575  # interfere with the next link command; also delete a directory that is
2576  # left behind by Apple's compiler.  We do this before executing the actions.
2577  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2578  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2579  as_fn_set_status $ac_retval
2580
2581} # ac_fn_c_try_link
2582
2583# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2584# ---------------------------------------------------------
2585# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2586# the include files in INCLUDES and setting the cache variable VAR
2587# accordingly.
2588ac_fn_cxx_check_header_mongrel ()
2589{
2590  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2591  if eval \${$3+:} false; then :
2592  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2593$as_echo_n "checking for $2... " >&6; }
2594if eval \${$3+:} false; then :
2595  $as_echo_n "(cached) " >&6
2596fi
2597eval ac_res=\$$3
2598	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599$as_echo "$ac_res" >&6; }
2600else
2601  # Is the header compilable?
2602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2603$as_echo_n "checking $2 usability... " >&6; }
2604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2605/* end confdefs.h.  */
2606$4
2607#include <$2>
2608_ACEOF
2609if ac_fn_cxx_try_compile "$LINENO"; then :
2610  ac_header_compiler=yes
2611else
2612  ac_header_compiler=no
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2616$as_echo "$ac_header_compiler" >&6; }
2617
2618# Is the header present?
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2620$as_echo_n "checking $2 presence... " >&6; }
2621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2622/* end confdefs.h.  */
2623#include <$2>
2624_ACEOF
2625if ac_fn_cxx_try_cpp "$LINENO"; then :
2626  ac_header_preproc=yes
2627else
2628  ac_header_preproc=no
2629fi
2630rm -f conftest.err conftest.i conftest.$ac_ext
2631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2632$as_echo "$ac_header_preproc" >&6; }
2633
2634# So?  What about this header?
2635case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2636  yes:no: )
2637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2638$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2640$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2641    ;;
2642  no:yes:* )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2644$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2646$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2648$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2650$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653( $as_echo "## ----------------------------------------- ##
2654## Report this to build-dev@openjdk.java.net ##
2655## ----------------------------------------- ##"
2656     ) | sed "s/^/$as_me: WARNING:     /" >&2
2657    ;;
2658esac
2659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2660$as_echo_n "checking for $2... " >&6; }
2661if eval \${$3+:} false; then :
2662  $as_echo_n "(cached) " >&6
2663else
2664  eval "$3=\$ac_header_compiler"
2665fi
2666eval ac_res=\$$3
2667	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2668$as_echo "$ac_res" >&6; }
2669fi
2670  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2671
2672} # ac_fn_cxx_check_header_mongrel
2673
2674# ac_fn_cxx_try_run LINENO
2675# ------------------------
2676# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2677# that executables *can* be run.
2678ac_fn_cxx_try_run ()
2679{
2680  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2681  if { { ac_try="$ac_link"
2682case "(($ac_try" in
2683  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2684  *) ac_try_echo=$ac_try;;
2685esac
2686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2687$as_echo "$ac_try_echo"; } >&5
2688  (eval "$ac_link") 2>&5
2689  ac_status=$?
2690  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2691  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2692  { { case "(($ac_try" in
2693  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2694  *) ac_try_echo=$ac_try;;
2695esac
2696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2697$as_echo "$ac_try_echo"; } >&5
2698  (eval "$ac_try") 2>&5
2699  ac_status=$?
2700  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2701  test $ac_status = 0; }; }; then :
2702  ac_retval=0
2703else
2704  $as_echo "$as_me: program exited with status $ac_status" >&5
2705       $as_echo "$as_me: failed program was:" >&5
2706sed 's/^/| /' conftest.$ac_ext >&5
2707
2708       ac_retval=$ac_status
2709fi
2710  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2711  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2712  as_fn_set_status $ac_retval
2713
2714} # ac_fn_cxx_try_run
2715
2716# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2717# ---------------------------------------------------------
2718# Tests whether HEADER exists and can be compiled using the include files in
2719# INCLUDES, setting the cache variable VAR accordingly.
2720ac_fn_cxx_check_header_compile ()
2721{
2722  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2723  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2724$as_echo_n "checking for $2... " >&6; }
2725if eval \${$3+:} false; then :
2726  $as_echo_n "(cached) " >&6
2727else
2728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2729/* end confdefs.h.  */
2730$4
2731#include <$2>
2732_ACEOF
2733if ac_fn_cxx_try_compile "$LINENO"; then :
2734  eval "$3=yes"
2735else
2736  eval "$3=no"
2737fi
2738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2739fi
2740eval ac_res=\$$3
2741	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2742$as_echo "$ac_res" >&6; }
2743  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2744
2745} # ac_fn_cxx_check_header_compile
2746
2747# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2748# ----------------------------------------------
2749# Tries to find the compile-time value of EXPR in a program that includes
2750# INCLUDES, setting VAR accordingly. Returns whether the value could be
2751# computed
2752ac_fn_cxx_compute_int ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  if test "$cross_compiling" = yes; then
2756    # Depending upon the size, compute the lo and hi bounds.
2757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758/* end confdefs.h.  */
2759$4
2760int
2761main ()
2762{
2763static int test_array [1 - 2 * !(($2) >= 0)];
2764test_array [0] = 0;
2765return test_array [0];
2766
2767  ;
2768  return 0;
2769}
2770_ACEOF
2771if ac_fn_cxx_try_compile "$LINENO"; then :
2772  ac_lo=0 ac_mid=0
2773  while :; do
2774    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2775/* end confdefs.h.  */
2776$4
2777int
2778main ()
2779{
2780static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2781test_array [0] = 0;
2782return test_array [0];
2783
2784  ;
2785  return 0;
2786}
2787_ACEOF
2788if ac_fn_cxx_try_compile "$LINENO"; then :
2789  ac_hi=$ac_mid; break
2790else
2791  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2792			if test $ac_lo -le $ac_mid; then
2793			  ac_lo= ac_hi=
2794			  break
2795			fi
2796			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2797fi
2798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2799  done
2800else
2801  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802/* end confdefs.h.  */
2803$4
2804int
2805main ()
2806{
2807static int test_array [1 - 2 * !(($2) < 0)];
2808test_array [0] = 0;
2809return test_array [0];
2810
2811  ;
2812  return 0;
2813}
2814_ACEOF
2815if ac_fn_cxx_try_compile "$LINENO"; then :
2816  ac_hi=-1 ac_mid=-1
2817  while :; do
2818    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2819/* end confdefs.h.  */
2820$4
2821int
2822main ()
2823{
2824static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2825test_array [0] = 0;
2826return test_array [0];
2827
2828  ;
2829  return 0;
2830}
2831_ACEOF
2832if ac_fn_cxx_try_compile "$LINENO"; then :
2833  ac_lo=$ac_mid; break
2834else
2835  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2836			if test $ac_mid -le $ac_hi; then
2837			  ac_lo= ac_hi=
2838			  break
2839			fi
2840			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2841fi
2842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843  done
2844else
2845  ac_lo= ac_hi=
2846fi
2847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850# Binary search between lo and hi bounds.
2851while test "x$ac_lo" != "x$ac_hi"; do
2852  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2854/* end confdefs.h.  */
2855$4
2856int
2857main ()
2858{
2859static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2860test_array [0] = 0;
2861return test_array [0];
2862
2863  ;
2864  return 0;
2865}
2866_ACEOF
2867if ac_fn_cxx_try_compile "$LINENO"; then :
2868  ac_hi=$ac_mid
2869else
2870  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2871fi
2872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2873done
2874case $ac_lo in #((
2875?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2876'') ac_retval=1 ;;
2877esac
2878  else
2879    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2880/* end confdefs.h.  */
2881$4
2882static long int longval () { return $2; }
2883static unsigned long int ulongval () { return $2; }
2884#include <stdio.h>
2885#include <stdlib.h>
2886int
2887main ()
2888{
2889
2890  FILE *f = fopen ("conftest.val", "w");
2891  if (! f)
2892    return 1;
2893  if (($2) < 0)
2894    {
2895      long int i = longval ();
2896      if (i != ($2))
2897	return 1;
2898      fprintf (f, "%ld", i);
2899    }
2900  else
2901    {
2902      unsigned long int i = ulongval ();
2903      if (i != ($2))
2904	return 1;
2905      fprintf (f, "%lu", i);
2906    }
2907  /* Do not output a trailing newline, as this causes \r\n confusion
2908     on some platforms.  */
2909  return ferror (f) || fclose (f) != 0;
2910
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915if ac_fn_cxx_try_run "$LINENO"; then :
2916  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2917else
2918  ac_retval=1
2919fi
2920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2921  conftest.$ac_objext conftest.beam conftest.$ac_ext
2922rm -f conftest.val
2923
2924  fi
2925  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2926  as_fn_set_status $ac_retval
2927
2928} # ac_fn_cxx_compute_int
2929
2930# ac_fn_cxx_try_link LINENO
2931# -------------------------
2932# Try to link conftest.$ac_ext, and return whether this succeeded.
2933ac_fn_cxx_try_link ()
2934{
2935  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2936  rm -f conftest.$ac_objext conftest$ac_exeext
2937  if { { ac_try="$ac_link"
2938case "(($ac_try" in
2939  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940  *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944  (eval "$ac_link") 2>conftest.err
2945  ac_status=$?
2946  if test -s conftest.err; then
2947    grep -v '^ *+' conftest.err >conftest.er1
2948    cat conftest.er1 >&5
2949    mv -f conftest.er1 conftest.err
2950  fi
2951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2952  test $ac_status = 0; } && {
2953	 test -z "$ac_cxx_werror_flag" ||
2954	 test ! -s conftest.err
2955       } && test -s conftest$ac_exeext && {
2956	 test "$cross_compiling" = yes ||
2957	 test -x conftest$ac_exeext
2958       }; then :
2959  ac_retval=0
2960else
2961  $as_echo "$as_me: failed program was:" >&5
2962sed 's/^/| /' conftest.$ac_ext >&5
2963
2964	ac_retval=1
2965fi
2966  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2967  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2968  # interfere with the next link command; also delete a directory that is
2969  # left behind by Apple's compiler.  We do this before executing the actions.
2970  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2971  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2972  as_fn_set_status $ac_retval
2973
2974} # ac_fn_cxx_try_link
2975
2976# ac_fn_cxx_check_func LINENO FUNC VAR
2977# ------------------------------------
2978# Tests whether FUNC exists, setting the cache variable VAR accordingly
2979ac_fn_cxx_check_func ()
2980{
2981  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2982  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2983$as_echo_n "checking for $2... " >&6; }
2984if eval \${$3+:} false; then :
2985  $as_echo_n "(cached) " >&6
2986else
2987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2988/* end confdefs.h.  */
2989/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2990   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2991#define $2 innocuous_$2
2992
2993/* System header to define __stub macros and hopefully few prototypes,
2994    which can conflict with char $2 (); below.
2995    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2996    <limits.h> exists even on freestanding compilers.  */
2997
2998#ifdef __STDC__
2999# include <limits.h>
3000#else
3001# include <assert.h>
3002#endif
3003
3004#undef $2
3005
3006/* Override any GCC internal prototype to avoid an error.
3007   Use char because int might match the return type of a GCC
3008   builtin and then its argument prototype would still apply.  */
3009#ifdef __cplusplus
3010extern "C"
3011#endif
3012char $2 ();
3013/* The GNU C library defines this for functions which it implements
3014    to always fail with ENOSYS.  Some functions are actually named
3015    something starting with __ and the normal name is an alias.  */
3016#if defined __stub_$2 || defined __stub___$2
3017choke me
3018#endif
3019
3020int
3021main ()
3022{
3023return $2 ();
3024  ;
3025  return 0;
3026}
3027_ACEOF
3028if ac_fn_cxx_try_link "$LINENO"; then :
3029  eval "$3=yes"
3030else
3031  eval "$3=no"
3032fi
3033rm -f core conftest.err conftest.$ac_objext \
3034    conftest$ac_exeext conftest.$ac_ext
3035fi
3036eval ac_res=\$$3
3037	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3038$as_echo "$ac_res" >&6; }
3039  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3040
3041} # ac_fn_cxx_check_func
3042
3043# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3044# -------------------------------------------------------
3045# Tests whether HEADER exists and can be compiled using the include files in
3046# INCLUDES, setting the cache variable VAR accordingly.
3047ac_fn_c_check_header_compile ()
3048{
3049  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3051$as_echo_n "checking for $2... " >&6; }
3052if eval \${$3+:} false; then :
3053  $as_echo_n "(cached) " >&6
3054else
3055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3056/* end confdefs.h.  */
3057$4
3058#include <$2>
3059_ACEOF
3060if ac_fn_c_try_compile "$LINENO"; then :
3061  eval "$3=yes"
3062else
3063  eval "$3=no"
3064fi
3065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3066fi
3067eval ac_res=\$$3
3068	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3069$as_echo "$ac_res" >&6; }
3070  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3071
3072} # ac_fn_c_check_header_compile
3073cat >config.log <<_ACEOF
3074This file contains any messages produced by compilers while
3075running configure, to aid debugging if configure makes a mistake.
3076
3077It was created by OpenJDK $as_me jdk9, which was
3078generated by GNU Autoconf 2.69.  Invocation command line was
3079
3080  $ $0 $@
3081
3082_ACEOF
3083exec 5>>config.log
3084{
3085cat <<_ASUNAME
3086## --------- ##
3087## Platform. ##
3088## --------- ##
3089
3090hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3091uname -m = `(uname -m) 2>/dev/null || echo unknown`
3092uname -r = `(uname -r) 2>/dev/null || echo unknown`
3093uname -s = `(uname -s) 2>/dev/null || echo unknown`
3094uname -v = `(uname -v) 2>/dev/null || echo unknown`
3095
3096/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3097/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3098
3099/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3100/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3101/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3102/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3103/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3104/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3105/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3106
3107_ASUNAME
3108
3109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3110for as_dir in $PATH
3111do
3112  IFS=$as_save_IFS
3113  test -z "$as_dir" && as_dir=.
3114    $as_echo "PATH: $as_dir"
3115  done
3116IFS=$as_save_IFS
3117
3118} >&5
3119
3120cat >&5 <<_ACEOF
3121
3122
3123## ----------- ##
3124## Core tests. ##
3125## ----------- ##
3126
3127_ACEOF
3128
3129
3130# Keep a trace of the command line.
3131# Strip out --no-create and --no-recursion so they do not pile up.
3132# Strip out --silent because we don't want to record it for future runs.
3133# Also quote any args containing shell meta-characters.
3134# Make two passes to allow for proper duplicate-argument suppression.
3135ac_configure_args=
3136ac_configure_args0=
3137ac_configure_args1=
3138ac_must_keep_next=false
3139for ac_pass in 1 2
3140do
3141  for ac_arg
3142  do
3143    case $ac_arg in
3144    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3145    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3146    | -silent | --silent | --silen | --sile | --sil)
3147      continue ;;
3148    *\'*)
3149      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3150    esac
3151    case $ac_pass in
3152    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3153    2)
3154      as_fn_append ac_configure_args1 " '$ac_arg'"
3155      if test $ac_must_keep_next = true; then
3156	ac_must_keep_next=false # Got value, back to normal.
3157      else
3158	case $ac_arg in
3159	  *=* | --config-cache | -C | -disable-* | --disable-* \
3160	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3161	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3162	  | -with-* | --with-* | -without-* | --without-* | --x)
3163	    case "$ac_configure_args0 " in
3164	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3165	    esac
3166	    ;;
3167	  -* ) ac_must_keep_next=true ;;
3168	esac
3169      fi
3170      as_fn_append ac_configure_args " '$ac_arg'"
3171      ;;
3172    esac
3173  done
3174done
3175{ ac_configure_args0=; unset ac_configure_args0;}
3176{ ac_configure_args1=; unset ac_configure_args1;}
3177
3178# When interrupted or exit'd, cleanup temporary files, and complete
3179# config.log.  We remove comments because anyway the quotes in there
3180# would cause problems or look ugly.
3181# WARNING: Use '\'' to represent an apostrophe within the trap.
3182# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3183trap 'exit_status=$?
3184  # Save into config.log some information that might help in debugging.
3185  {
3186    echo
3187
3188    $as_echo "## ---------------- ##
3189## Cache variables. ##
3190## ---------------- ##"
3191    echo
3192    # The following way of writing the cache mishandles newlines in values,
3193(
3194  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3195    eval ac_val=\$$ac_var
3196    case $ac_val in #(
3197    *${as_nl}*)
3198      case $ac_var in #(
3199      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3200$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3201      esac
3202      case $ac_var in #(
3203      _ | IFS | as_nl) ;; #(
3204      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3205      *) { eval $ac_var=; unset $ac_var;} ;;
3206      esac ;;
3207    esac
3208  done
3209  (set) 2>&1 |
3210    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3211    *${as_nl}ac_space=\ *)
3212      sed -n \
3213	"s/'\''/'\''\\\\'\'''\''/g;
3214	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3215      ;; #(
3216    *)
3217      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3218      ;;
3219    esac |
3220    sort
3221)
3222    echo
3223
3224    $as_echo "## ----------------- ##
3225## Output variables. ##
3226## ----------------- ##"
3227    echo
3228    for ac_var in $ac_subst_vars
3229    do
3230      eval ac_val=\$$ac_var
3231      case $ac_val in
3232      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3233      esac
3234      $as_echo "$ac_var='\''$ac_val'\''"
3235    done | sort
3236    echo
3237
3238    if test -n "$ac_subst_files"; then
3239      $as_echo "## ------------------- ##
3240## File substitutions. ##
3241## ------------------- ##"
3242      echo
3243      for ac_var in $ac_subst_files
3244      do
3245	eval ac_val=\$$ac_var
3246	case $ac_val in
3247	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3248	esac
3249	$as_echo "$ac_var='\''$ac_val'\''"
3250      done | sort
3251      echo
3252    fi
3253
3254    if test -s confdefs.h; then
3255      $as_echo "## ----------- ##
3256## confdefs.h. ##
3257## ----------- ##"
3258      echo
3259      cat confdefs.h
3260      echo
3261    fi
3262    test "$ac_signal" != 0 &&
3263      $as_echo "$as_me: caught signal $ac_signal"
3264    $as_echo "$as_me: exit $exit_status"
3265  } >&5
3266  rm -f core *.core core.conftest.* &&
3267    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3268    exit $exit_status
3269' 0
3270for ac_signal in 1 2 13 15; do
3271  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3272done
3273ac_signal=0
3274
3275# confdefs.h avoids OS command line length limits that DEFS can exceed.
3276rm -f -r conftest* confdefs.h
3277
3278$as_echo "/* confdefs.h */" > confdefs.h
3279
3280# Predefined preprocessor variables.
3281
3282cat >>confdefs.h <<_ACEOF
3283#define PACKAGE_NAME "$PACKAGE_NAME"
3284_ACEOF
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_VERSION "$PACKAGE_VERSION"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_STRING "$PACKAGE_STRING"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_URL "$PACKAGE_URL"
3304_ACEOF
3305
3306
3307# Let the site file select an alternate cache file if it wants to.
3308# Prefer an explicitly selected file to automatically selected ones.
3309ac_site_file1=NONE
3310ac_site_file2=NONE
3311if test -n "$CONFIG_SITE"; then
3312  # We do not want a PATH search for config.site.
3313  case $CONFIG_SITE in #((
3314    -*)  ac_site_file1=./$CONFIG_SITE;;
3315    */*) ac_site_file1=$CONFIG_SITE;;
3316    *)   ac_site_file1=./$CONFIG_SITE;;
3317  esac
3318elif test "x$prefix" != xNONE; then
3319  ac_site_file1=$prefix/share/config.site
3320  ac_site_file2=$prefix/etc/config.site
3321else
3322  ac_site_file1=$ac_default_prefix/share/config.site
3323  ac_site_file2=$ac_default_prefix/etc/config.site
3324fi
3325for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3326do
3327  test "x$ac_site_file" = xNONE && continue
3328  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3329    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3330$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3331    sed 's/^/| /' "$ac_site_file" >&5
3332    . "$ac_site_file" \
3333      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3335as_fn_error $? "failed to load site script $ac_site_file
3336See \`config.log' for more details" "$LINENO" 5; }
3337  fi
3338done
3339
3340if test -r "$cache_file"; then
3341  # Some versions of bash will fail to source /dev/null (special files
3342  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3343  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3344    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3345$as_echo "$as_me: loading cache $cache_file" >&6;}
3346    case $cache_file in
3347      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3348      *)                      . "./$cache_file";;
3349    esac
3350  fi
3351else
3352  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3353$as_echo "$as_me: creating cache $cache_file" >&6;}
3354  >$cache_file
3355fi
3356
3357# Check that the precious variables saved in the cache have kept the same
3358# value.
3359ac_cache_corrupted=false
3360for ac_var in $ac_precious_vars; do
3361  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3362  eval ac_new_set=\$ac_env_${ac_var}_set
3363  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3364  eval ac_new_val=\$ac_env_${ac_var}_value
3365  case $ac_old_set,$ac_new_set in
3366    set,)
3367      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3368$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3369      ac_cache_corrupted=: ;;
3370    ,set)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,);;
3375    *)
3376      if test "x$ac_old_val" != "x$ac_new_val"; then
3377	# differences in whitespace do not lead to failure.
3378	ac_old_val_w=`echo x $ac_old_val`
3379	ac_new_val_w=`echo x $ac_new_val`
3380	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3381	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3382$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3383	  ac_cache_corrupted=:
3384	else
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3386$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3387	  eval $ac_var=\$ac_old_val
3388	fi
3389	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3390$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3392$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3393      fi;;
3394  esac
3395  # Pass precious variables to config.status.
3396  if test "$ac_new_set" = set; then
3397    case $ac_new_val in
3398    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3399    *) ac_arg=$ac_var=$ac_new_val ;;
3400    esac
3401    case " $ac_configure_args " in
3402      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3403      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3404    esac
3405  fi
3406done
3407if $ac_cache_corrupted; then
3408  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3411$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3412  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3413fi
3414## -------------------- ##
3415## Main body of script. ##
3416## -------------------- ##
3417
3418ac_ext=c
3419ac_cpp='$CPP $CPPFLAGS'
3420ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3421ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3422ac_compiler_gnu=$ac_cv_c_compiler_gnu
3423
3424
3425
3426ac_aux_dir=
3427for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3428  if test -f "$ac_dir/install-sh"; then
3429    ac_aux_dir=$ac_dir
3430    ac_install_sh="$ac_aux_dir/install-sh -c"
3431    break
3432  elif test -f "$ac_dir/install.sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install.sh -c"
3435    break
3436  elif test -f "$ac_dir/shtool"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/shtool install -c"
3439    break
3440  fi
3441done
3442if test -z "$ac_aux_dir"; then
3443  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
3444fi
3445
3446# These three variables are undocumented and unsupported,
3447# and are intended to be withdrawn in a future Autoconf release.
3448# They can cause serious problems if a builder's source tree is in a directory
3449# whose full name contains unusual characters.
3450ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3451ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3452ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3453
3454
3455# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3456
3457#
3458# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3459# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3460#
3461# This code is free software; you can redistribute it and/or modify it
3462# under the terms of the GNU General Public License version 2 only, as
3463# published by the Free Software Foundation.  Oracle designates this
3464# particular file as subject to the "Classpath" exception as provided
3465# by Oracle in the LICENSE file that accompanied this code.
3466#
3467# This code is distributed in the hope that it will be useful, but WITHOUT
3468# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3469# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3470# version 2 for more details (a copy is included in the LICENSE file that
3471# accompanied this code).
3472#
3473# You should have received a copy of the GNU General Public License version
3474# 2 along with this work; if not, write to the Free Software Foundation,
3475# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3476#
3477# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3478# or visit www.oracle.com if you need additional information or have any
3479# questions.
3480#
3481
3482#
3483# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3484#
3485# This program is free software; you can redistribute it and/or modify
3486# it under the terms of the GNU General Public License as published by
3487# the Free Software Foundation; either version 2 of the License, or
3488# (at your option) any later version.
3489#
3490# This program is distributed in the hope that it will be useful, but
3491# WITHOUT ANY WARRANTY; without even the implied warranty of
3492# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3493# General Public License for more details.
3494#
3495# You should have received a copy of the GNU General Public License
3496# along with this program; if not, write to the Free Software
3497# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3498#
3499# As a special exception to the GNU General Public License, if you
3500# distribute this file as part of a program that contains a
3501# configuration script generated by Autoconf, you may include it under
3502# the same distribution terms that you use for the rest of that program.
3503
3504# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3505# ----------------------------------
3506# PKG_PROG_PKG_CONFIG
3507
3508# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3509#
3510# Check to see whether a particular set of modules exists.  Similar
3511# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3512#
3513#
3514# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3515# this or PKG_CHECK_MODULES is called, or make sure to call
3516# PKG_CHECK_EXISTS manually
3517# --------------------------------------------------------------
3518
3519
3520
3521# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3522# ---------------------------------------------
3523# _PKG_CONFIG
3524
3525# _PKG_SHORT_ERRORS_SUPPORTED
3526# -----------------------------
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528
3529
3530# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3531# [ACTION-IF-NOT-FOUND])
3532#
3533#
3534# Note that if there is a possibility the first call to
3535# PKG_CHECK_MODULES might not happen, you should be sure to include an
3536# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3537#
3538#
3539# --------------------------------------------------------------
3540# PKG_CHECK_MODULES
3541
3542
3543# Include these first...
3544#
3545# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3546# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3547#
3548# This code is free software; you can redistribute it and/or modify it
3549# under the terms of the GNU General Public License version 2 only, as
3550# published by the Free Software Foundation.  Oracle designates this
3551# particular file as subject to the "Classpath" exception as provided
3552# by Oracle in the LICENSE file that accompanied this code.
3553#
3554# This code is distributed in the hope that it will be useful, but WITHOUT
3555# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3556# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3557# version 2 for more details (a copy is included in the LICENSE file that
3558# accompanied this code).
3559#
3560# You should have received a copy of the GNU General Public License version
3561# 2 along with this work; if not, write to the Free Software Foundation,
3562# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3563#
3564# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3565# or visit www.oracle.com if you need additional information or have any
3566# questions.
3567#
3568
3569# Create a function/macro that takes a series of named arguments. The call is
3570# similar to AC_DEFUN, but the setup of the function looks like this:
3571# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3572# ... do something
3573#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3574# ])
3575# A star (*) in front of a named argument means that it is required and it's
3576# presence will be verified. To pass e.g. the first value as a normal indexed
3577# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3578# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3579# "ARG_FOO".
3580#
3581# The generated function can be called like this:
3582# MYFUNC(FOO: [foo-val],
3583#     BAR: [
3584#         $ECHO hello world
3585#     ])
3586# Note that the argument value must start on the same line as the argument name.
3587#
3588# Argument 1: Name of the function to define
3589# Argument 2: List of legal named arguments, with a * prefix for required arguments
3590# Argument 3: Argument array to treat as named, typically $@
3591# Argument 4: The main function body
3592
3593
3594# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3595# If so, then append $1 to $2 \
3596# Also set JVM_ARG_OK to true/false depending on outcome.
3597
3598
3599# Appends a string to a path variable, only adding the : when needed.
3600
3601
3602# Prepends a string to a path variable, only adding the : when needed.
3603
3604
3605# This will make sure the given variable points to a full and proper
3606# path. This means:
3607# 1) There will be no spaces in the path. On unix platforms,
3608#    spaces in the path will result in an error. On Windows,
3609#    the path will be rewritten using short-style to be space-free.
3610# 2) The path will be absolute, and it will be in unix-style (on
3611#     cygwin).
3612# $1: The name of the variable to fix
3613
3614
3615# This will make sure the given variable points to a executable
3616# with a full and proper path. This means:
3617# 1) There will be no spaces in the path. On unix platforms,
3618#    spaces in the path will result in an error. On Windows,
3619#    the path will be rewritten using short-style to be space-free.
3620# 2) The path will be absolute, and it will be in unix-style (on
3621#     cygwin).
3622# Any arguments given to the executable is preserved.
3623# If the input variable does not have a directory specification, then
3624# it need to be in the PATH.
3625# $1: The name of the variable to fix
3626
3627
3628
3629
3630# Register a --with argument but mark it as deprecated
3631# $1: The name of the with argument to deprecate, not including --with-
3632
3633
3634# Register a --enable argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --enable-
3636# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3637# $3: Messages to user.
3638
3639
3640
3641
3642# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3643# $1: variable to check
3644
3645
3646# Check that there are no unprocessed overridden variables left.
3647# If so, they are an incorrect argument and we will exit with an error.
3648
3649
3650# Setup a tool for the given variable. If correctly specified by the user,
3651# use that value, otherwise search for the tool using the supplied code snippet.
3652# $1: variable to set
3653# $2: code snippet to call to look for the tool
3654# $3: code snippet to call if variable was used to find tool
3655
3656
3657# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3658# $1: variable to set
3659# $2: executable name (or list of names) to look for
3660
3661
3662# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3663# $1: variable to set
3664# $2: executable name (or list of names) to look for
3665
3666
3667# Like BASIC_PATH_PROGS but fails if no tool was found.
3668# $1: variable to set
3669# $2: executable name (or list of names) to look for
3670
3671
3672# Like BASIC_SETUP_TOOL but fails if no tool was found.
3673# $1: variable to set
3674# $2: autoconf macro to call to look for the special tool
3675
3676
3677# Setup the most fundamental tools that relies on not much else to set up,
3678# but is used by much of the early bootstrap code.
3679
3680
3681# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3682
3683
3684# Evaluates platform specific overrides for devkit variables.
3685# $1: Name of variable
3686
3687
3688
3689
3690
3691
3692#%%% Simple tools %%%
3693
3694# Check if we have found a usable version of make
3695# $1: the path to a potential make binary (or empty)
3696# $2: the description on how we found this
3697
3698
3699
3700
3701# Goes looking for a usable version of GNU make.
3702
3703
3704
3705
3706
3707
3708# Check if build directory is on local disk. If not possible to determine,
3709# we prefer to claim it's local.
3710# Argument 1: directory to test
3711# Argument 2: what to do if it is on local disk
3712# Argument 3: what to do otherwise (remote disk or failure)
3713
3714
3715# Check that source files have basic read permissions set. This might
3716# not be the case in cygwin in certain conditions.
3717
3718
3719
3720
3721# Check for support for specific options in bash
3722
3723
3724################################################################################
3725#
3726# Default make target
3727#
3728
3729
3730# Code to run after AC_OUTPUT
3731
3732
3733#
3734# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3736#
3737# This code is free software; you can redistribute it and/or modify it
3738# under the terms of the GNU General Public License version 2 only, as
3739# published by the Free Software Foundation.  Oracle designates this
3740# particular file as subject to the "Classpath" exception as provided
3741# by Oracle in the LICENSE file that accompanied this code.
3742#
3743# This code is distributed in the hope that it will be useful, but WITHOUT
3744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3746# version 2 for more details (a copy is included in the LICENSE file that
3747# accompanied this code).
3748#
3749# You should have received a copy of the GNU General Public License version
3750# 2 along with this work; if not, write to the Free Software Foundation,
3751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3752#
3753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3754# or visit www.oracle.com if you need additional information or have any
3755# questions.
3756#
3757
3758
3759
3760
3761
3762# Helper function which possibly converts a path using DOS-style short mode.
3763# If so, the updated path is stored in $new_path.
3764# $1: The path to check
3765
3766
3767# Helper function which possibly converts a path using DOS-style short mode.
3768# If so, the updated path is stored in $new_path.
3769# $1: The path to check
3770
3771
3772# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3773# and could probably be heavily simplified. However, all changes in this
3774# area tend to need lot of testing in different scenarios, and in lack of
3775# proper unit testing, cleaning this up has not been deemed worth the effort
3776# at the moment.
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3787
3788
3789
3790
3791# ... then the rest
3792#
3793# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3794# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3795#
3796# This code is free software; you can redistribute it and/or modify it
3797# under the terms of the GNU General Public License version 2 only, as
3798# published by the Free Software Foundation.  Oracle designates this
3799# particular file as subject to the "Classpath" exception as provided
3800# by Oracle in the LICENSE file that accompanied this code.
3801#
3802# This code is distributed in the hope that it will be useful, but WITHOUT
3803# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3804# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3805# version 2 for more details (a copy is included in the LICENSE file that
3806# accompanied this code).
3807#
3808# You should have received a copy of the GNU General Public License version
3809# 2 along with this work; if not, write to the Free Software Foundation,
3810# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3811#
3812# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3813# or visit www.oracle.com if you need additional information or have any
3814# questions.
3815#
3816
3817########################################################################
3818# This file handles detection of the Boot JDK. The Boot JDK detection
3819# process has been developed as a response to solve a complex real-world
3820# problem. Initially, it was simple, but it has grown as platform after
3821# platform, idiosyncracy after idiosyncracy has been supported.
3822#
3823# The basic idea is this:
3824# 1) You need an acceptable *) JDK to use as a Boot JDK
3825# 2) There are several ways to locate a JDK, that are mostly platform
3826#    dependent **)
3827# 3) You can have multiple JDKs installed
3828# 4) If possible, configure should try to dig out an acceptable JDK
3829#    automatically, without having to resort to command-line options
3830#
3831# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3832#     javac) and not a JRE, etc.
3833#
3834# **) On Windows we typically use a well-known path.
3835#     On MacOSX we typically use the tool java_home.
3836#     On Linux we typically find javac in the $PATH, and then follow a
3837#     chain of symlinks that often ends up in a real JDK.
3838#
3839# This leads to the code where we check in different ways to locate a
3840# JDK, and if one is found, check if it is acceptable. If not, we print
3841# our reasons for rejecting it (useful when debugging non-working
3842# configure situations) and continue checking the next one.
3843########################################################################
3844
3845# Execute the check given as argument, and verify the result
3846# If the Boot JDK was previously found, do nothing
3847# $1 A command line (typically autoconf macro) to execute
3848
3849
3850# Test: Is bootjdk explicitely set by command line arguments?
3851
3852
3853# Test: Is $JAVA_HOME set?
3854
3855
3856# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3857
3858
3859# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3860# $1: Argument to the java_home binary (optional)
3861
3862
3863# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3864
3865
3866# Look for a jdk in the given path. If there are multiple, try to select the newest.
3867# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3868# $1 = Path to directory containing jdk installations.
3869# $2 = String to append to the found JDK directory to get the proper JDK home
3870
3871
3872# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3873# environmental variable as base for where to look.
3874# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3875
3876
3877# Test: Is there a JDK installed in default, well-known locations?
3878
3879
3880# Check that a command-line tool in the Boot JDK is correct
3881# $1 = name of variable to assign
3882# $2 = name of binary
3883
3884
3885###############################################################################
3886#
3887# We need a Boot JDK to bootstrap the build.
3888#
3889
3890
3891
3892
3893
3894# BUILD_JDK: the location of the latest JDK that can run
3895#   on the host system and supports the target class file version
3896#   generated in this JDK build.  This variable should only be
3897#   used after the launchers are built.
3898#
3899
3900# Execute the check given as argument, and verify the result.
3901# If the JDK was previously found, do nothing.
3902# $1 A command line (typically autoconf macro) to execute
3903
3904
3905# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3906# is different than the host system doing the build (e.g. cross-compilation),
3907# a special BUILD_JDK is built as part of the build process.  An external
3908# prebuilt BUILD_JDK can also be supplied.
3909
3910
3911#
3912# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3913# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3914#
3915# This code is free software; you can redistribute it and/or modify it
3916# under the terms of the GNU General Public License version 2 only, as
3917# published by the Free Software Foundation.  Oracle designates this
3918# particular file as subject to the "Classpath" exception as provided
3919# by Oracle in the LICENSE file that accompanied this code.
3920#
3921# This code is distributed in the hope that it will be useful, but WITHOUT
3922# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3923# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3924# version 2 for more details (a copy is included in the LICENSE file that
3925# accompanied this code).
3926#
3927# You should have received a copy of the GNU General Public License version
3928# 2 along with this work; if not, write to the Free Software Foundation,
3929# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3930#
3931# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3932# or visit www.oracle.com if you need additional information or have any
3933# questions.
3934#
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952################################################################################
3953#
3954# Runs icecc-create-env once and prints the error if it fails
3955#
3956# $1: arguments to icecc-create-env
3957# $2: log file
3958#
3959
3960
3961################################################################################
3962#
3963# Optionally enable distributed compilation of native code using icecc/icecream
3964#
3965
3966
3967
3968
3969
3970
3971
3972#
3973# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3974# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3975#
3976# This code is free software; you can redistribute it and/or modify it
3977# under the terms of the GNU General Public License version 2 only, as
3978# published by the Free Software Foundation.  Oracle designates this
3979# particular file as subject to the "Classpath" exception as provided
3980# by Oracle in the LICENSE file that accompanied this code.
3981#
3982# This code is distributed in the hope that it will be useful, but WITHOUT
3983# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3984# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3985# version 2 for more details (a copy is included in the LICENSE file that
3986# accompanied this code).
3987#
3988# You should have received a copy of the GNU General Public License version
3989# 2 along with this work; if not, write to the Free Software Foundation,
3990# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3991#
3992# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3993# or visit www.oracle.com if you need additional information or have any
3994# questions.
3995#
3996
3997# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
3998# corresponding configure arguments instead
3999
4000
4001# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4002# that configure can use them while detecting compilers.
4003# TOOLCHAIN_TYPE is available here.
4004# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4005
4006
4007
4008
4009
4010
4011# Documentation on common flags used for solstudio in HIGHEST.
4012#
4013# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4014#          done with care, there are some assumptions below that need to
4015#          be understood about the use of pointers, and IEEE behavior.
4016#
4017# -fns: Use non-standard floating point mode (not IEEE 754)
4018# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4019# -fsingle: Use single precision floating point with 'float'
4020# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4021#   (Source with excessing pointer casting and data access with mixed
4022#    pointer types are not recommended)
4023# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4024#   (If you expect perfect errno behavior, do not use this)
4025# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4026# -xrestrict: Pointer parameters to functions do not overlap
4027#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4028#    If you pass in multiple pointers to the same data, do not use this)
4029# -xlibmil: Inline some library routines
4030#   (If you expect perfect errno behavior, do not use this)
4031# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4032#   (If you expect perfect errno behavior, do not use this)
4033#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4034
4035    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4036    # Bug?
4037    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4038    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4039    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4040    #fi
4041
4042
4043
4044
4045
4046
4047################################################################################
4048# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4049#      conditionals against.
4050# $2 - Optional prefix for each variable defined.
4051
4052
4053# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4054#                                  IF_FALSE: [RUN-IF-FALSE])
4055# ------------------------------------------------------------
4056# Check that the C compiler supports an argument
4057
4058
4059
4060
4061# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4062#                                    IF_FALSE: [RUN-IF-FALSE])
4063# ------------------------------------------------------------
4064# Check that the C++ compiler supports an argument
4065
4066
4067
4068
4069# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C and C++ compilers support an argument
4073
4074
4075
4076
4077# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                   IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the linker support an argument
4081
4082
4083
4084
4085
4086
4087
4088
4089#
4090# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4091# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4092#
4093# This code is free software; you can redistribute it and/or modify it
4094# under the terms of the GNU General Public License version 2 only, as
4095# published by the Free Software Foundation.  Oracle designates this
4096# particular file as subject to the "Classpath" exception as provided
4097# by Oracle in the LICENSE file that accompanied this code.
4098#
4099# This code is distributed in the hope that it will be useful, but WITHOUT
4100# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4101# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4102# version 2 for more details (a copy is included in the LICENSE file that
4103# accompanied this code).
4104#
4105# You should have received a copy of the GNU General Public License version
4106# 2 along with this work; if not, write to the Free Software Foundation,
4107# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4108#
4109# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4110# or visit www.oracle.com if you need additional information or have any
4111# questions.
4112#
4113
4114
4115
4116
4117
4118cygwin_help() {
4119  case $1 in
4120    unzip)
4121      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4122      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4123      ;;
4124    zip)
4125      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4126      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4127      ;;
4128    make)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    freetype)
4133      HELP_MSG="
4134The freetype library can now be build during the configure process.
4135Download the freetype sources and unpack them into an arbitrary directory:
4136
4137wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4138tar -xzf freetype-2.5.3.tar.gz
4139
4140Then run configure with '--with-freetype-src=<freetype_src>'. This will
4141automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4142builds or into '<freetype_src>/lib32' for 32-bit builds.
4143Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4144and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4145
4146Alternatively you can unpack the sources like this to use the default directory:
4147
4148tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4149      ;;
4150  esac
4151}
4152
4153msys_help() {
4154  PKGHANDLER_COMMAND=""
4155}
4156
4157apt_help() {
4158  case $1 in
4159    reduced)
4160      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4161    devkit)
4162      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4163    openjdk)
4164      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4165    alsa)
4166      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4167    cups)
4168      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4169    freetype)
4170      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4171    ffi)
4172      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4173    x11)
4174      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4175    ccache)
4176      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4177    dtrace)
4178      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4179  esac
4180}
4181
4182yum_help() {
4183  case $1 in
4184    devkit)
4185      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4186    openjdk)
4187      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4188    alsa)
4189      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4190    cups)
4191      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4192    freetype)
4193      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4194    x11)
4195      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4196    ccache)
4197      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4198  esac
4199}
4200
4201port_help() {
4202  PKGHANDLER_COMMAND=""
4203}
4204
4205pkgutil_help() {
4206  PKGHANDLER_COMMAND=""
4207}
4208
4209pkgadd_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213# This function will check if we're called from the "configure" wrapper while
4214# printing --help. If so, we will print out additional information that can
4215# only be extracted within the autoconf script, and then exit. This must be
4216# called at the very beginning in configure.ac.
4217
4218
4219
4220
4221
4222
4223#
4224# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4225# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4226#
4227# This code is free software; you can redistribute it and/or modify it
4228# under the terms of the GNU General Public License version 2 only, as
4229# published by the Free Software Foundation.  Oracle designates this
4230# particular file as subject to the "Classpath" exception as provided
4231# by Oracle in the LICENSE file that accompanied this code.
4232#
4233# This code is distributed in the hope that it will be useful, but WITHOUT
4234# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4235# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4236# version 2 for more details (a copy is included in the LICENSE file that
4237# accompanied this code).
4238#
4239# You should have received a copy of the GNU General Public License version
4240# 2 along with this work; if not, write to the Free Software Foundation,
4241# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4242#
4243# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4244# or visit www.oracle.com if you need additional information or have any
4245# questions.
4246#
4247
4248# All valid JVM features, regardless of platform
4249VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4250    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4251
4252# All valid JVM variants
4253VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4254
4255###############################################################################
4256# Check if the specified JVM variant should be built. To be used in shell if
4257# constructs, like this:
4258# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4259#
4260# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4261
4262# Definition kept in one line to allow inlining in if statements.
4263# Additional [] needed to keep m4 from mangling shell constructs.
4264
4265
4266###############################################################################
4267# Check if the specified JVM features are explicitly enabled. To be used in
4268# shell if constructs, like this:
4269# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4270#
4271# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4272
4273# Definition kept in one line to allow inlining in if statements.
4274# Additional [] needed to keep m4 from mangling shell constructs.
4275
4276
4277###############################################################################
4278# Check which variants of the JVM that we want to build. Available variants are:
4279#   server: normal interpreter, and a tiered C1/C2 compiler
4280#   client: normal interpreter, and C1 (no C2 compiler)
4281#   minimal: reduced form of client with optional features stripped out
4282#   core: normal interpreter only, no compiler
4283#   zero: C++ based interpreter only, no compiler
4284#   zeroshark: C++ based interpreter, and a llvm-based compiler
4285#   custom: baseline JVM with no default features
4286#
4287
4288
4289###############################################################################
4290# Check if dtrace should be enabled and has all prerequisites present.
4291#
4292
4293
4294###############################################################################
4295# Set up all JVM features for each JVM variant.
4296#
4297
4298
4299###############################################################################
4300# Validate JVM features once all setup is complete, including custom setup.
4301#
4302
4303
4304###############################################################################
4305# Support for old hotspot build. Remove once new hotspot build has proven
4306# to work satisfactory.
4307#
4308
4309
4310#
4311# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4312# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4313#
4314# This code is free software; you can redistribute it and/or modify it
4315# under the terms of the GNU General Public License version 2 only, as
4316# published by the Free Software Foundation.  Oracle designates this
4317# particular file as subject to the "Classpath" exception as provided
4318# by Oracle in the LICENSE file that accompanied this code.
4319#
4320# This code is distributed in the hope that it will be useful, but WITHOUT
4321# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4322# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4323# version 2 for more details (a copy is included in the LICENSE file that
4324# accompanied this code).
4325#
4326# You should have received a copy of the GNU General Public License version
4327# 2 along with this work; if not, write to the Free Software Foundation,
4328# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4329#
4330# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4331# or visit www.oracle.com if you need additional information or have any
4332# questions.
4333#
4334
4335###############################################################################
4336# Check which variant of the JDK that we want to build.
4337# Currently we have:
4338#    normal:   standard edition
4339# but the custom make system may add other variants
4340#
4341# Effectively the JDK variant gives a name to a specific set of
4342# modules to compile into the JDK.
4343
4344
4345###############################################################################
4346# Set the debug level
4347#    release: no debug information, all optimizations, no asserts.
4348#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4349#    fastdebug: debug information (-g), all optimizations, all asserts
4350#    slowdebug: debug information (-g), no optimizations, all asserts
4351
4352
4353###############################################################################
4354#
4355# Should we build only OpenJDK even if closed sources are present?
4356#
4357
4358
4359
4360
4361###############################################################################
4362#
4363# Enable or disable the elliptic curve crypto implementation
4364#
4365
4366
4367
4368
4369################################################################################
4370#
4371# Gcov coverage data for hotspot
4372#
4373
4374
4375################################################################################
4376#
4377# Static build support.  When enabled will generate static
4378# libraries instead of shared libraries for all JDK libs.
4379#
4380
4381
4382################################################################################
4383#
4384# jlink options.
4385# We always keep packaged modules in JDK image.
4386#
4387
4388
4389################################################################################
4390#
4391# Check if building of the jtreg failure handler should be enabled.
4392#
4393
4394
4395#
4396# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4397# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4398#
4399# This code is free software; you can redistribute it and/or modify it
4400# under the terms of the GNU General Public License version 2 only, as
4401# published by the Free Software Foundation.  Oracle designates this
4402# particular file as subject to the "Classpath" exception as provided
4403# by Oracle in the LICENSE file that accompanied this code.
4404#
4405# This code is distributed in the hope that it will be useful, but WITHOUT
4406# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4407# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4408# version 2 for more details (a copy is included in the LICENSE file that
4409# accompanied this code).
4410#
4411# You should have received a copy of the GNU General Public License version
4412# 2 along with this work; if not, write to the Free Software Foundation,
4413# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4414#
4415# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4416# or visit www.oracle.com if you need additional information or have any
4417# questions.
4418#
4419
4420###############################################################################
4421#
4422# Setup version numbers
4423#
4424
4425# Verify that a given string represents a valid version number, and assign it
4426# to a variable.
4427
4428# Argument 1: the variable to assign to
4429# Argument 2: the value given by the user
4430
4431
4432
4433
4434#
4435# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4436# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4437#
4438# This code is free software; you can redistribute it and/or modify it
4439# under the terms of the GNU General Public License version 2 only, as
4440# published by the Free Software Foundation.  Oracle designates this
4441# particular file as subject to the "Classpath" exception as provided
4442# by Oracle in the LICENSE file that accompanied this code.
4443#
4444# This code is distributed in the hope that it will be useful, but WITHOUT
4445# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4446# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4447# version 2 for more details (a copy is included in the LICENSE file that
4448# accompanied this code).
4449#
4450# You should have received a copy of the GNU General Public License version
4451# 2 along with this work; if not, write to the Free Software Foundation,
4452# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4453#
4454# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4455# or visit www.oracle.com if you need additional information or have any
4456# questions.
4457#
4458
4459# Major library component reside in separate files.
4460#
4461# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4462# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4463#
4464# This code is free software; you can redistribute it and/or modify it
4465# under the terms of the GNU General Public License version 2 only, as
4466# published by the Free Software Foundation.  Oracle designates this
4467# particular file as subject to the "Classpath" exception as provided
4468# by Oracle in the LICENSE file that accompanied this code.
4469#
4470# This code is distributed in the hope that it will be useful, but WITHOUT
4471# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4472# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4473# version 2 for more details (a copy is included in the LICENSE file that
4474# accompanied this code).
4475#
4476# You should have received a copy of the GNU General Public License version
4477# 2 along with this work; if not, write to the Free Software Foundation,
4478# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4479#
4480# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4481# or visit www.oracle.com if you need additional information or have any
4482# questions.
4483#
4484
4485################################################################################
4486# Setup alsa (Advanced Linux Sound Architecture)
4487################################################################################
4488
4489
4490#
4491# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4492# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4493#
4494# This code is free software; you can redistribute it and/or modify it
4495# under the terms of the GNU General Public License version 2 only, as
4496# published by the Free Software Foundation.  Oracle designates this
4497# particular file as subject to the "Classpath" exception as provided
4498# by Oracle in the LICENSE file that accompanied this code.
4499#
4500# This code is distributed in the hope that it will be useful, but WITHOUT
4501# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4502# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4503# version 2 for more details (a copy is included in the LICENSE file that
4504# accompanied this code).
4505#
4506# You should have received a copy of the GNU General Public License version
4507# 2 along with this work; if not, write to the Free Software Foundation,
4508# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4509#
4510# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4511# or visit www.oracle.com if you need additional information or have any
4512# questions.
4513#
4514
4515################################################################################
4516# Setup bundled libraries.
4517#
4518# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4519# OpenJDK repository. Default is to use these libraries as bundled, but they
4520# might be replaced by en external version by the user.
4521################################################################################
4522
4523
4524################################################################################
4525# Setup libjpeg
4526################################################################################
4527
4528
4529################################################################################
4530# Setup giflib
4531################################################################################
4532
4533
4534################################################################################
4535# Setup libpng
4536################################################################################
4537
4538
4539################################################################################
4540# Setup zlib
4541################################################################################
4542
4543
4544################################################################################
4545# Setup lcms (Little CMS)
4546################################################################################
4547
4548
4549#
4550# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4551# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4552#
4553# This code is free software; you can redistribute it and/or modify it
4554# under the terms of the GNU General Public License version 2 only, as
4555# published by the Free Software Foundation.  Oracle designates this
4556# particular file as subject to the "Classpath" exception as provided
4557# by Oracle in the LICENSE file that accompanied this code.
4558#
4559# This code is distributed in the hope that it will be useful, but WITHOUT
4560# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4561# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4562# version 2 for more details (a copy is included in the LICENSE file that
4563# accompanied this code).
4564#
4565# You should have received a copy of the GNU General Public License version
4566# 2 along with this work; if not, write to the Free Software Foundation,
4567# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4568#
4569# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4570# or visit www.oracle.com if you need additional information or have any
4571# questions.
4572#
4573
4574################################################################################
4575# Setup cups (Common Unix Printing System)
4576################################################################################
4577
4578
4579#
4580# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4581# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4582#
4583# This code is free software; you can redistribute it and/or modify it
4584# under the terms of the GNU General Public License version 2 only, as
4585# published by the Free Software Foundation.  Oracle designates this
4586# particular file as subject to the "Classpath" exception as provided
4587# by Oracle in the LICENSE file that accompanied this code.
4588#
4589# This code is distributed in the hope that it will be useful, but WITHOUT
4590# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4591# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4592# version 2 for more details (a copy is included in the LICENSE file that
4593# accompanied this code).
4594#
4595# You should have received a copy of the GNU General Public License version
4596# 2 along with this work; if not, write to the Free Software Foundation,
4597# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4598#
4599# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4600# or visit www.oracle.com if you need additional information or have any
4601# questions.
4602#
4603
4604################################################################################
4605# Setup libffi (Foreign Function Interface)
4606################################################################################
4607
4608
4609#
4610# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4611# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4612#
4613# This code is free software; you can redistribute it and/or modify it
4614# under the terms of the GNU General Public License version 2 only, as
4615# published by the Free Software Foundation.  Oracle designates this
4616# particular file as subject to the "Classpath" exception as provided
4617# by Oracle in the LICENSE file that accompanied this code.
4618#
4619# This code is distributed in the hope that it will be useful, but WITHOUT
4620# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4621# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4622# version 2 for more details (a copy is included in the LICENSE file that
4623# accompanied this code).
4624#
4625# You should have received a copy of the GNU General Public License version
4626# 2 along with this work; if not, write to the Free Software Foundation,
4627# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4628#
4629# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4630# or visit www.oracle.com if you need additional information or have any
4631# questions.
4632#
4633
4634################################################################################
4635# Build the freetype lib from source
4636################################################################################
4637
4638
4639################################################################################
4640# Check if a potential freeype library match is correct and usable
4641################################################################################
4642
4643
4644################################################################################
4645# Setup freetype (The FreeType2 font rendering library)
4646################################################################################
4647
4648
4649#
4650# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4651# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4652#
4653# This code is free software; you can redistribute it and/or modify it
4654# under the terms of the GNU General Public License version 2 only, as
4655# published by the Free Software Foundation.  Oracle designates this
4656# particular file as subject to the "Classpath" exception as provided
4657# by Oracle in the LICENSE file that accompanied this code.
4658#
4659# This code is distributed in the hope that it will be useful, but WITHOUT
4660# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4661# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4662# version 2 for more details (a copy is included in the LICENSE file that
4663# accompanied this code).
4664#
4665# You should have received a copy of the GNU General Public License version
4666# 2 along with this work; if not, write to the Free Software Foundation,
4667# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4668#
4669# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4670# or visit www.oracle.com if you need additional information or have any
4671# questions.
4672#
4673
4674################################################################################
4675# Setup the standard C/C++ runtime libraries.
4676#
4677# Most importantly, determine if stdc++ should be linked statically or
4678# dynamically.
4679################################################################################
4680
4681
4682#
4683# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685#
4686# This code is free software; you can redistribute it and/or modify it
4687# under the terms of the GNU General Public License version 2 only, as
4688# published by the Free Software Foundation.  Oracle designates this
4689# particular file as subject to the "Classpath" exception as provided
4690# by Oracle in the LICENSE file that accompanied this code.
4691#
4692# This code is distributed in the hope that it will be useful, but WITHOUT
4693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695# version 2 for more details (a copy is included in the LICENSE file that
4696# accompanied this code).
4697#
4698# You should have received a copy of the GNU General Public License version
4699# 2 along with this work; if not, write to the Free Software Foundation,
4700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701#
4702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703# or visit www.oracle.com if you need additional information or have any
4704# questions.
4705#
4706
4707################################################################################
4708# Setup X11 Windows system
4709################################################################################
4710
4711
4712
4713################################################################################
4714# Determine which libraries are needed for this configuration
4715################################################################################
4716
4717
4718################################################################################
4719# Parse library options, and setup needed libraries
4720################################################################################
4721
4722
4723################################################################################
4724# Setup llvm (Low-Level VM)
4725################################################################################
4726
4727
4728################################################################################
4729# Setup various libraries, typically small system libraries
4730################################################################################
4731
4732
4733#
4734# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4736#
4737# This code is free software; you can redistribute it and/or modify it
4738# under the terms of the GNU General Public License version 2 only, as
4739# published by the Free Software Foundation.  Oracle designates this
4740# particular file as subject to the "Classpath" exception as provided
4741# by Oracle in the LICENSE file that accompanied this code.
4742#
4743# This code is distributed in the hope that it will be useful, but WITHOUT
4744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4746# version 2 for more details (a copy is included in the LICENSE file that
4747# accompanied this code).
4748#
4749# You should have received a copy of the GNU General Public License version
4750# 2 along with this work; if not, write to the Free Software Foundation,
4751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4752#
4753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4754# or visit www.oracle.com if you need additional information or have any
4755# questions.
4756#
4757
4758# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4759# Converts autoconf style CPU name to OpenJDK style, into
4760# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4761
4762
4763# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4764# Converts autoconf style OS name to OpenJDK style, into
4765# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4766
4767
4768# Expects $host_os $host_cpu $build_os and $build_cpu
4769# and $with_target_bits to have been setup!
4770#
4771# Translate the standard triplet(quadruplet) definition
4772# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4773# OPENJDK_BUILD_OS, etc.
4774
4775
4776# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4777# accordingly. Must be done after setting up build and target system, but before
4778# doing anything else with these values.
4779
4780
4781# Setup the legacy variables, for controlling the old makefiles.
4782#
4783
4784
4785# $1 - Either TARGET or BUILD to setup the variables for.
4786
4787
4788
4789
4790#%%% Build and target systems %%%
4791
4792
4793
4794
4795# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4796# Add -mX to various FLAGS variables.
4797
4798
4799
4800
4801
4802
4803#
4804# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4805# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4806#
4807# This code is free software; you can redistribute it and/or modify it
4808# under the terms of the GNU General Public License version 2 only, as
4809# published by the Free Software Foundation.  Oracle designates this
4810# particular file as subject to the "Classpath" exception as provided
4811# by Oracle in the LICENSE file that accompanied this code.
4812#
4813# This code is distributed in the hope that it will be useful, but WITHOUT
4814# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4815# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4816# version 2 for more details (a copy is included in the LICENSE file that
4817# accompanied this code).
4818#
4819# You should have received a copy of the GNU General Public License version
4820# 2 along with this work; if not, write to the Free Software Foundation,
4821# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4822#
4823# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4824# or visit www.oracle.com if you need additional information or have any
4825# questions.
4826#
4827
4828
4829
4830
4831
4832
4833
4834################################################################################
4835# Define a mechanism for importing extra prebuilt modules
4836#
4837
4838
4839
4840#
4841# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4842# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4843#
4844# This code is free software; you can redistribute it and/or modify it
4845# under the terms of the GNU General Public License version 2 only, as
4846# published by the Free Software Foundation.  Oracle designates this
4847# particular file as subject to the "Classpath" exception as provided
4848# by Oracle in the LICENSE file that accompanied this code.
4849#
4850# This code is distributed in the hope that it will be useful, but WITHOUT
4851# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4852# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4853# version 2 for more details (a copy is included in the LICENSE file that
4854# accompanied this code).
4855#
4856# You should have received a copy of the GNU General Public License version
4857# 2 along with this work; if not, write to the Free Software Foundation,
4858# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4859#
4860# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4861# or visit www.oracle.com if you need additional information or have any
4862# questions.
4863#
4864
4865########################################################################
4866# This file is responsible for detecting, verifying and setting up the
4867# toolchain, i.e. the compiler, linker and related utilities. It will setup
4868# proper paths to the binaries, but it will not setup any flags.
4869#
4870# The binaries used is determined by the toolchain type, which is the family of
4871# compilers and related tools that are used.
4872########################################################################
4873
4874
4875# All valid toolchains, regardless of platform (used by help.m4)
4876VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4877
4878# These toolchains are valid on different platforms
4879VALID_TOOLCHAINS_linux="gcc clang"
4880VALID_TOOLCHAINS_solaris="solstudio"
4881VALID_TOOLCHAINS_macosx="gcc clang"
4882VALID_TOOLCHAINS_aix="xlc"
4883VALID_TOOLCHAINS_windows="microsoft"
4884
4885# Toolchain descriptions
4886TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4887TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4888TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4889TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4890TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4891
4892# Minimum supported versions, empty means unspecified
4893TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4894TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4895TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4896TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4897TOOLCHAIN_MINIMUM_VERSION_xlc=""
4898
4899# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4900# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4901
4902
4903# Check if the configured compiler (C and C++) is of a specific version or
4904# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4905#
4906# Arguments:
4907#   VERSION:   The version string to check against the found version
4908#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4909#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4910
4911
4912
4913
4914# Setup a number of variables describing how native output files are
4915# named on this platform/toolchain.
4916
4917
4918# Determine which toolchain type to use, and make sure it is valid for this
4919# platform. Setup various information about the selected toolchain.
4920
4921
4922# Before we start detecting the toolchain executables, we might need some
4923# special setup, e.g. additional paths etc.
4924
4925
4926# Restore path, etc
4927
4928
4929# Check if a compiler is of the toolchain type we expect, and save the version
4930# information from it. If the compiler does not match the expected type,
4931# this function will abort using AC_MSG_ERROR. If it matches, the version will
4932# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4933# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4934#
4935# $1 = compiler to test (CC or CXX)
4936# $2 = human readable name of compiler (C or C++)
4937
4938
4939# Try to locate the given C or C++ compiler in the path, or otherwise.
4940#
4941# $1 = compiler to test (CC or CXX)
4942# $2 = human readable name of compiler (C or C++)
4943# $3 = list of compiler names to search for
4944
4945
4946# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4947# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4948# archiver (AR). Verify that the compilers are correct according to the
4949# toolchain type.
4950
4951
4952# Setup additional tools that is considered a part of the toolchain, but not the
4953# core part. Many of these are highly platform-specific and do not exist,
4954# and/or are not needed on all platforms.
4955
4956
4957# Setup the build tools (i.e, the compiler and linker used to build programs
4958# that should be run on the build platform, not the target platform, as a build
4959# helper). Since the non-cross-compile case uses the normal, target compilers
4960# for this, we can only do this after these have been setup.
4961
4962
4963# Setup legacy variables that are still needed as alternative ways to refer to
4964# parts of the toolchain.
4965
4966
4967# Do some additional checks on the detected tools.
4968
4969
4970# Setup the JTReg Regression Test Harness.
4971
4972
4973#
4974# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4975# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4976#
4977# This code is free software; you can redistribute it and/or modify it
4978# under the terms of the GNU General Public License version 2 only, as
4979# published by the Free Software Foundation.  Oracle designates this
4980# particular file as subject to the "Classpath" exception as provided
4981# by Oracle in the LICENSE file that accompanied this code.
4982#
4983# This code is distributed in the hope that it will be useful, but WITHOUT
4984# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4985# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4986# version 2 for more details (a copy is included in the LICENSE file that
4987# accompanied this code).
4988#
4989# You should have received a copy of the GNU General Public License version
4990# 2 along with this work; if not, write to the Free Software Foundation,
4991# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4992#
4993# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4994# or visit www.oracle.com if you need additional information or have any
4995# questions.
4996#
4997
4998################################################################################
4999# The order of these defines the priority by which we try to find them.
5000VALID_VS_VERSIONS="2013 2012 2010"
5001
5002VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5003VS_VERSION_INTERNAL_2010=100
5004VS_MSVCR_2010=msvcr100.dll
5005# We don't use msvcp on Visual Studio 2010
5006#VS_MSVCP_2010=msvcp100.dll
5007VS_ENVVAR_2010="VS100COMNTOOLS"
5008VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5009VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5010VS_VS_PLATFORM_NAME_2010="v100"
5011VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5012
5013VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5014VS_VERSION_INTERNAL_2012=110
5015VS_MSVCR_2012=msvcr110.dll
5016VS_MSVCP_2012=msvcp110.dll
5017VS_ENVVAR_2012="VS110COMNTOOLS"
5018VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5019VS_SDK_INSTALLDIR_2012=
5020VS_VS_PLATFORM_NAME_2012="v110"
5021VS_SDK_PLATFORM_NAME_2012=
5022
5023VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5024VS_VERSION_INTERNAL_2013=120
5025VS_MSVCR_2013=msvcr120.dll
5026VS_MSVCP_2013=msvcp120.dll
5027VS_ENVVAR_2013="VS120COMNTOOLS"
5028VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5029VS_SDK_INSTALLDIR_2013=
5030VS_VS_PLATFORM_NAME_2013="v120"
5031VS_SDK_PLATFORM_NAME_2013=
5032
5033################################################################################
5034
5035
5036
5037################################################################################
5038
5039
5040
5041################################################################################
5042# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5043# build environment and assigns it to VS_ENV_CMD
5044
5045
5046################################################################################
5047
5048
5049
5050################################################################################
5051# Check if the VS env variables were setup prior to running configure.
5052# If not, then find vcvarsall.bat and run it automatically, and integrate
5053# the set env variables into the spec file.
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068# This line needs to be here, verbatim, after all includes and the dummy hook
5069# definitions. It is replaced with custom functionality when building
5070# custom sources.
5071#CUSTOM_AUTOCONF_INCLUDE
5072
5073# Do not change or remove the following line, it is needed for consistency checks:
5074DATE_WHEN_GENERATED=1462574627
5075
5076###############################################################################
5077#
5078# Initialization / Boot-strapping
5079#
5080# The bootstrapping process needs to solve the "chicken or the egg" problem,
5081# thus it jumps back and forth, each time gaining something needed later on.
5082#
5083###############################################################################
5084
5085# If we are requested to print additional help, do that and then exit.
5086# This must be the very first call.
5087
5088  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5089
5090    # Print available toolchains
5091    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5092    $PRINTF "Which are valid to use depends on the build platform.\n"
5093    for toolchain in $VALID_TOOLCHAINS_all; do
5094      # Use indirect variable referencing
5095      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5096      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5097      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5098    done
5099    $PRINTF "\n"
5100
5101    # Print available jvm features
5102    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5103    $PRINTF "Which are valid to use depends on the target platform.\n  "
5104    $PRINTF "%s " $VALID_JVM_FEATURES
5105    $PRINTF "\n"
5106
5107    # And now exit directly
5108    exit 0
5109  fi
5110
5111
5112# Basic initialization that must happen first of all in the normal process.
5113
5114  # Save the original command line. This is passed to us by the wrapper configure script.
5115
5116  # Save the path variable before it gets changed
5117  ORIGINAL_PATH="$PATH"
5118
5119  DATE_WHEN_CONFIGURED=`LANG=C date`
5120
5121  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5122$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5123  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5124$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5125
5126
5127  # Start with tools that do not need have cross compilation support
5128  # and can be expected to be found in the default PATH. These tools are
5129  # used by configure.
5130
5131  # First are all the simple required tools.
5132
5133
5134
5135  # Publish this variable in the help.
5136
5137
5138  if [ -z "${BASENAME+x}" ]; then
5139    # The variable is not set by user, try to locate tool using the code snippet
5140    for ac_prog in basename
5141do
5142  # Extract the first word of "$ac_prog", so it can be a program name with args.
5143set dummy $ac_prog; ac_word=$2
5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5145$as_echo_n "checking for $ac_word... " >&6; }
5146if ${ac_cv_path_BASENAME+:} false; then :
5147  $as_echo_n "(cached) " >&6
5148else
5149  case $BASENAME in
5150  [\\/]* | ?:[\\/]*)
5151  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5152  ;;
5153  *)
5154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5155for as_dir in $PATH
5156do
5157  IFS=$as_save_IFS
5158  test -z "$as_dir" && as_dir=.
5159    for ac_exec_ext in '' $ac_executable_extensions; do
5160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5161    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5163    break 2
5164  fi
5165done
5166  done
5167IFS=$as_save_IFS
5168
5169  ;;
5170esac
5171fi
5172BASENAME=$ac_cv_path_BASENAME
5173if test -n "$BASENAME"; then
5174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5175$as_echo "$BASENAME" >&6; }
5176else
5177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178$as_echo "no" >&6; }
5179fi
5180
5181
5182  test -n "$BASENAME" && break
5183done
5184
5185  else
5186    # The variable is set, but is it from the command line or the environment?
5187
5188    # Try to remove the string !BASENAME! from our list.
5189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5191      # If it failed, the variable was not from the command line. Ignore it,
5192      # but warn the user (except for BASH, which is always set by the calling BASH).
5193      if test "xBASENAME" != xBASH; then
5194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5195$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5196      fi
5197      # Try to locate tool using the code snippet
5198      for ac_prog in basename
5199do
5200  # Extract the first word of "$ac_prog", so it can be a program name with args.
5201set dummy $ac_prog; ac_word=$2
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5203$as_echo_n "checking for $ac_word... " >&6; }
5204if ${ac_cv_path_BASENAME+:} false; then :
5205  $as_echo_n "(cached) " >&6
5206else
5207  case $BASENAME in
5208  [\\/]* | ?:[\\/]*)
5209  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5210  ;;
5211  *)
5212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5213for as_dir in $PATH
5214do
5215  IFS=$as_save_IFS
5216  test -z "$as_dir" && as_dir=.
5217    for ac_exec_ext in '' $ac_executable_extensions; do
5218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5219    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5221    break 2
5222  fi
5223done
5224  done
5225IFS=$as_save_IFS
5226
5227  ;;
5228esac
5229fi
5230BASENAME=$ac_cv_path_BASENAME
5231if test -n "$BASENAME"; then
5232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5233$as_echo "$BASENAME" >&6; }
5234else
5235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5236$as_echo "no" >&6; }
5237fi
5238
5239
5240  test -n "$BASENAME" && break
5241done
5242
5243    else
5244      # If it succeeded, then it was overridden by the user. We will use it
5245      # for the tool.
5246
5247      # First remove it from the list of overridden variables, so we can test
5248      # for unknown variables in the end.
5249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5250
5251      # Check if we try to supply an empty value
5252      if test "x$BASENAME" = x; then
5253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5254$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5256$as_echo_n "checking for BASENAME... " >&6; }
5257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5258$as_echo "disabled" >&6; }
5259      else
5260        # Check if the provided tool contains a complete path.
5261        tool_specified="$BASENAME"
5262        tool_basename="${tool_specified##*/}"
5263        if test "x$tool_basename" = "x$tool_specified"; then
5264          # A command without a complete path is provided, search $PATH.
5265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5266$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5267          # Extract the first word of "$tool_basename", so it can be a program name with args.
5268set dummy $tool_basename; ac_word=$2
5269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5270$as_echo_n "checking for $ac_word... " >&6; }
5271if ${ac_cv_path_BASENAME+:} false; then :
5272  $as_echo_n "(cached) " >&6
5273else
5274  case $BASENAME in
5275  [\\/]* | ?:[\\/]*)
5276  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5277  ;;
5278  *)
5279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5280for as_dir in $PATH
5281do
5282  IFS=$as_save_IFS
5283  test -z "$as_dir" && as_dir=.
5284    for ac_exec_ext in '' $ac_executable_extensions; do
5285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5286    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5288    break 2
5289  fi
5290done
5291  done
5292IFS=$as_save_IFS
5293
5294  ;;
5295esac
5296fi
5297BASENAME=$ac_cv_path_BASENAME
5298if test -n "$BASENAME"; then
5299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5300$as_echo "$BASENAME" >&6; }
5301else
5302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5303$as_echo "no" >&6; }
5304fi
5305
5306
5307          if test "x$BASENAME" = x; then
5308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5309          fi
5310        else
5311          # Otherwise we believe it is a complete path. Use it as it is.
5312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5313$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5315$as_echo_n "checking for BASENAME... " >&6; }
5316          if test ! -x "$tool_specified"; then
5317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5318$as_echo "not found" >&6; }
5319            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5320          fi
5321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5322$as_echo "$tool_specified" >&6; }
5323        fi
5324      fi
5325    fi
5326
5327  fi
5328
5329
5330
5331  if test "x$BASENAME" = x; then
5332    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5333  fi
5334
5335
5336
5337
5338
5339  # Publish this variable in the help.
5340
5341
5342  if [ -z "${BASH+x}" ]; then
5343    # The variable is not set by user, try to locate tool using the code snippet
5344    for ac_prog in bash
5345do
5346  # Extract the first word of "$ac_prog", so it can be a program name with args.
5347set dummy $ac_prog; ac_word=$2
5348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5349$as_echo_n "checking for $ac_word... " >&6; }
5350if ${ac_cv_path_BASH+:} false; then :
5351  $as_echo_n "(cached) " >&6
5352else
5353  case $BASH in
5354  [\\/]* | ?:[\\/]*)
5355  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5356  ;;
5357  *)
5358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5359for as_dir in $PATH
5360do
5361  IFS=$as_save_IFS
5362  test -z "$as_dir" && as_dir=.
5363    for ac_exec_ext in '' $ac_executable_extensions; do
5364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5365    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5367    break 2
5368  fi
5369done
5370  done
5371IFS=$as_save_IFS
5372
5373  ;;
5374esac
5375fi
5376BASH=$ac_cv_path_BASH
5377if test -n "$BASH"; then
5378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5379$as_echo "$BASH" >&6; }
5380else
5381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5382$as_echo "no" >&6; }
5383fi
5384
5385
5386  test -n "$BASH" && break
5387done
5388
5389  else
5390    # The variable is set, but is it from the command line or the environment?
5391
5392    # Try to remove the string !BASH! from our list.
5393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5395      # If it failed, the variable was not from the command line. Ignore it,
5396      # but warn the user (except for BASH, which is always set by the calling BASH).
5397      if test "xBASH" != xBASH; then
5398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5399$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5400      fi
5401      # Try to locate tool using the code snippet
5402      for ac_prog in bash
5403do
5404  # Extract the first word of "$ac_prog", so it can be a program name with args.
5405set dummy $ac_prog; ac_word=$2
5406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407$as_echo_n "checking for $ac_word... " >&6; }
5408if ${ac_cv_path_BASH+:} false; then :
5409  $as_echo_n "(cached) " >&6
5410else
5411  case $BASH in
5412  [\\/]* | ?:[\\/]*)
5413  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5414  ;;
5415  *)
5416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5417for as_dir in $PATH
5418do
5419  IFS=$as_save_IFS
5420  test -z "$as_dir" && as_dir=.
5421    for ac_exec_ext in '' $ac_executable_extensions; do
5422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5423    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5425    break 2
5426  fi
5427done
5428  done
5429IFS=$as_save_IFS
5430
5431  ;;
5432esac
5433fi
5434BASH=$ac_cv_path_BASH
5435if test -n "$BASH"; then
5436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5437$as_echo "$BASH" >&6; }
5438else
5439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5440$as_echo "no" >&6; }
5441fi
5442
5443
5444  test -n "$BASH" && break
5445done
5446
5447    else
5448      # If it succeeded, then it was overridden by the user. We will use it
5449      # for the tool.
5450
5451      # First remove it from the list of overridden variables, so we can test
5452      # for unknown variables in the end.
5453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5454
5455      # Check if we try to supply an empty value
5456      if test "x$BASH" = x; then
5457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5458$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5460$as_echo_n "checking for BASH... " >&6; }
5461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5462$as_echo "disabled" >&6; }
5463      else
5464        # Check if the provided tool contains a complete path.
5465        tool_specified="$BASH"
5466        tool_basename="${tool_specified##*/}"
5467        if test "x$tool_basename" = "x$tool_specified"; then
5468          # A command without a complete path is provided, search $PATH.
5469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5470$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5471          # Extract the first word of "$tool_basename", so it can be a program name with args.
5472set dummy $tool_basename; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if ${ac_cv_path_BASH+:} false; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $BASH in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501BASH=$ac_cv_path_BASH
5502if test -n "$BASH"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5504$as_echo "$BASH" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511          if test "x$BASH" = x; then
5512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5513          fi
5514        else
5515          # Otherwise we believe it is a complete path. Use it as it is.
5516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5517$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5519$as_echo_n "checking for BASH... " >&6; }
5520          if test ! -x "$tool_specified"; then
5521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5522$as_echo "not found" >&6; }
5523            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5524          fi
5525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5526$as_echo "$tool_specified" >&6; }
5527        fi
5528      fi
5529    fi
5530
5531  fi
5532
5533
5534
5535  if test "x$BASH" = x; then
5536    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5537  fi
5538
5539
5540
5541
5542
5543  # Publish this variable in the help.
5544
5545
5546  if [ -z "${CAT+x}" ]; then
5547    # The variable is not set by user, try to locate tool using the code snippet
5548    for ac_prog in cat
5549do
5550  # Extract the first word of "$ac_prog", so it can be a program name with args.
5551set dummy $ac_prog; ac_word=$2
5552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5553$as_echo_n "checking for $ac_word... " >&6; }
5554if ${ac_cv_path_CAT+:} false; then :
5555  $as_echo_n "(cached) " >&6
5556else
5557  case $CAT in
5558  [\\/]* | ?:[\\/]*)
5559  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5560  ;;
5561  *)
5562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5563for as_dir in $PATH
5564do
5565  IFS=$as_save_IFS
5566  test -z "$as_dir" && as_dir=.
5567    for ac_exec_ext in '' $ac_executable_extensions; do
5568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5569    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5571    break 2
5572  fi
5573done
5574  done
5575IFS=$as_save_IFS
5576
5577  ;;
5578esac
5579fi
5580CAT=$ac_cv_path_CAT
5581if test -n "$CAT"; then
5582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5583$as_echo "$CAT" >&6; }
5584else
5585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5586$as_echo "no" >&6; }
5587fi
5588
5589
5590  test -n "$CAT" && break
5591done
5592
5593  else
5594    # The variable is set, but is it from the command line or the environment?
5595
5596    # Try to remove the string !CAT! from our list.
5597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5599      # If it failed, the variable was not from the command line. Ignore it,
5600      # but warn the user (except for BASH, which is always set by the calling BASH).
5601      if test "xCAT" != xBASH; then
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5603$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5604      fi
5605      # Try to locate tool using the code snippet
5606      for ac_prog in cat
5607do
5608  # Extract the first word of "$ac_prog", so it can be a program name with args.
5609set dummy $ac_prog; ac_word=$2
5610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5611$as_echo_n "checking for $ac_word... " >&6; }
5612if ${ac_cv_path_CAT+:} false; then :
5613  $as_echo_n "(cached) " >&6
5614else
5615  case $CAT in
5616  [\\/]* | ?:[\\/]*)
5617  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5618  ;;
5619  *)
5620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5621for as_dir in $PATH
5622do
5623  IFS=$as_save_IFS
5624  test -z "$as_dir" && as_dir=.
5625    for ac_exec_ext in '' $ac_executable_extensions; do
5626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5627    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5629    break 2
5630  fi
5631done
5632  done
5633IFS=$as_save_IFS
5634
5635  ;;
5636esac
5637fi
5638CAT=$ac_cv_path_CAT
5639if test -n "$CAT"; then
5640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5641$as_echo "$CAT" >&6; }
5642else
5643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5644$as_echo "no" >&6; }
5645fi
5646
5647
5648  test -n "$CAT" && break
5649done
5650
5651    else
5652      # If it succeeded, then it was overridden by the user. We will use it
5653      # for the tool.
5654
5655      # First remove it from the list of overridden variables, so we can test
5656      # for unknown variables in the end.
5657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5658
5659      # Check if we try to supply an empty value
5660      if test "x$CAT" = x; then
5661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5662$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5664$as_echo_n "checking for CAT... " >&6; }
5665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5666$as_echo "disabled" >&6; }
5667      else
5668        # Check if the provided tool contains a complete path.
5669        tool_specified="$CAT"
5670        tool_basename="${tool_specified##*/}"
5671        if test "x$tool_basename" = "x$tool_specified"; then
5672          # A command without a complete path is provided, search $PATH.
5673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5674$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5675          # Extract the first word of "$tool_basename", so it can be a program name with args.
5676set dummy $tool_basename; ac_word=$2
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5678$as_echo_n "checking for $ac_word... " >&6; }
5679if ${ac_cv_path_CAT+:} false; then :
5680  $as_echo_n "(cached) " >&6
5681else
5682  case $CAT in
5683  [\\/]* | ?:[\\/]*)
5684  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5685  ;;
5686  *)
5687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5688for as_dir in $PATH
5689do
5690  IFS=$as_save_IFS
5691  test -z "$as_dir" && as_dir=.
5692    for ac_exec_ext in '' $ac_executable_extensions; do
5693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5694    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5696    break 2
5697  fi
5698done
5699  done
5700IFS=$as_save_IFS
5701
5702  ;;
5703esac
5704fi
5705CAT=$ac_cv_path_CAT
5706if test -n "$CAT"; then
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5708$as_echo "$CAT" >&6; }
5709else
5710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5711$as_echo "no" >&6; }
5712fi
5713
5714
5715          if test "x$CAT" = x; then
5716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5717          fi
5718        else
5719          # Otherwise we believe it is a complete path. Use it as it is.
5720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5721$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5723$as_echo_n "checking for CAT... " >&6; }
5724          if test ! -x "$tool_specified"; then
5725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5726$as_echo "not found" >&6; }
5727            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5728          fi
5729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5730$as_echo "$tool_specified" >&6; }
5731        fi
5732      fi
5733    fi
5734
5735  fi
5736
5737
5738
5739  if test "x$CAT" = x; then
5740    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5741  fi
5742
5743
5744
5745
5746
5747  # Publish this variable in the help.
5748
5749
5750  if [ -z "${CHMOD+x}" ]; then
5751    # The variable is not set by user, try to locate tool using the code snippet
5752    for ac_prog in chmod
5753do
5754  # Extract the first word of "$ac_prog", so it can be a program name with args.
5755set dummy $ac_prog; ac_word=$2
5756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5757$as_echo_n "checking for $ac_word... " >&6; }
5758if ${ac_cv_path_CHMOD+:} false; then :
5759  $as_echo_n "(cached) " >&6
5760else
5761  case $CHMOD in
5762  [\\/]* | ?:[\\/]*)
5763  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5764  ;;
5765  *)
5766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5767for as_dir in $PATH
5768do
5769  IFS=$as_save_IFS
5770  test -z "$as_dir" && as_dir=.
5771    for ac_exec_ext in '' $ac_executable_extensions; do
5772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5773    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5775    break 2
5776  fi
5777done
5778  done
5779IFS=$as_save_IFS
5780
5781  ;;
5782esac
5783fi
5784CHMOD=$ac_cv_path_CHMOD
5785if test -n "$CHMOD"; then
5786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5787$as_echo "$CHMOD" >&6; }
5788else
5789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790$as_echo "no" >&6; }
5791fi
5792
5793
5794  test -n "$CHMOD" && break
5795done
5796
5797  else
5798    # The variable is set, but is it from the command line or the environment?
5799
5800    # Try to remove the string !CHMOD! from our list.
5801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5803      # If it failed, the variable was not from the command line. Ignore it,
5804      # but warn the user (except for BASH, which is always set by the calling BASH).
5805      if test "xCHMOD" != xBASH; then
5806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5807$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5808      fi
5809      # Try to locate tool using the code snippet
5810      for ac_prog in chmod
5811do
5812  # Extract the first word of "$ac_prog", so it can be a program name with args.
5813set dummy $ac_prog; ac_word=$2
5814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5815$as_echo_n "checking for $ac_word... " >&6; }
5816if ${ac_cv_path_CHMOD+:} false; then :
5817  $as_echo_n "(cached) " >&6
5818else
5819  case $CHMOD in
5820  [\\/]* | ?:[\\/]*)
5821  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5822  ;;
5823  *)
5824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5825for as_dir in $PATH
5826do
5827  IFS=$as_save_IFS
5828  test -z "$as_dir" && as_dir=.
5829    for ac_exec_ext in '' $ac_executable_extensions; do
5830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5831    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5833    break 2
5834  fi
5835done
5836  done
5837IFS=$as_save_IFS
5838
5839  ;;
5840esac
5841fi
5842CHMOD=$ac_cv_path_CHMOD
5843if test -n "$CHMOD"; then
5844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5845$as_echo "$CHMOD" >&6; }
5846else
5847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5848$as_echo "no" >&6; }
5849fi
5850
5851
5852  test -n "$CHMOD" && break
5853done
5854
5855    else
5856      # If it succeeded, then it was overridden by the user. We will use it
5857      # for the tool.
5858
5859      # First remove it from the list of overridden variables, so we can test
5860      # for unknown variables in the end.
5861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5862
5863      # Check if we try to supply an empty value
5864      if test "x$CHMOD" = x; then
5865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5866$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5868$as_echo_n "checking for CHMOD... " >&6; }
5869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5870$as_echo "disabled" >&6; }
5871      else
5872        # Check if the provided tool contains a complete path.
5873        tool_specified="$CHMOD"
5874        tool_basename="${tool_specified##*/}"
5875        if test "x$tool_basename" = "x$tool_specified"; then
5876          # A command without a complete path is provided, search $PATH.
5877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5878$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5879          # Extract the first word of "$tool_basename", so it can be a program name with args.
5880set dummy $tool_basename; ac_word=$2
5881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5882$as_echo_n "checking for $ac_word... " >&6; }
5883if ${ac_cv_path_CHMOD+:} false; then :
5884  $as_echo_n "(cached) " >&6
5885else
5886  case $CHMOD in
5887  [\\/]* | ?:[\\/]*)
5888  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5889  ;;
5890  *)
5891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5892for as_dir in $PATH
5893do
5894  IFS=$as_save_IFS
5895  test -z "$as_dir" && as_dir=.
5896    for ac_exec_ext in '' $ac_executable_extensions; do
5897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5898    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5900    break 2
5901  fi
5902done
5903  done
5904IFS=$as_save_IFS
5905
5906  ;;
5907esac
5908fi
5909CHMOD=$ac_cv_path_CHMOD
5910if test -n "$CHMOD"; then
5911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5912$as_echo "$CHMOD" >&6; }
5913else
5914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5915$as_echo "no" >&6; }
5916fi
5917
5918
5919          if test "x$CHMOD" = x; then
5920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5921          fi
5922        else
5923          # Otherwise we believe it is a complete path. Use it as it is.
5924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5925$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5927$as_echo_n "checking for CHMOD... " >&6; }
5928          if test ! -x "$tool_specified"; then
5929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5930$as_echo "not found" >&6; }
5931            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5932          fi
5933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5934$as_echo "$tool_specified" >&6; }
5935        fi
5936      fi
5937    fi
5938
5939  fi
5940
5941
5942
5943  if test "x$CHMOD" = x; then
5944    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5945  fi
5946
5947
5948
5949
5950
5951  # Publish this variable in the help.
5952
5953
5954  if [ -z "${CMP+x}" ]; then
5955    # The variable is not set by user, try to locate tool using the code snippet
5956    for ac_prog in cmp
5957do
5958  # Extract the first word of "$ac_prog", so it can be a program name with args.
5959set dummy $ac_prog; ac_word=$2
5960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5961$as_echo_n "checking for $ac_word... " >&6; }
5962if ${ac_cv_path_CMP+:} false; then :
5963  $as_echo_n "(cached) " >&6
5964else
5965  case $CMP in
5966  [\\/]* | ?:[\\/]*)
5967  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5968  ;;
5969  *)
5970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5971for as_dir in $PATH
5972do
5973  IFS=$as_save_IFS
5974  test -z "$as_dir" && as_dir=.
5975    for ac_exec_ext in '' $ac_executable_extensions; do
5976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5977    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5979    break 2
5980  fi
5981done
5982  done
5983IFS=$as_save_IFS
5984
5985  ;;
5986esac
5987fi
5988CMP=$ac_cv_path_CMP
5989if test -n "$CMP"; then
5990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5991$as_echo "$CMP" >&6; }
5992else
5993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994$as_echo "no" >&6; }
5995fi
5996
5997
5998  test -n "$CMP" && break
5999done
6000
6001  else
6002    # The variable is set, but is it from the command line or the environment?
6003
6004    # Try to remove the string !CMP! from our list.
6005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6007      # If it failed, the variable was not from the command line. Ignore it,
6008      # but warn the user (except for BASH, which is always set by the calling BASH).
6009      if test "xCMP" != xBASH; then
6010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6011$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6012      fi
6013      # Try to locate tool using the code snippet
6014      for ac_prog in cmp
6015do
6016  # Extract the first word of "$ac_prog", so it can be a program name with args.
6017set dummy $ac_prog; ac_word=$2
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6019$as_echo_n "checking for $ac_word... " >&6; }
6020if ${ac_cv_path_CMP+:} false; then :
6021  $as_echo_n "(cached) " >&6
6022else
6023  case $CMP in
6024  [\\/]* | ?:[\\/]*)
6025  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6026  ;;
6027  *)
6028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6029for as_dir in $PATH
6030do
6031  IFS=$as_save_IFS
6032  test -z "$as_dir" && as_dir=.
6033    for ac_exec_ext in '' $ac_executable_extensions; do
6034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6035    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6037    break 2
6038  fi
6039done
6040  done
6041IFS=$as_save_IFS
6042
6043  ;;
6044esac
6045fi
6046CMP=$ac_cv_path_CMP
6047if test -n "$CMP"; then
6048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6049$as_echo "$CMP" >&6; }
6050else
6051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6052$as_echo "no" >&6; }
6053fi
6054
6055
6056  test -n "$CMP" && break
6057done
6058
6059    else
6060      # If it succeeded, then it was overridden by the user. We will use it
6061      # for the tool.
6062
6063      # First remove it from the list of overridden variables, so we can test
6064      # for unknown variables in the end.
6065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6066
6067      # Check if we try to supply an empty value
6068      if test "x$CMP" = x; then
6069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6070$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6072$as_echo_n "checking for CMP... " >&6; }
6073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6074$as_echo "disabled" >&6; }
6075      else
6076        # Check if the provided tool contains a complete path.
6077        tool_specified="$CMP"
6078        tool_basename="${tool_specified##*/}"
6079        if test "x$tool_basename" = "x$tool_specified"; then
6080          # A command without a complete path is provided, search $PATH.
6081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6082$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6083          # Extract the first word of "$tool_basename", so it can be a program name with args.
6084set dummy $tool_basename; ac_word=$2
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
6087if ${ac_cv_path_CMP+:} false; then :
6088  $as_echo_n "(cached) " >&6
6089else
6090  case $CMP in
6091  [\\/]* | ?:[\\/]*)
6092  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6093  ;;
6094  *)
6095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6096for as_dir in $PATH
6097do
6098  IFS=$as_save_IFS
6099  test -z "$as_dir" && as_dir=.
6100    for ac_exec_ext in '' $ac_executable_extensions; do
6101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6102    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6104    break 2
6105  fi
6106done
6107  done
6108IFS=$as_save_IFS
6109
6110  ;;
6111esac
6112fi
6113CMP=$ac_cv_path_CMP
6114if test -n "$CMP"; then
6115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6116$as_echo "$CMP" >&6; }
6117else
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6119$as_echo "no" >&6; }
6120fi
6121
6122
6123          if test "x$CMP" = x; then
6124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6125          fi
6126        else
6127          # Otherwise we believe it is a complete path. Use it as it is.
6128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6129$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6131$as_echo_n "checking for CMP... " >&6; }
6132          if test ! -x "$tool_specified"; then
6133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6134$as_echo "not found" >&6; }
6135            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6136          fi
6137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6138$as_echo "$tool_specified" >&6; }
6139        fi
6140      fi
6141    fi
6142
6143  fi
6144
6145
6146
6147  if test "x$CMP" = x; then
6148    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6149  fi
6150
6151
6152
6153
6154
6155  # Publish this variable in the help.
6156
6157
6158  if [ -z "${COMM+x}" ]; then
6159    # The variable is not set by user, try to locate tool using the code snippet
6160    for ac_prog in comm
6161do
6162  # Extract the first word of "$ac_prog", so it can be a program name with args.
6163set dummy $ac_prog; ac_word=$2
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6165$as_echo_n "checking for $ac_word... " >&6; }
6166if ${ac_cv_path_COMM+:} false; then :
6167  $as_echo_n "(cached) " >&6
6168else
6169  case $COMM in
6170  [\\/]* | ?:[\\/]*)
6171  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6172  ;;
6173  *)
6174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175for as_dir in $PATH
6176do
6177  IFS=$as_save_IFS
6178  test -z "$as_dir" && as_dir=.
6179    for ac_exec_ext in '' $ac_executable_extensions; do
6180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6181    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6183    break 2
6184  fi
6185done
6186  done
6187IFS=$as_save_IFS
6188
6189  ;;
6190esac
6191fi
6192COMM=$ac_cv_path_COMM
6193if test -n "$COMM"; then
6194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6195$as_echo "$COMM" >&6; }
6196else
6197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199fi
6200
6201
6202  test -n "$COMM" && break
6203done
6204
6205  else
6206    # The variable is set, but is it from the command line or the environment?
6207
6208    # Try to remove the string !COMM! from our list.
6209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6211      # If it failed, the variable was not from the command line. Ignore it,
6212      # but warn the user (except for BASH, which is always set by the calling BASH).
6213      if test "xCOMM" != xBASH; then
6214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6215$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6216      fi
6217      # Try to locate tool using the code snippet
6218      for ac_prog in comm
6219do
6220  # Extract the first word of "$ac_prog", so it can be a program name with args.
6221set dummy $ac_prog; ac_word=$2
6222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6223$as_echo_n "checking for $ac_word... " >&6; }
6224if ${ac_cv_path_COMM+:} false; then :
6225  $as_echo_n "(cached) " >&6
6226else
6227  case $COMM in
6228  [\\/]* | ?:[\\/]*)
6229  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6230  ;;
6231  *)
6232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6233for as_dir in $PATH
6234do
6235  IFS=$as_save_IFS
6236  test -z "$as_dir" && as_dir=.
6237    for ac_exec_ext in '' $ac_executable_extensions; do
6238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6239    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6241    break 2
6242  fi
6243done
6244  done
6245IFS=$as_save_IFS
6246
6247  ;;
6248esac
6249fi
6250COMM=$ac_cv_path_COMM
6251if test -n "$COMM"; then
6252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6253$as_echo "$COMM" >&6; }
6254else
6255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6256$as_echo "no" >&6; }
6257fi
6258
6259
6260  test -n "$COMM" && break
6261done
6262
6263    else
6264      # If it succeeded, then it was overridden by the user. We will use it
6265      # for the tool.
6266
6267      # First remove it from the list of overridden variables, so we can test
6268      # for unknown variables in the end.
6269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6270
6271      # Check if we try to supply an empty value
6272      if test "x$COMM" = x; then
6273        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6274$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6275        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6276$as_echo_n "checking for COMM... " >&6; }
6277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6278$as_echo "disabled" >&6; }
6279      else
6280        # Check if the provided tool contains a complete path.
6281        tool_specified="$COMM"
6282        tool_basename="${tool_specified##*/}"
6283        if test "x$tool_basename" = "x$tool_specified"; then
6284          # A command without a complete path is provided, search $PATH.
6285          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6286$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6287          # Extract the first word of "$tool_basename", so it can be a program name with args.
6288set dummy $tool_basename; ac_word=$2
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6290$as_echo_n "checking for $ac_word... " >&6; }
6291if ${ac_cv_path_COMM+:} false; then :
6292  $as_echo_n "(cached) " >&6
6293else
6294  case $COMM in
6295  [\\/]* | ?:[\\/]*)
6296  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6297  ;;
6298  *)
6299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6300for as_dir in $PATH
6301do
6302  IFS=$as_save_IFS
6303  test -z "$as_dir" && as_dir=.
6304    for ac_exec_ext in '' $ac_executable_extensions; do
6305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6306    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6308    break 2
6309  fi
6310done
6311  done
6312IFS=$as_save_IFS
6313
6314  ;;
6315esac
6316fi
6317COMM=$ac_cv_path_COMM
6318if test -n "$COMM"; then
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6320$as_echo "$COMM" >&6; }
6321else
6322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
6324fi
6325
6326
6327          if test "x$COMM" = x; then
6328            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6329          fi
6330        else
6331          # Otherwise we believe it is a complete path. Use it as it is.
6332          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6333$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6334          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6335$as_echo_n "checking for COMM... " >&6; }
6336          if test ! -x "$tool_specified"; then
6337            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6338$as_echo "not found" >&6; }
6339            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6340          fi
6341          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6342$as_echo "$tool_specified" >&6; }
6343        fi
6344      fi
6345    fi
6346
6347  fi
6348
6349
6350
6351  if test "x$COMM" = x; then
6352    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6353  fi
6354
6355
6356
6357
6358
6359  # Publish this variable in the help.
6360
6361
6362  if [ -z "${CP+x}" ]; then
6363    # The variable is not set by user, try to locate tool using the code snippet
6364    for ac_prog in cp
6365do
6366  # Extract the first word of "$ac_prog", so it can be a program name with args.
6367set dummy $ac_prog; ac_word=$2
6368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6369$as_echo_n "checking for $ac_word... " >&6; }
6370if ${ac_cv_path_CP+:} false; then :
6371  $as_echo_n "(cached) " >&6
6372else
6373  case $CP in
6374  [\\/]* | ?:[\\/]*)
6375  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6376  ;;
6377  *)
6378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379for as_dir in $PATH
6380do
6381  IFS=$as_save_IFS
6382  test -z "$as_dir" && as_dir=.
6383    for ac_exec_ext in '' $ac_executable_extensions; do
6384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6385    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6387    break 2
6388  fi
6389done
6390  done
6391IFS=$as_save_IFS
6392
6393  ;;
6394esac
6395fi
6396CP=$ac_cv_path_CP
6397if test -n "$CP"; then
6398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6399$as_echo "$CP" >&6; }
6400else
6401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6402$as_echo "no" >&6; }
6403fi
6404
6405
6406  test -n "$CP" && break
6407done
6408
6409  else
6410    # The variable is set, but is it from the command line or the environment?
6411
6412    # Try to remove the string !CP! from our list.
6413    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6414    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6415      # If it failed, the variable was not from the command line. Ignore it,
6416      # but warn the user (except for BASH, which is always set by the calling BASH).
6417      if test "xCP" != xBASH; then
6418        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6419$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6420      fi
6421      # Try to locate tool using the code snippet
6422      for ac_prog in cp
6423do
6424  # Extract the first word of "$ac_prog", so it can be a program name with args.
6425set dummy $ac_prog; ac_word=$2
6426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6427$as_echo_n "checking for $ac_word... " >&6; }
6428if ${ac_cv_path_CP+:} false; then :
6429  $as_echo_n "(cached) " >&6
6430else
6431  case $CP in
6432  [\\/]* | ?:[\\/]*)
6433  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6434  ;;
6435  *)
6436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6437for as_dir in $PATH
6438do
6439  IFS=$as_save_IFS
6440  test -z "$as_dir" && as_dir=.
6441    for ac_exec_ext in '' $ac_executable_extensions; do
6442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6443    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6445    break 2
6446  fi
6447done
6448  done
6449IFS=$as_save_IFS
6450
6451  ;;
6452esac
6453fi
6454CP=$ac_cv_path_CP
6455if test -n "$CP"; then
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6457$as_echo "$CP" >&6; }
6458else
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; }
6461fi
6462
6463
6464  test -n "$CP" && break
6465done
6466
6467    else
6468      # If it succeeded, then it was overridden by the user. We will use it
6469      # for the tool.
6470
6471      # First remove it from the list of overridden variables, so we can test
6472      # for unknown variables in the end.
6473      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6474
6475      # Check if we try to supply an empty value
6476      if test "x$CP" = x; then
6477        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6478$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6479        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6480$as_echo_n "checking for CP... " >&6; }
6481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6482$as_echo "disabled" >&6; }
6483      else
6484        # Check if the provided tool contains a complete path.
6485        tool_specified="$CP"
6486        tool_basename="${tool_specified##*/}"
6487        if test "x$tool_basename" = "x$tool_specified"; then
6488          # A command without a complete path is provided, search $PATH.
6489          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6490$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6491          # Extract the first word of "$tool_basename", so it can be a program name with args.
6492set dummy $tool_basename; ac_word=$2
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6494$as_echo_n "checking for $ac_word... " >&6; }
6495if ${ac_cv_path_CP+:} false; then :
6496  $as_echo_n "(cached) " >&6
6497else
6498  case $CP in
6499  [\\/]* | ?:[\\/]*)
6500  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6501  ;;
6502  *)
6503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6504for as_dir in $PATH
6505do
6506  IFS=$as_save_IFS
6507  test -z "$as_dir" && as_dir=.
6508    for ac_exec_ext in '' $ac_executable_extensions; do
6509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6510    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6512    break 2
6513  fi
6514done
6515  done
6516IFS=$as_save_IFS
6517
6518  ;;
6519esac
6520fi
6521CP=$ac_cv_path_CP
6522if test -n "$CP"; then
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6524$as_echo "$CP" >&6; }
6525else
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; }
6528fi
6529
6530
6531          if test "x$CP" = x; then
6532            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6533          fi
6534        else
6535          # Otherwise we believe it is a complete path. Use it as it is.
6536          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6537$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6538          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6539$as_echo_n "checking for CP... " >&6; }
6540          if test ! -x "$tool_specified"; then
6541            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6542$as_echo "not found" >&6; }
6543            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6544          fi
6545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6546$as_echo "$tool_specified" >&6; }
6547        fi
6548      fi
6549    fi
6550
6551  fi
6552
6553
6554
6555  if test "x$CP" = x; then
6556    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6557  fi
6558
6559
6560
6561
6562
6563  # Publish this variable in the help.
6564
6565
6566  if [ -z "${CUT+x}" ]; then
6567    # The variable is not set by user, try to locate tool using the code snippet
6568    for ac_prog in cut
6569do
6570  # Extract the first word of "$ac_prog", so it can be a program name with args.
6571set dummy $ac_prog; ac_word=$2
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573$as_echo_n "checking for $ac_word... " >&6; }
6574if ${ac_cv_path_CUT+:} false; then :
6575  $as_echo_n "(cached) " >&6
6576else
6577  case $CUT in
6578  [\\/]* | ?:[\\/]*)
6579  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6580  ;;
6581  *)
6582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in $PATH
6584do
6585  IFS=$as_save_IFS
6586  test -z "$as_dir" && as_dir=.
6587    for ac_exec_ext in '' $ac_executable_extensions; do
6588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6589    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6591    break 2
6592  fi
6593done
6594  done
6595IFS=$as_save_IFS
6596
6597  ;;
6598esac
6599fi
6600CUT=$ac_cv_path_CUT
6601if test -n "$CUT"; then
6602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6603$as_echo "$CUT" >&6; }
6604else
6605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
6607fi
6608
6609
6610  test -n "$CUT" && break
6611done
6612
6613  else
6614    # The variable is set, but is it from the command line or the environment?
6615
6616    # Try to remove the string !CUT! from our list.
6617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6619      # If it failed, the variable was not from the command line. Ignore it,
6620      # but warn the user (except for BASH, which is always set by the calling BASH).
6621      if test "xCUT" != xBASH; then
6622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6623$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6624      fi
6625      # Try to locate tool using the code snippet
6626      for ac_prog in cut
6627do
6628  # Extract the first word of "$ac_prog", so it can be a program name with args.
6629set dummy $ac_prog; ac_word=$2
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631$as_echo_n "checking for $ac_word... " >&6; }
6632if ${ac_cv_path_CUT+:} false; then :
6633  $as_echo_n "(cached) " >&6
6634else
6635  case $CUT in
6636  [\\/]* | ?:[\\/]*)
6637  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6638  ;;
6639  *)
6640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641for as_dir in $PATH
6642do
6643  IFS=$as_save_IFS
6644  test -z "$as_dir" && as_dir=.
6645    for ac_exec_ext in '' $ac_executable_extensions; do
6646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6647    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6649    break 2
6650  fi
6651done
6652  done
6653IFS=$as_save_IFS
6654
6655  ;;
6656esac
6657fi
6658CUT=$ac_cv_path_CUT
6659if test -n "$CUT"; then
6660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6661$as_echo "$CUT" >&6; }
6662else
6663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6664$as_echo "no" >&6; }
6665fi
6666
6667
6668  test -n "$CUT" && break
6669done
6670
6671    else
6672      # If it succeeded, then it was overridden by the user. We will use it
6673      # for the tool.
6674
6675      # First remove it from the list of overridden variables, so we can test
6676      # for unknown variables in the end.
6677      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6678
6679      # Check if we try to supply an empty value
6680      if test "x$CUT" = x; then
6681        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6682$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6684$as_echo_n "checking for CUT... " >&6; }
6685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6686$as_echo "disabled" >&6; }
6687      else
6688        # Check if the provided tool contains a complete path.
6689        tool_specified="$CUT"
6690        tool_basename="${tool_specified##*/}"
6691        if test "x$tool_basename" = "x$tool_specified"; then
6692          # A command without a complete path is provided, search $PATH.
6693          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6694$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6695          # Extract the first word of "$tool_basename", so it can be a program name with args.
6696set dummy $tool_basename; ac_word=$2
6697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6698$as_echo_n "checking for $ac_word... " >&6; }
6699if ${ac_cv_path_CUT+:} false; then :
6700  $as_echo_n "(cached) " >&6
6701else
6702  case $CUT in
6703  [\\/]* | ?:[\\/]*)
6704  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6705  ;;
6706  *)
6707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6708for as_dir in $PATH
6709do
6710  IFS=$as_save_IFS
6711  test -z "$as_dir" && as_dir=.
6712    for ac_exec_ext in '' $ac_executable_extensions; do
6713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6714    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6716    break 2
6717  fi
6718done
6719  done
6720IFS=$as_save_IFS
6721
6722  ;;
6723esac
6724fi
6725CUT=$ac_cv_path_CUT
6726if test -n "$CUT"; then
6727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6728$as_echo "$CUT" >&6; }
6729else
6730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6731$as_echo "no" >&6; }
6732fi
6733
6734
6735          if test "x$CUT" = x; then
6736            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6737          fi
6738        else
6739          # Otherwise we believe it is a complete path. Use it as it is.
6740          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6741$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6742          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6743$as_echo_n "checking for CUT... " >&6; }
6744          if test ! -x "$tool_specified"; then
6745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6746$as_echo "not found" >&6; }
6747            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6748          fi
6749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6750$as_echo "$tool_specified" >&6; }
6751        fi
6752      fi
6753    fi
6754
6755  fi
6756
6757
6758
6759  if test "x$CUT" = x; then
6760    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6761  fi
6762
6763
6764
6765
6766
6767  # Publish this variable in the help.
6768
6769
6770  if [ -z "${DATE+x}" ]; then
6771    # The variable is not set by user, try to locate tool using the code snippet
6772    for ac_prog in date
6773do
6774  # Extract the first word of "$ac_prog", so it can be a program name with args.
6775set dummy $ac_prog; ac_word=$2
6776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6777$as_echo_n "checking for $ac_word... " >&6; }
6778if ${ac_cv_path_DATE+:} false; then :
6779  $as_echo_n "(cached) " >&6
6780else
6781  case $DATE in
6782  [\\/]* | ?:[\\/]*)
6783  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6784  ;;
6785  *)
6786  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6787for as_dir in $PATH
6788do
6789  IFS=$as_save_IFS
6790  test -z "$as_dir" && as_dir=.
6791    for ac_exec_ext in '' $ac_executable_extensions; do
6792  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6793    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6794    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6795    break 2
6796  fi
6797done
6798  done
6799IFS=$as_save_IFS
6800
6801  ;;
6802esac
6803fi
6804DATE=$ac_cv_path_DATE
6805if test -n "$DATE"; then
6806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6807$as_echo "$DATE" >&6; }
6808else
6809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6810$as_echo "no" >&6; }
6811fi
6812
6813
6814  test -n "$DATE" && break
6815done
6816
6817  else
6818    # The variable is set, but is it from the command line or the environment?
6819
6820    # Try to remove the string !DATE! from our list.
6821    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6822    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6823      # If it failed, the variable was not from the command line. Ignore it,
6824      # but warn the user (except for BASH, which is always set by the calling BASH).
6825      if test "xDATE" != xBASH; then
6826        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6827$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6828      fi
6829      # Try to locate tool using the code snippet
6830      for ac_prog in date
6831do
6832  # Extract the first word of "$ac_prog", so it can be a program name with args.
6833set dummy $ac_prog; ac_word=$2
6834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6835$as_echo_n "checking for $ac_word... " >&6; }
6836if ${ac_cv_path_DATE+:} false; then :
6837  $as_echo_n "(cached) " >&6
6838else
6839  case $DATE in
6840  [\\/]* | ?:[\\/]*)
6841  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6842  ;;
6843  *)
6844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6845for as_dir in $PATH
6846do
6847  IFS=$as_save_IFS
6848  test -z "$as_dir" && as_dir=.
6849    for ac_exec_ext in '' $ac_executable_extensions; do
6850  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6851    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6852    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6853    break 2
6854  fi
6855done
6856  done
6857IFS=$as_save_IFS
6858
6859  ;;
6860esac
6861fi
6862DATE=$ac_cv_path_DATE
6863if test -n "$DATE"; then
6864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6865$as_echo "$DATE" >&6; }
6866else
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6868$as_echo "no" >&6; }
6869fi
6870
6871
6872  test -n "$DATE" && break
6873done
6874
6875    else
6876      # If it succeeded, then it was overridden by the user. We will use it
6877      # for the tool.
6878
6879      # First remove it from the list of overridden variables, so we can test
6880      # for unknown variables in the end.
6881      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6882
6883      # Check if we try to supply an empty value
6884      if test "x$DATE" = x; then
6885        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6886$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6887        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6888$as_echo_n "checking for DATE... " >&6; }
6889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6890$as_echo "disabled" >&6; }
6891      else
6892        # Check if the provided tool contains a complete path.
6893        tool_specified="$DATE"
6894        tool_basename="${tool_specified##*/}"
6895        if test "x$tool_basename" = "x$tool_specified"; then
6896          # A command without a complete path is provided, search $PATH.
6897          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6898$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6899          # Extract the first word of "$tool_basename", so it can be a program name with args.
6900set dummy $tool_basename; ac_word=$2
6901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6902$as_echo_n "checking for $ac_word... " >&6; }
6903if ${ac_cv_path_DATE+:} false; then :
6904  $as_echo_n "(cached) " >&6
6905else
6906  case $DATE in
6907  [\\/]* | ?:[\\/]*)
6908  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6909  ;;
6910  *)
6911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912for as_dir in $PATH
6913do
6914  IFS=$as_save_IFS
6915  test -z "$as_dir" && as_dir=.
6916    for ac_exec_ext in '' $ac_executable_extensions; do
6917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6918    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6920    break 2
6921  fi
6922done
6923  done
6924IFS=$as_save_IFS
6925
6926  ;;
6927esac
6928fi
6929DATE=$ac_cv_path_DATE
6930if test -n "$DATE"; then
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6932$as_echo "$DATE" >&6; }
6933else
6934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6935$as_echo "no" >&6; }
6936fi
6937
6938
6939          if test "x$DATE" = x; then
6940            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6941          fi
6942        else
6943          # Otherwise we believe it is a complete path. Use it as it is.
6944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6945$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6946          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6947$as_echo_n "checking for DATE... " >&6; }
6948          if test ! -x "$tool_specified"; then
6949            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6950$as_echo "not found" >&6; }
6951            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6952          fi
6953          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6954$as_echo "$tool_specified" >&6; }
6955        fi
6956      fi
6957    fi
6958
6959  fi
6960
6961
6962
6963  if test "x$DATE" = x; then
6964    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6965  fi
6966
6967
6968
6969
6970
6971  # Publish this variable in the help.
6972
6973
6974  if [ -z "${DIFF+x}" ]; then
6975    # The variable is not set by user, try to locate tool using the code snippet
6976    for ac_prog in gdiff diff
6977do
6978  # Extract the first word of "$ac_prog", so it can be a program name with args.
6979set dummy $ac_prog; ac_word=$2
6980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6981$as_echo_n "checking for $ac_word... " >&6; }
6982if ${ac_cv_path_DIFF+:} false; then :
6983  $as_echo_n "(cached) " >&6
6984else
6985  case $DIFF in
6986  [\\/]* | ?:[\\/]*)
6987  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6988  ;;
6989  *)
6990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6991for as_dir in $PATH
6992do
6993  IFS=$as_save_IFS
6994  test -z "$as_dir" && as_dir=.
6995    for ac_exec_ext in '' $ac_executable_extensions; do
6996  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6997    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6999    break 2
7000  fi
7001done
7002  done
7003IFS=$as_save_IFS
7004
7005  ;;
7006esac
7007fi
7008DIFF=$ac_cv_path_DIFF
7009if test -n "$DIFF"; then
7010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7011$as_echo "$DIFF" >&6; }
7012else
7013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7014$as_echo "no" >&6; }
7015fi
7016
7017
7018  test -n "$DIFF" && break
7019done
7020
7021  else
7022    # The variable is set, but is it from the command line or the environment?
7023
7024    # Try to remove the string !DIFF! from our list.
7025    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7026    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7027      # If it failed, the variable was not from the command line. Ignore it,
7028      # but warn the user (except for BASH, which is always set by the calling BASH).
7029      if test "xDIFF" != xBASH; then
7030        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7031$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7032      fi
7033      # Try to locate tool using the code snippet
7034      for ac_prog in gdiff diff
7035do
7036  # Extract the first word of "$ac_prog", so it can be a program name with args.
7037set dummy $ac_prog; ac_word=$2
7038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7039$as_echo_n "checking for $ac_word... " >&6; }
7040if ${ac_cv_path_DIFF+:} false; then :
7041  $as_echo_n "(cached) " >&6
7042else
7043  case $DIFF in
7044  [\\/]* | ?:[\\/]*)
7045  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7046  ;;
7047  *)
7048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7049for as_dir in $PATH
7050do
7051  IFS=$as_save_IFS
7052  test -z "$as_dir" && as_dir=.
7053    for ac_exec_ext in '' $ac_executable_extensions; do
7054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7055    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7057    break 2
7058  fi
7059done
7060  done
7061IFS=$as_save_IFS
7062
7063  ;;
7064esac
7065fi
7066DIFF=$ac_cv_path_DIFF
7067if test -n "$DIFF"; then
7068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7069$as_echo "$DIFF" >&6; }
7070else
7071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7072$as_echo "no" >&6; }
7073fi
7074
7075
7076  test -n "$DIFF" && break
7077done
7078
7079    else
7080      # If it succeeded, then it was overridden by the user. We will use it
7081      # for the tool.
7082
7083      # First remove it from the list of overridden variables, so we can test
7084      # for unknown variables in the end.
7085      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7086
7087      # Check if we try to supply an empty value
7088      if test "x$DIFF" = x; then
7089        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7090$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7092$as_echo_n "checking for DIFF... " >&6; }
7093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7094$as_echo "disabled" >&6; }
7095      else
7096        # Check if the provided tool contains a complete path.
7097        tool_specified="$DIFF"
7098        tool_basename="${tool_specified##*/}"
7099        if test "x$tool_basename" = "x$tool_specified"; then
7100          # A command without a complete path is provided, search $PATH.
7101          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7102$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7103          # Extract the first word of "$tool_basename", so it can be a program name with args.
7104set dummy $tool_basename; ac_word=$2
7105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7106$as_echo_n "checking for $ac_word... " >&6; }
7107if ${ac_cv_path_DIFF+:} false; then :
7108  $as_echo_n "(cached) " >&6
7109else
7110  case $DIFF in
7111  [\\/]* | ?:[\\/]*)
7112  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7113  ;;
7114  *)
7115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7116for as_dir in $PATH
7117do
7118  IFS=$as_save_IFS
7119  test -z "$as_dir" && as_dir=.
7120    for ac_exec_ext in '' $ac_executable_extensions; do
7121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7122    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7124    break 2
7125  fi
7126done
7127  done
7128IFS=$as_save_IFS
7129
7130  ;;
7131esac
7132fi
7133DIFF=$ac_cv_path_DIFF
7134if test -n "$DIFF"; then
7135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7136$as_echo "$DIFF" >&6; }
7137else
7138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7139$as_echo "no" >&6; }
7140fi
7141
7142
7143          if test "x$DIFF" = x; then
7144            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7145          fi
7146        else
7147          # Otherwise we believe it is a complete path. Use it as it is.
7148          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7149$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7150          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7151$as_echo_n "checking for DIFF... " >&6; }
7152          if test ! -x "$tool_specified"; then
7153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7154$as_echo "not found" >&6; }
7155            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7156          fi
7157          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7158$as_echo "$tool_specified" >&6; }
7159        fi
7160      fi
7161    fi
7162
7163  fi
7164
7165
7166
7167  if test "x$DIFF" = x; then
7168    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7169  fi
7170
7171
7172
7173
7174
7175  # Publish this variable in the help.
7176
7177
7178  if [ -z "${DIRNAME+x}" ]; then
7179    # The variable is not set by user, try to locate tool using the code snippet
7180    for ac_prog in dirname
7181do
7182  # Extract the first word of "$ac_prog", so it can be a program name with args.
7183set dummy $ac_prog; ac_word=$2
7184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7185$as_echo_n "checking for $ac_word... " >&6; }
7186if ${ac_cv_path_DIRNAME+:} false; then :
7187  $as_echo_n "(cached) " >&6
7188else
7189  case $DIRNAME in
7190  [\\/]* | ?:[\\/]*)
7191  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7192  ;;
7193  *)
7194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7195for as_dir in $PATH
7196do
7197  IFS=$as_save_IFS
7198  test -z "$as_dir" && as_dir=.
7199    for ac_exec_ext in '' $ac_executable_extensions; do
7200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7201    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7203    break 2
7204  fi
7205done
7206  done
7207IFS=$as_save_IFS
7208
7209  ;;
7210esac
7211fi
7212DIRNAME=$ac_cv_path_DIRNAME
7213if test -n "$DIRNAME"; then
7214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7215$as_echo "$DIRNAME" >&6; }
7216else
7217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7218$as_echo "no" >&6; }
7219fi
7220
7221
7222  test -n "$DIRNAME" && break
7223done
7224
7225  else
7226    # The variable is set, but is it from the command line or the environment?
7227
7228    # Try to remove the string !DIRNAME! from our list.
7229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7231      # If it failed, the variable was not from the command line. Ignore it,
7232      # but warn the user (except for BASH, which is always set by the calling BASH).
7233      if test "xDIRNAME" != xBASH; then
7234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7235$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7236      fi
7237      # Try to locate tool using the code snippet
7238      for ac_prog in dirname
7239do
7240  # Extract the first word of "$ac_prog", so it can be a program name with args.
7241set dummy $ac_prog; ac_word=$2
7242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7243$as_echo_n "checking for $ac_word... " >&6; }
7244if ${ac_cv_path_DIRNAME+:} false; then :
7245  $as_echo_n "(cached) " >&6
7246else
7247  case $DIRNAME in
7248  [\\/]* | ?:[\\/]*)
7249  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7250  ;;
7251  *)
7252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7253for as_dir in $PATH
7254do
7255  IFS=$as_save_IFS
7256  test -z "$as_dir" && as_dir=.
7257    for ac_exec_ext in '' $ac_executable_extensions; do
7258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7259    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7261    break 2
7262  fi
7263done
7264  done
7265IFS=$as_save_IFS
7266
7267  ;;
7268esac
7269fi
7270DIRNAME=$ac_cv_path_DIRNAME
7271if test -n "$DIRNAME"; then
7272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7273$as_echo "$DIRNAME" >&6; }
7274else
7275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7276$as_echo "no" >&6; }
7277fi
7278
7279
7280  test -n "$DIRNAME" && break
7281done
7282
7283    else
7284      # If it succeeded, then it was overridden by the user. We will use it
7285      # for the tool.
7286
7287      # First remove it from the list of overridden variables, so we can test
7288      # for unknown variables in the end.
7289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7290
7291      # Check if we try to supply an empty value
7292      if test "x$DIRNAME" = x; then
7293        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7294$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7296$as_echo_n "checking for DIRNAME... " >&6; }
7297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7298$as_echo "disabled" >&6; }
7299      else
7300        # Check if the provided tool contains a complete path.
7301        tool_specified="$DIRNAME"
7302        tool_basename="${tool_specified##*/}"
7303        if test "x$tool_basename" = "x$tool_specified"; then
7304          # A command without a complete path is provided, search $PATH.
7305          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7306$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7307          # Extract the first word of "$tool_basename", so it can be a program name with args.
7308set dummy $tool_basename; ac_word=$2
7309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7310$as_echo_n "checking for $ac_word... " >&6; }
7311if ${ac_cv_path_DIRNAME+:} false; then :
7312  $as_echo_n "(cached) " >&6
7313else
7314  case $DIRNAME in
7315  [\\/]* | ?:[\\/]*)
7316  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7317  ;;
7318  *)
7319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7320for as_dir in $PATH
7321do
7322  IFS=$as_save_IFS
7323  test -z "$as_dir" && as_dir=.
7324    for ac_exec_ext in '' $ac_executable_extensions; do
7325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7326    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7328    break 2
7329  fi
7330done
7331  done
7332IFS=$as_save_IFS
7333
7334  ;;
7335esac
7336fi
7337DIRNAME=$ac_cv_path_DIRNAME
7338if test -n "$DIRNAME"; then
7339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7340$as_echo "$DIRNAME" >&6; }
7341else
7342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7343$as_echo "no" >&6; }
7344fi
7345
7346
7347          if test "x$DIRNAME" = x; then
7348            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7349          fi
7350        else
7351          # Otherwise we believe it is a complete path. Use it as it is.
7352          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7353$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7354          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7355$as_echo_n "checking for DIRNAME... " >&6; }
7356          if test ! -x "$tool_specified"; then
7357            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7358$as_echo "not found" >&6; }
7359            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7360          fi
7361          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7362$as_echo "$tool_specified" >&6; }
7363        fi
7364      fi
7365    fi
7366
7367  fi
7368
7369
7370
7371  if test "x$DIRNAME" = x; then
7372    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7373  fi
7374
7375
7376
7377
7378
7379  # Publish this variable in the help.
7380
7381
7382  if [ -z "${ECHO+x}" ]; then
7383    # The variable is not set by user, try to locate tool using the code snippet
7384    for ac_prog in echo
7385do
7386  # Extract the first word of "$ac_prog", so it can be a program name with args.
7387set dummy $ac_prog; ac_word=$2
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389$as_echo_n "checking for $ac_word... " >&6; }
7390if ${ac_cv_path_ECHO+:} false; then :
7391  $as_echo_n "(cached) " >&6
7392else
7393  case $ECHO in
7394  [\\/]* | ?:[\\/]*)
7395  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7396  ;;
7397  *)
7398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7399for as_dir in $PATH
7400do
7401  IFS=$as_save_IFS
7402  test -z "$as_dir" && as_dir=.
7403    for ac_exec_ext in '' $ac_executable_extensions; do
7404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7405    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407    break 2
7408  fi
7409done
7410  done
7411IFS=$as_save_IFS
7412
7413  ;;
7414esac
7415fi
7416ECHO=$ac_cv_path_ECHO
7417if test -n "$ECHO"; then
7418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7419$as_echo "$ECHO" >&6; }
7420else
7421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
7423fi
7424
7425
7426  test -n "$ECHO" && break
7427done
7428
7429  else
7430    # The variable is set, but is it from the command line or the environment?
7431
7432    # Try to remove the string !ECHO! from our list.
7433    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7434    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7435      # If it failed, the variable was not from the command line. Ignore it,
7436      # but warn the user (except for BASH, which is always set by the calling BASH).
7437      if test "xECHO" != xBASH; then
7438        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7439$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7440      fi
7441      # Try to locate tool using the code snippet
7442      for ac_prog in echo
7443do
7444  # Extract the first word of "$ac_prog", so it can be a program name with args.
7445set dummy $ac_prog; ac_word=$2
7446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7447$as_echo_n "checking for $ac_word... " >&6; }
7448if ${ac_cv_path_ECHO+:} false; then :
7449  $as_echo_n "(cached) " >&6
7450else
7451  case $ECHO in
7452  [\\/]* | ?:[\\/]*)
7453  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7454  ;;
7455  *)
7456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7457for as_dir in $PATH
7458do
7459  IFS=$as_save_IFS
7460  test -z "$as_dir" && as_dir=.
7461    for ac_exec_ext in '' $ac_executable_extensions; do
7462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7463    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7465    break 2
7466  fi
7467done
7468  done
7469IFS=$as_save_IFS
7470
7471  ;;
7472esac
7473fi
7474ECHO=$ac_cv_path_ECHO
7475if test -n "$ECHO"; then
7476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7477$as_echo "$ECHO" >&6; }
7478else
7479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
7481fi
7482
7483
7484  test -n "$ECHO" && break
7485done
7486
7487    else
7488      # If it succeeded, then it was overridden by the user. We will use it
7489      # for the tool.
7490
7491      # First remove it from the list of overridden variables, so we can test
7492      # for unknown variables in the end.
7493      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7494
7495      # Check if we try to supply an empty value
7496      if test "x$ECHO" = x; then
7497        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7498$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7499        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7500$as_echo_n "checking for ECHO... " >&6; }
7501        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7502$as_echo "disabled" >&6; }
7503      else
7504        # Check if the provided tool contains a complete path.
7505        tool_specified="$ECHO"
7506        tool_basename="${tool_specified##*/}"
7507        if test "x$tool_basename" = "x$tool_specified"; then
7508          # A command without a complete path is provided, search $PATH.
7509          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7510$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7511          # Extract the first word of "$tool_basename", so it can be a program name with args.
7512set dummy $tool_basename; ac_word=$2
7513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7514$as_echo_n "checking for $ac_word... " >&6; }
7515if ${ac_cv_path_ECHO+:} false; then :
7516  $as_echo_n "(cached) " >&6
7517else
7518  case $ECHO in
7519  [\\/]* | ?:[\\/]*)
7520  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7521  ;;
7522  *)
7523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7524for as_dir in $PATH
7525do
7526  IFS=$as_save_IFS
7527  test -z "$as_dir" && as_dir=.
7528    for ac_exec_ext in '' $ac_executable_extensions; do
7529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7530    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7532    break 2
7533  fi
7534done
7535  done
7536IFS=$as_save_IFS
7537
7538  ;;
7539esac
7540fi
7541ECHO=$ac_cv_path_ECHO
7542if test -n "$ECHO"; then
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7544$as_echo "$ECHO" >&6; }
7545else
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547$as_echo "no" >&6; }
7548fi
7549
7550
7551          if test "x$ECHO" = x; then
7552            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7553          fi
7554        else
7555          # Otherwise we believe it is a complete path. Use it as it is.
7556          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7557$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7558          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7559$as_echo_n "checking for ECHO... " >&6; }
7560          if test ! -x "$tool_specified"; then
7561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7562$as_echo "not found" >&6; }
7563            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7564          fi
7565          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7566$as_echo "$tool_specified" >&6; }
7567        fi
7568      fi
7569    fi
7570
7571  fi
7572
7573
7574
7575  if test "x$ECHO" = x; then
7576    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7577  fi
7578
7579
7580
7581
7582
7583  # Publish this variable in the help.
7584
7585
7586  if [ -z "${EXPR+x}" ]; then
7587    # The variable is not set by user, try to locate tool using the code snippet
7588    for ac_prog in expr
7589do
7590  # Extract the first word of "$ac_prog", so it can be a program name with args.
7591set dummy $ac_prog; ac_word=$2
7592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7593$as_echo_n "checking for $ac_word... " >&6; }
7594if ${ac_cv_path_EXPR+:} false; then :
7595  $as_echo_n "(cached) " >&6
7596else
7597  case $EXPR in
7598  [\\/]* | ?:[\\/]*)
7599  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7600  ;;
7601  *)
7602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603for as_dir in $PATH
7604do
7605  IFS=$as_save_IFS
7606  test -z "$as_dir" && as_dir=.
7607    for ac_exec_ext in '' $ac_executable_extensions; do
7608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611    break 2
7612  fi
7613done
7614  done
7615IFS=$as_save_IFS
7616
7617  ;;
7618esac
7619fi
7620EXPR=$ac_cv_path_EXPR
7621if test -n "$EXPR"; then
7622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7623$as_echo "$EXPR" >&6; }
7624else
7625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7626$as_echo "no" >&6; }
7627fi
7628
7629
7630  test -n "$EXPR" && break
7631done
7632
7633  else
7634    # The variable is set, but is it from the command line or the environment?
7635
7636    # Try to remove the string !EXPR! from our list.
7637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7639      # If it failed, the variable was not from the command line. Ignore it,
7640      # but warn the user (except for BASH, which is always set by the calling BASH).
7641      if test "xEXPR" != xBASH; then
7642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7643$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7644      fi
7645      # Try to locate tool using the code snippet
7646      for ac_prog in expr
7647do
7648  # Extract the first word of "$ac_prog", so it can be a program name with args.
7649set dummy $ac_prog; ac_word=$2
7650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7651$as_echo_n "checking for $ac_word... " >&6; }
7652if ${ac_cv_path_EXPR+:} false; then :
7653  $as_echo_n "(cached) " >&6
7654else
7655  case $EXPR in
7656  [\\/]* | ?:[\\/]*)
7657  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7658  ;;
7659  *)
7660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661for as_dir in $PATH
7662do
7663  IFS=$as_save_IFS
7664  test -z "$as_dir" && as_dir=.
7665    for ac_exec_ext in '' $ac_executable_extensions; do
7666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669    break 2
7670  fi
7671done
7672  done
7673IFS=$as_save_IFS
7674
7675  ;;
7676esac
7677fi
7678EXPR=$ac_cv_path_EXPR
7679if test -n "$EXPR"; then
7680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7681$as_echo "$EXPR" >&6; }
7682else
7683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7684$as_echo "no" >&6; }
7685fi
7686
7687
7688  test -n "$EXPR" && break
7689done
7690
7691    else
7692      # If it succeeded, then it was overridden by the user. We will use it
7693      # for the tool.
7694
7695      # First remove it from the list of overridden variables, so we can test
7696      # for unknown variables in the end.
7697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7698
7699      # Check if we try to supply an empty value
7700      if test "x$EXPR" = x; then
7701        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7702$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7704$as_echo_n "checking for EXPR... " >&6; }
7705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7706$as_echo "disabled" >&6; }
7707      else
7708        # Check if the provided tool contains a complete path.
7709        tool_specified="$EXPR"
7710        tool_basename="${tool_specified##*/}"
7711        if test "x$tool_basename" = "x$tool_specified"; then
7712          # A command without a complete path is provided, search $PATH.
7713          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7714$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7715          # Extract the first word of "$tool_basename", so it can be a program name with args.
7716set dummy $tool_basename; ac_word=$2
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7718$as_echo_n "checking for $ac_word... " >&6; }
7719if ${ac_cv_path_EXPR+:} false; then :
7720  $as_echo_n "(cached) " >&6
7721else
7722  case $EXPR in
7723  [\\/]* | ?:[\\/]*)
7724  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7725  ;;
7726  *)
7727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7728for as_dir in $PATH
7729do
7730  IFS=$as_save_IFS
7731  test -z "$as_dir" && as_dir=.
7732    for ac_exec_ext in '' $ac_executable_extensions; do
7733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7734    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7736    break 2
7737  fi
7738done
7739  done
7740IFS=$as_save_IFS
7741
7742  ;;
7743esac
7744fi
7745EXPR=$ac_cv_path_EXPR
7746if test -n "$EXPR"; then
7747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7748$as_echo "$EXPR" >&6; }
7749else
7750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7751$as_echo "no" >&6; }
7752fi
7753
7754
7755          if test "x$EXPR" = x; then
7756            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7757          fi
7758        else
7759          # Otherwise we believe it is a complete path. Use it as it is.
7760          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7761$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7762          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7763$as_echo_n "checking for EXPR... " >&6; }
7764          if test ! -x "$tool_specified"; then
7765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7766$as_echo "not found" >&6; }
7767            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7768          fi
7769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7770$as_echo "$tool_specified" >&6; }
7771        fi
7772      fi
7773    fi
7774
7775  fi
7776
7777
7778
7779  if test "x$EXPR" = x; then
7780    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7781  fi
7782
7783
7784
7785
7786
7787  # Publish this variable in the help.
7788
7789
7790  if [ -z "${FILE+x}" ]; then
7791    # The variable is not set by user, try to locate tool using the code snippet
7792    for ac_prog in file
7793do
7794  # Extract the first word of "$ac_prog", so it can be a program name with args.
7795set dummy $ac_prog; ac_word=$2
7796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7797$as_echo_n "checking for $ac_word... " >&6; }
7798if ${ac_cv_path_FILE+:} false; then :
7799  $as_echo_n "(cached) " >&6
7800else
7801  case $FILE in
7802  [\\/]* | ?:[\\/]*)
7803  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7804  ;;
7805  *)
7806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7807for as_dir in $PATH
7808do
7809  IFS=$as_save_IFS
7810  test -z "$as_dir" && as_dir=.
7811    for ac_exec_ext in '' $ac_executable_extensions; do
7812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7813    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7815    break 2
7816  fi
7817done
7818  done
7819IFS=$as_save_IFS
7820
7821  ;;
7822esac
7823fi
7824FILE=$ac_cv_path_FILE
7825if test -n "$FILE"; then
7826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7827$as_echo "$FILE" >&6; }
7828else
7829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7830$as_echo "no" >&6; }
7831fi
7832
7833
7834  test -n "$FILE" && break
7835done
7836
7837  else
7838    # The variable is set, but is it from the command line or the environment?
7839
7840    # Try to remove the string !FILE! from our list.
7841    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7842    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7843      # If it failed, the variable was not from the command line. Ignore it,
7844      # but warn the user (except for BASH, which is always set by the calling BASH).
7845      if test "xFILE" != xBASH; then
7846        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7847$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7848      fi
7849      # Try to locate tool using the code snippet
7850      for ac_prog in file
7851do
7852  # Extract the first word of "$ac_prog", so it can be a program name with args.
7853set dummy $ac_prog; ac_word=$2
7854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7855$as_echo_n "checking for $ac_word... " >&6; }
7856if ${ac_cv_path_FILE+:} false; then :
7857  $as_echo_n "(cached) " >&6
7858else
7859  case $FILE in
7860  [\\/]* | ?:[\\/]*)
7861  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7862  ;;
7863  *)
7864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7865for as_dir in $PATH
7866do
7867  IFS=$as_save_IFS
7868  test -z "$as_dir" && as_dir=.
7869    for ac_exec_ext in '' $ac_executable_extensions; do
7870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7871    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7873    break 2
7874  fi
7875done
7876  done
7877IFS=$as_save_IFS
7878
7879  ;;
7880esac
7881fi
7882FILE=$ac_cv_path_FILE
7883if test -n "$FILE"; then
7884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7885$as_echo "$FILE" >&6; }
7886else
7887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7888$as_echo "no" >&6; }
7889fi
7890
7891
7892  test -n "$FILE" && break
7893done
7894
7895    else
7896      # If it succeeded, then it was overridden by the user. We will use it
7897      # for the tool.
7898
7899      # First remove it from the list of overridden variables, so we can test
7900      # for unknown variables in the end.
7901      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7902
7903      # Check if we try to supply an empty value
7904      if test "x$FILE" = x; then
7905        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7906$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7908$as_echo_n "checking for FILE... " >&6; }
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7910$as_echo "disabled" >&6; }
7911      else
7912        # Check if the provided tool contains a complete path.
7913        tool_specified="$FILE"
7914        tool_basename="${tool_specified##*/}"
7915        if test "x$tool_basename" = "x$tool_specified"; then
7916          # A command without a complete path is provided, search $PATH.
7917          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7918$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7919          # Extract the first word of "$tool_basename", so it can be a program name with args.
7920set dummy $tool_basename; ac_word=$2
7921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7922$as_echo_n "checking for $ac_word... " >&6; }
7923if ${ac_cv_path_FILE+:} false; then :
7924  $as_echo_n "(cached) " >&6
7925else
7926  case $FILE in
7927  [\\/]* | ?:[\\/]*)
7928  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7929  ;;
7930  *)
7931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7932for as_dir in $PATH
7933do
7934  IFS=$as_save_IFS
7935  test -z "$as_dir" && as_dir=.
7936    for ac_exec_ext in '' $ac_executable_extensions; do
7937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7938    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7940    break 2
7941  fi
7942done
7943  done
7944IFS=$as_save_IFS
7945
7946  ;;
7947esac
7948fi
7949FILE=$ac_cv_path_FILE
7950if test -n "$FILE"; then
7951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7952$as_echo "$FILE" >&6; }
7953else
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7955$as_echo "no" >&6; }
7956fi
7957
7958
7959          if test "x$FILE" = x; then
7960            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7961          fi
7962        else
7963          # Otherwise we believe it is a complete path. Use it as it is.
7964          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7965$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7966          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7967$as_echo_n "checking for FILE... " >&6; }
7968          if test ! -x "$tool_specified"; then
7969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7970$as_echo "not found" >&6; }
7971            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7972          fi
7973          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7974$as_echo "$tool_specified" >&6; }
7975        fi
7976      fi
7977    fi
7978
7979  fi
7980
7981
7982
7983  if test "x$FILE" = x; then
7984    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7985  fi
7986
7987
7988
7989
7990
7991  # Publish this variable in the help.
7992
7993
7994  if [ -z "${FIND+x}" ]; then
7995    # The variable is not set by user, try to locate tool using the code snippet
7996    for ac_prog in find
7997do
7998  # Extract the first word of "$ac_prog", so it can be a program name with args.
7999set dummy $ac_prog; ac_word=$2
8000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8001$as_echo_n "checking for $ac_word... " >&6; }
8002if ${ac_cv_path_FIND+:} false; then :
8003  $as_echo_n "(cached) " >&6
8004else
8005  case $FIND in
8006  [\\/]* | ?:[\\/]*)
8007  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8008  ;;
8009  *)
8010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8011for as_dir in $PATH
8012do
8013  IFS=$as_save_IFS
8014  test -z "$as_dir" && as_dir=.
8015    for ac_exec_ext in '' $ac_executable_extensions; do
8016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8017    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8019    break 2
8020  fi
8021done
8022  done
8023IFS=$as_save_IFS
8024
8025  ;;
8026esac
8027fi
8028FIND=$ac_cv_path_FIND
8029if test -n "$FIND"; then
8030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8031$as_echo "$FIND" >&6; }
8032else
8033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8034$as_echo "no" >&6; }
8035fi
8036
8037
8038  test -n "$FIND" && break
8039done
8040
8041  else
8042    # The variable is set, but is it from the command line or the environment?
8043
8044    # Try to remove the string !FIND! from our list.
8045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8047      # If it failed, the variable was not from the command line. Ignore it,
8048      # but warn the user (except for BASH, which is always set by the calling BASH).
8049      if test "xFIND" != xBASH; then
8050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8051$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8052      fi
8053      # Try to locate tool using the code snippet
8054      for ac_prog in find
8055do
8056  # Extract the first word of "$ac_prog", so it can be a program name with args.
8057set dummy $ac_prog; ac_word=$2
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8059$as_echo_n "checking for $ac_word... " >&6; }
8060if ${ac_cv_path_FIND+:} false; then :
8061  $as_echo_n "(cached) " >&6
8062else
8063  case $FIND in
8064  [\\/]* | ?:[\\/]*)
8065  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8066  ;;
8067  *)
8068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8069for as_dir in $PATH
8070do
8071  IFS=$as_save_IFS
8072  test -z "$as_dir" && as_dir=.
8073    for ac_exec_ext in '' $ac_executable_extensions; do
8074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8075    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8077    break 2
8078  fi
8079done
8080  done
8081IFS=$as_save_IFS
8082
8083  ;;
8084esac
8085fi
8086FIND=$ac_cv_path_FIND
8087if test -n "$FIND"; then
8088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8089$as_echo "$FIND" >&6; }
8090else
8091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8092$as_echo "no" >&6; }
8093fi
8094
8095
8096  test -n "$FIND" && break
8097done
8098
8099    else
8100      # If it succeeded, then it was overridden by the user. We will use it
8101      # for the tool.
8102
8103      # First remove it from the list of overridden variables, so we can test
8104      # for unknown variables in the end.
8105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8106
8107      # Check if we try to supply an empty value
8108      if test "x$FIND" = x; then
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8110$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8112$as_echo_n "checking for FIND... " >&6; }
8113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8114$as_echo "disabled" >&6; }
8115      else
8116        # Check if the provided tool contains a complete path.
8117        tool_specified="$FIND"
8118        tool_basename="${tool_specified##*/}"
8119        if test "x$tool_basename" = "x$tool_specified"; then
8120          # A command without a complete path is provided, search $PATH.
8121          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8122$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8123          # Extract the first word of "$tool_basename", so it can be a program name with args.
8124set dummy $tool_basename; ac_word=$2
8125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8126$as_echo_n "checking for $ac_word... " >&6; }
8127if ${ac_cv_path_FIND+:} false; then :
8128  $as_echo_n "(cached) " >&6
8129else
8130  case $FIND in
8131  [\\/]* | ?:[\\/]*)
8132  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8133  ;;
8134  *)
8135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8136for as_dir in $PATH
8137do
8138  IFS=$as_save_IFS
8139  test -z "$as_dir" && as_dir=.
8140    for ac_exec_ext in '' $ac_executable_extensions; do
8141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8142    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8144    break 2
8145  fi
8146done
8147  done
8148IFS=$as_save_IFS
8149
8150  ;;
8151esac
8152fi
8153FIND=$ac_cv_path_FIND
8154if test -n "$FIND"; then
8155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8156$as_echo "$FIND" >&6; }
8157else
8158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8159$as_echo "no" >&6; }
8160fi
8161
8162
8163          if test "x$FIND" = x; then
8164            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8165          fi
8166        else
8167          # Otherwise we believe it is a complete path. Use it as it is.
8168          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8169$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8170          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8171$as_echo_n "checking for FIND... " >&6; }
8172          if test ! -x "$tool_specified"; then
8173            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8174$as_echo "not found" >&6; }
8175            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8176          fi
8177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8178$as_echo "$tool_specified" >&6; }
8179        fi
8180      fi
8181    fi
8182
8183  fi
8184
8185
8186
8187  if test "x$FIND" = x; then
8188    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8189  fi
8190
8191
8192
8193
8194
8195  # Publish this variable in the help.
8196
8197
8198  if [ -z "${HEAD+x}" ]; then
8199    # The variable is not set by user, try to locate tool using the code snippet
8200    for ac_prog in head
8201do
8202  # Extract the first word of "$ac_prog", so it can be a program name with args.
8203set dummy $ac_prog; ac_word=$2
8204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8205$as_echo_n "checking for $ac_word... " >&6; }
8206if ${ac_cv_path_HEAD+:} false; then :
8207  $as_echo_n "(cached) " >&6
8208else
8209  case $HEAD in
8210  [\\/]* | ?:[\\/]*)
8211  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8212  ;;
8213  *)
8214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8215for as_dir in $PATH
8216do
8217  IFS=$as_save_IFS
8218  test -z "$as_dir" && as_dir=.
8219    for ac_exec_ext in '' $ac_executable_extensions; do
8220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8221    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8223    break 2
8224  fi
8225done
8226  done
8227IFS=$as_save_IFS
8228
8229  ;;
8230esac
8231fi
8232HEAD=$ac_cv_path_HEAD
8233if test -n "$HEAD"; then
8234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8235$as_echo "$HEAD" >&6; }
8236else
8237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8238$as_echo "no" >&6; }
8239fi
8240
8241
8242  test -n "$HEAD" && break
8243done
8244
8245  else
8246    # The variable is set, but is it from the command line or the environment?
8247
8248    # Try to remove the string !HEAD! from our list.
8249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8251      # If it failed, the variable was not from the command line. Ignore it,
8252      # but warn the user (except for BASH, which is always set by the calling BASH).
8253      if test "xHEAD" != xBASH; then
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8255$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8256      fi
8257      # Try to locate tool using the code snippet
8258      for ac_prog in head
8259do
8260  # Extract the first word of "$ac_prog", so it can be a program name with args.
8261set dummy $ac_prog; ac_word=$2
8262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8263$as_echo_n "checking for $ac_word... " >&6; }
8264if ${ac_cv_path_HEAD+:} false; then :
8265  $as_echo_n "(cached) " >&6
8266else
8267  case $HEAD in
8268  [\\/]* | ?:[\\/]*)
8269  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8270  ;;
8271  *)
8272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8273for as_dir in $PATH
8274do
8275  IFS=$as_save_IFS
8276  test -z "$as_dir" && as_dir=.
8277    for ac_exec_ext in '' $ac_executable_extensions; do
8278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8279    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8281    break 2
8282  fi
8283done
8284  done
8285IFS=$as_save_IFS
8286
8287  ;;
8288esac
8289fi
8290HEAD=$ac_cv_path_HEAD
8291if test -n "$HEAD"; then
8292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8293$as_echo "$HEAD" >&6; }
8294else
8295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8296$as_echo "no" >&6; }
8297fi
8298
8299
8300  test -n "$HEAD" && break
8301done
8302
8303    else
8304      # If it succeeded, then it was overridden by the user. We will use it
8305      # for the tool.
8306
8307      # First remove it from the list of overridden variables, so we can test
8308      # for unknown variables in the end.
8309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8310
8311      # Check if we try to supply an empty value
8312      if test "x$HEAD" = x; then
8313        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8314$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8315        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8316$as_echo_n "checking for HEAD... " >&6; }
8317        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8318$as_echo "disabled" >&6; }
8319      else
8320        # Check if the provided tool contains a complete path.
8321        tool_specified="$HEAD"
8322        tool_basename="${tool_specified##*/}"
8323        if test "x$tool_basename" = "x$tool_specified"; then
8324          # A command without a complete path is provided, search $PATH.
8325          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8326$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8327          # Extract the first word of "$tool_basename", so it can be a program name with args.
8328set dummy $tool_basename; ac_word=$2
8329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8330$as_echo_n "checking for $ac_word... " >&6; }
8331if ${ac_cv_path_HEAD+:} false; then :
8332  $as_echo_n "(cached) " >&6
8333else
8334  case $HEAD in
8335  [\\/]* | ?:[\\/]*)
8336  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8337  ;;
8338  *)
8339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8340for as_dir in $PATH
8341do
8342  IFS=$as_save_IFS
8343  test -z "$as_dir" && as_dir=.
8344    for ac_exec_ext in '' $ac_executable_extensions; do
8345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8346    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8348    break 2
8349  fi
8350done
8351  done
8352IFS=$as_save_IFS
8353
8354  ;;
8355esac
8356fi
8357HEAD=$ac_cv_path_HEAD
8358if test -n "$HEAD"; then
8359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8360$as_echo "$HEAD" >&6; }
8361else
8362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8363$as_echo "no" >&6; }
8364fi
8365
8366
8367          if test "x$HEAD" = x; then
8368            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8369          fi
8370        else
8371          # Otherwise we believe it is a complete path. Use it as it is.
8372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8373$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8374          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8375$as_echo_n "checking for HEAD... " >&6; }
8376          if test ! -x "$tool_specified"; then
8377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8378$as_echo "not found" >&6; }
8379            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8380          fi
8381          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8382$as_echo "$tool_specified" >&6; }
8383        fi
8384      fi
8385    fi
8386
8387  fi
8388
8389
8390
8391  if test "x$HEAD" = x; then
8392    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8393  fi
8394
8395
8396
8397
8398
8399  # Publish this variable in the help.
8400
8401
8402  if [ -z "${LN+x}" ]; then
8403    # The variable is not set by user, try to locate tool using the code snippet
8404    for ac_prog in ln
8405do
8406  # Extract the first word of "$ac_prog", so it can be a program name with args.
8407set dummy $ac_prog; ac_word=$2
8408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8409$as_echo_n "checking for $ac_word... " >&6; }
8410if ${ac_cv_path_LN+:} false; then :
8411  $as_echo_n "(cached) " >&6
8412else
8413  case $LN in
8414  [\\/]* | ?:[\\/]*)
8415  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8416  ;;
8417  *)
8418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8419for as_dir in $PATH
8420do
8421  IFS=$as_save_IFS
8422  test -z "$as_dir" && as_dir=.
8423    for ac_exec_ext in '' $ac_executable_extensions; do
8424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8425    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8427    break 2
8428  fi
8429done
8430  done
8431IFS=$as_save_IFS
8432
8433  ;;
8434esac
8435fi
8436LN=$ac_cv_path_LN
8437if test -n "$LN"; then
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8439$as_echo "$LN" >&6; }
8440else
8441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8442$as_echo "no" >&6; }
8443fi
8444
8445
8446  test -n "$LN" && break
8447done
8448
8449  else
8450    # The variable is set, but is it from the command line or the environment?
8451
8452    # Try to remove the string !LN! from our list.
8453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8455      # If it failed, the variable was not from the command line. Ignore it,
8456      # but warn the user (except for BASH, which is always set by the calling BASH).
8457      if test "xLN" != xBASH; then
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8459$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8460      fi
8461      # Try to locate tool using the code snippet
8462      for ac_prog in ln
8463do
8464  # Extract the first word of "$ac_prog", so it can be a program name with args.
8465set dummy $ac_prog; ac_word=$2
8466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8467$as_echo_n "checking for $ac_word... " >&6; }
8468if ${ac_cv_path_LN+:} false; then :
8469  $as_echo_n "(cached) " >&6
8470else
8471  case $LN in
8472  [\\/]* | ?:[\\/]*)
8473  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8474  ;;
8475  *)
8476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8477for as_dir in $PATH
8478do
8479  IFS=$as_save_IFS
8480  test -z "$as_dir" && as_dir=.
8481    for ac_exec_ext in '' $ac_executable_extensions; do
8482  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8483    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8484    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8485    break 2
8486  fi
8487done
8488  done
8489IFS=$as_save_IFS
8490
8491  ;;
8492esac
8493fi
8494LN=$ac_cv_path_LN
8495if test -n "$LN"; then
8496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8497$as_echo "$LN" >&6; }
8498else
8499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8500$as_echo "no" >&6; }
8501fi
8502
8503
8504  test -n "$LN" && break
8505done
8506
8507    else
8508      # If it succeeded, then it was overridden by the user. We will use it
8509      # for the tool.
8510
8511      # First remove it from the list of overridden variables, so we can test
8512      # for unknown variables in the end.
8513      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8514
8515      # Check if we try to supply an empty value
8516      if test "x$LN" = x; then
8517        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8518$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8520$as_echo_n "checking for LN... " >&6; }
8521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8522$as_echo "disabled" >&6; }
8523      else
8524        # Check if the provided tool contains a complete path.
8525        tool_specified="$LN"
8526        tool_basename="${tool_specified##*/}"
8527        if test "x$tool_basename" = "x$tool_specified"; then
8528          # A command without a complete path is provided, search $PATH.
8529          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8530$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8531          # Extract the first word of "$tool_basename", so it can be a program name with args.
8532set dummy $tool_basename; ac_word=$2
8533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8534$as_echo_n "checking for $ac_word... " >&6; }
8535if ${ac_cv_path_LN+:} false; then :
8536  $as_echo_n "(cached) " >&6
8537else
8538  case $LN in
8539  [\\/]* | ?:[\\/]*)
8540  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8541  ;;
8542  *)
8543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8544for as_dir in $PATH
8545do
8546  IFS=$as_save_IFS
8547  test -z "$as_dir" && as_dir=.
8548    for ac_exec_ext in '' $ac_executable_extensions; do
8549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8550    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8552    break 2
8553  fi
8554done
8555  done
8556IFS=$as_save_IFS
8557
8558  ;;
8559esac
8560fi
8561LN=$ac_cv_path_LN
8562if test -n "$LN"; then
8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8564$as_echo "$LN" >&6; }
8565else
8566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8567$as_echo "no" >&6; }
8568fi
8569
8570
8571          if test "x$LN" = x; then
8572            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8573          fi
8574        else
8575          # Otherwise we believe it is a complete path. Use it as it is.
8576          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8577$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8578          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8579$as_echo_n "checking for LN... " >&6; }
8580          if test ! -x "$tool_specified"; then
8581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8582$as_echo "not found" >&6; }
8583            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8584          fi
8585          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8586$as_echo "$tool_specified" >&6; }
8587        fi
8588      fi
8589    fi
8590
8591  fi
8592
8593
8594
8595  if test "x$LN" = x; then
8596    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8597  fi
8598
8599
8600
8601
8602
8603  # Publish this variable in the help.
8604
8605
8606  if [ -z "${LS+x}" ]; then
8607    # The variable is not set by user, try to locate tool using the code snippet
8608    for ac_prog in ls
8609do
8610  # Extract the first word of "$ac_prog", so it can be a program name with args.
8611set dummy $ac_prog; ac_word=$2
8612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8613$as_echo_n "checking for $ac_word... " >&6; }
8614if ${ac_cv_path_LS+:} false; then :
8615  $as_echo_n "(cached) " >&6
8616else
8617  case $LS in
8618  [\\/]* | ?:[\\/]*)
8619  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8620  ;;
8621  *)
8622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8623for as_dir in $PATH
8624do
8625  IFS=$as_save_IFS
8626  test -z "$as_dir" && as_dir=.
8627    for ac_exec_ext in '' $ac_executable_extensions; do
8628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8629    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8631    break 2
8632  fi
8633done
8634  done
8635IFS=$as_save_IFS
8636
8637  ;;
8638esac
8639fi
8640LS=$ac_cv_path_LS
8641if test -n "$LS"; then
8642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8643$as_echo "$LS" >&6; }
8644else
8645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8646$as_echo "no" >&6; }
8647fi
8648
8649
8650  test -n "$LS" && break
8651done
8652
8653  else
8654    # The variable is set, but is it from the command line or the environment?
8655
8656    # Try to remove the string !LS! from our list.
8657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8659      # If it failed, the variable was not from the command line. Ignore it,
8660      # but warn the user (except for BASH, which is always set by the calling BASH).
8661      if test "xLS" != xBASH; then
8662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8663$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8664      fi
8665      # Try to locate tool using the code snippet
8666      for ac_prog in ls
8667do
8668  # Extract the first word of "$ac_prog", so it can be a program name with args.
8669set dummy $ac_prog; ac_word=$2
8670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8671$as_echo_n "checking for $ac_word... " >&6; }
8672if ${ac_cv_path_LS+:} false; then :
8673  $as_echo_n "(cached) " >&6
8674else
8675  case $LS in
8676  [\\/]* | ?:[\\/]*)
8677  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8678  ;;
8679  *)
8680  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8681for as_dir in $PATH
8682do
8683  IFS=$as_save_IFS
8684  test -z "$as_dir" && as_dir=.
8685    for ac_exec_ext in '' $ac_executable_extensions; do
8686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8687    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8689    break 2
8690  fi
8691done
8692  done
8693IFS=$as_save_IFS
8694
8695  ;;
8696esac
8697fi
8698LS=$ac_cv_path_LS
8699if test -n "$LS"; then
8700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8701$as_echo "$LS" >&6; }
8702else
8703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8704$as_echo "no" >&6; }
8705fi
8706
8707
8708  test -n "$LS" && break
8709done
8710
8711    else
8712      # If it succeeded, then it was overridden by the user. We will use it
8713      # for the tool.
8714
8715      # First remove it from the list of overridden variables, so we can test
8716      # for unknown variables in the end.
8717      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8718
8719      # Check if we try to supply an empty value
8720      if test "x$LS" = x; then
8721        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8722$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8724$as_echo_n "checking for LS... " >&6; }
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8726$as_echo "disabled" >&6; }
8727      else
8728        # Check if the provided tool contains a complete path.
8729        tool_specified="$LS"
8730        tool_basename="${tool_specified##*/}"
8731        if test "x$tool_basename" = "x$tool_specified"; then
8732          # A command without a complete path is provided, search $PATH.
8733          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8734$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8735          # Extract the first word of "$tool_basename", so it can be a program name with args.
8736set dummy $tool_basename; ac_word=$2
8737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8738$as_echo_n "checking for $ac_word... " >&6; }
8739if ${ac_cv_path_LS+:} false; then :
8740  $as_echo_n "(cached) " >&6
8741else
8742  case $LS in
8743  [\\/]* | ?:[\\/]*)
8744  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8745  ;;
8746  *)
8747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8748for as_dir in $PATH
8749do
8750  IFS=$as_save_IFS
8751  test -z "$as_dir" && as_dir=.
8752    for ac_exec_ext in '' $ac_executable_extensions; do
8753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8754    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8756    break 2
8757  fi
8758done
8759  done
8760IFS=$as_save_IFS
8761
8762  ;;
8763esac
8764fi
8765LS=$ac_cv_path_LS
8766if test -n "$LS"; then
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8768$as_echo "$LS" >&6; }
8769else
8770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8771$as_echo "no" >&6; }
8772fi
8773
8774
8775          if test "x$LS" = x; then
8776            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8777          fi
8778        else
8779          # Otherwise we believe it is a complete path. Use it as it is.
8780          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8781$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8782          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8783$as_echo_n "checking for LS... " >&6; }
8784          if test ! -x "$tool_specified"; then
8785            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8786$as_echo "not found" >&6; }
8787            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8788          fi
8789          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8790$as_echo "$tool_specified" >&6; }
8791        fi
8792      fi
8793    fi
8794
8795  fi
8796
8797
8798
8799  if test "x$LS" = x; then
8800    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8801  fi
8802
8803
8804
8805
8806
8807  # Publish this variable in the help.
8808
8809
8810  if [ -z "${MKDIR+x}" ]; then
8811    # The variable is not set by user, try to locate tool using the code snippet
8812    for ac_prog in mkdir
8813do
8814  # Extract the first word of "$ac_prog", so it can be a program name with args.
8815set dummy $ac_prog; ac_word=$2
8816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8817$as_echo_n "checking for $ac_word... " >&6; }
8818if ${ac_cv_path_MKDIR+:} false; then :
8819  $as_echo_n "(cached) " >&6
8820else
8821  case $MKDIR in
8822  [\\/]* | ?:[\\/]*)
8823  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8824  ;;
8825  *)
8826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8827for as_dir in $PATH
8828do
8829  IFS=$as_save_IFS
8830  test -z "$as_dir" && as_dir=.
8831    for ac_exec_ext in '' $ac_executable_extensions; do
8832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8833    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8835    break 2
8836  fi
8837done
8838  done
8839IFS=$as_save_IFS
8840
8841  ;;
8842esac
8843fi
8844MKDIR=$ac_cv_path_MKDIR
8845if test -n "$MKDIR"; then
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8847$as_echo "$MKDIR" >&6; }
8848else
8849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8850$as_echo "no" >&6; }
8851fi
8852
8853
8854  test -n "$MKDIR" && break
8855done
8856
8857  else
8858    # The variable is set, but is it from the command line or the environment?
8859
8860    # Try to remove the string !MKDIR! from our list.
8861    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8862    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8863      # If it failed, the variable was not from the command line. Ignore it,
8864      # but warn the user (except for BASH, which is always set by the calling BASH).
8865      if test "xMKDIR" != xBASH; then
8866        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8867$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8868      fi
8869      # Try to locate tool using the code snippet
8870      for ac_prog in mkdir
8871do
8872  # Extract the first word of "$ac_prog", so it can be a program name with args.
8873set dummy $ac_prog; ac_word=$2
8874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875$as_echo_n "checking for $ac_word... " >&6; }
8876if ${ac_cv_path_MKDIR+:} false; then :
8877  $as_echo_n "(cached) " >&6
8878else
8879  case $MKDIR in
8880  [\\/]* | ?:[\\/]*)
8881  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8882  ;;
8883  *)
8884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8885for as_dir in $PATH
8886do
8887  IFS=$as_save_IFS
8888  test -z "$as_dir" && as_dir=.
8889    for ac_exec_ext in '' $ac_executable_extensions; do
8890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8891    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8893    break 2
8894  fi
8895done
8896  done
8897IFS=$as_save_IFS
8898
8899  ;;
8900esac
8901fi
8902MKDIR=$ac_cv_path_MKDIR
8903if test -n "$MKDIR"; then
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8905$as_echo "$MKDIR" >&6; }
8906else
8907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908$as_echo "no" >&6; }
8909fi
8910
8911
8912  test -n "$MKDIR" && break
8913done
8914
8915    else
8916      # If it succeeded, then it was overridden by the user. We will use it
8917      # for the tool.
8918
8919      # First remove it from the list of overridden variables, so we can test
8920      # for unknown variables in the end.
8921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8922
8923      # Check if we try to supply an empty value
8924      if test "x$MKDIR" = x; then
8925        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8926$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8928$as_echo_n "checking for MKDIR... " >&6; }
8929        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8930$as_echo "disabled" >&6; }
8931      else
8932        # Check if the provided tool contains a complete path.
8933        tool_specified="$MKDIR"
8934        tool_basename="${tool_specified##*/}"
8935        if test "x$tool_basename" = "x$tool_specified"; then
8936          # A command without a complete path is provided, search $PATH.
8937          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8938$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8939          # Extract the first word of "$tool_basename", so it can be a program name with args.
8940set dummy $tool_basename; ac_word=$2
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8942$as_echo_n "checking for $ac_word... " >&6; }
8943if ${ac_cv_path_MKDIR+:} false; then :
8944  $as_echo_n "(cached) " >&6
8945else
8946  case $MKDIR in
8947  [\\/]* | ?:[\\/]*)
8948  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8949  ;;
8950  *)
8951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8952for as_dir in $PATH
8953do
8954  IFS=$as_save_IFS
8955  test -z "$as_dir" && as_dir=.
8956    for ac_exec_ext in '' $ac_executable_extensions; do
8957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8958    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8960    break 2
8961  fi
8962done
8963  done
8964IFS=$as_save_IFS
8965
8966  ;;
8967esac
8968fi
8969MKDIR=$ac_cv_path_MKDIR
8970if test -n "$MKDIR"; then
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8972$as_echo "$MKDIR" >&6; }
8973else
8974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
8976fi
8977
8978
8979          if test "x$MKDIR" = x; then
8980            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8981          fi
8982        else
8983          # Otherwise we believe it is a complete path. Use it as it is.
8984          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8985$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8986          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8987$as_echo_n "checking for MKDIR... " >&6; }
8988          if test ! -x "$tool_specified"; then
8989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8990$as_echo "not found" >&6; }
8991            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8992          fi
8993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8994$as_echo "$tool_specified" >&6; }
8995        fi
8996      fi
8997    fi
8998
8999  fi
9000
9001
9002
9003  if test "x$MKDIR" = x; then
9004    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9005  fi
9006
9007
9008
9009
9010
9011  # Publish this variable in the help.
9012
9013
9014  if [ -z "${MKTEMP+x}" ]; then
9015    # The variable is not set by user, try to locate tool using the code snippet
9016    for ac_prog in mktemp
9017do
9018  # Extract the first word of "$ac_prog", so it can be a program name with args.
9019set dummy $ac_prog; ac_word=$2
9020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9021$as_echo_n "checking for $ac_word... " >&6; }
9022if ${ac_cv_path_MKTEMP+:} false; then :
9023  $as_echo_n "(cached) " >&6
9024else
9025  case $MKTEMP in
9026  [\\/]* | ?:[\\/]*)
9027  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9028  ;;
9029  *)
9030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9031for as_dir in $PATH
9032do
9033  IFS=$as_save_IFS
9034  test -z "$as_dir" && as_dir=.
9035    for ac_exec_ext in '' $ac_executable_extensions; do
9036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9037    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9039    break 2
9040  fi
9041done
9042  done
9043IFS=$as_save_IFS
9044
9045  ;;
9046esac
9047fi
9048MKTEMP=$ac_cv_path_MKTEMP
9049if test -n "$MKTEMP"; then
9050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9051$as_echo "$MKTEMP" >&6; }
9052else
9053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9054$as_echo "no" >&6; }
9055fi
9056
9057
9058  test -n "$MKTEMP" && break
9059done
9060
9061  else
9062    # The variable is set, but is it from the command line or the environment?
9063
9064    # Try to remove the string !MKTEMP! from our list.
9065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9067      # If it failed, the variable was not from the command line. Ignore it,
9068      # but warn the user (except for BASH, which is always set by the calling BASH).
9069      if test "xMKTEMP" != xBASH; then
9070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9071$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9072      fi
9073      # Try to locate tool using the code snippet
9074      for ac_prog in mktemp
9075do
9076  # Extract the first word of "$ac_prog", so it can be a program name with args.
9077set dummy $ac_prog; ac_word=$2
9078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9079$as_echo_n "checking for $ac_word... " >&6; }
9080if ${ac_cv_path_MKTEMP+:} false; then :
9081  $as_echo_n "(cached) " >&6
9082else
9083  case $MKTEMP in
9084  [\\/]* | ?:[\\/]*)
9085  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9086  ;;
9087  *)
9088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9089for as_dir in $PATH
9090do
9091  IFS=$as_save_IFS
9092  test -z "$as_dir" && as_dir=.
9093    for ac_exec_ext in '' $ac_executable_extensions; do
9094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9095    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9097    break 2
9098  fi
9099done
9100  done
9101IFS=$as_save_IFS
9102
9103  ;;
9104esac
9105fi
9106MKTEMP=$ac_cv_path_MKTEMP
9107if test -n "$MKTEMP"; then
9108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9109$as_echo "$MKTEMP" >&6; }
9110else
9111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9112$as_echo "no" >&6; }
9113fi
9114
9115
9116  test -n "$MKTEMP" && break
9117done
9118
9119    else
9120      # If it succeeded, then it was overridden by the user. We will use it
9121      # for the tool.
9122
9123      # First remove it from the list of overridden variables, so we can test
9124      # for unknown variables in the end.
9125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9126
9127      # Check if we try to supply an empty value
9128      if test "x$MKTEMP" = x; then
9129        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9130$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9131        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9132$as_echo_n "checking for MKTEMP... " >&6; }
9133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9134$as_echo "disabled" >&6; }
9135      else
9136        # Check if the provided tool contains a complete path.
9137        tool_specified="$MKTEMP"
9138        tool_basename="${tool_specified##*/}"
9139        if test "x$tool_basename" = "x$tool_specified"; then
9140          # A command without a complete path is provided, search $PATH.
9141          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9142$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9143          # Extract the first word of "$tool_basename", so it can be a program name with args.
9144set dummy $tool_basename; ac_word=$2
9145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9146$as_echo_n "checking for $ac_word... " >&6; }
9147if ${ac_cv_path_MKTEMP+:} false; then :
9148  $as_echo_n "(cached) " >&6
9149else
9150  case $MKTEMP in
9151  [\\/]* | ?:[\\/]*)
9152  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9153  ;;
9154  *)
9155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9156for as_dir in $PATH
9157do
9158  IFS=$as_save_IFS
9159  test -z "$as_dir" && as_dir=.
9160    for ac_exec_ext in '' $ac_executable_extensions; do
9161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9162    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9164    break 2
9165  fi
9166done
9167  done
9168IFS=$as_save_IFS
9169
9170  ;;
9171esac
9172fi
9173MKTEMP=$ac_cv_path_MKTEMP
9174if test -n "$MKTEMP"; then
9175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9176$as_echo "$MKTEMP" >&6; }
9177else
9178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9179$as_echo "no" >&6; }
9180fi
9181
9182
9183          if test "x$MKTEMP" = x; then
9184            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9185          fi
9186        else
9187          # Otherwise we believe it is a complete path. Use it as it is.
9188          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9189$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9190          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9191$as_echo_n "checking for MKTEMP... " >&6; }
9192          if test ! -x "$tool_specified"; then
9193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9194$as_echo "not found" >&6; }
9195            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9196          fi
9197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9198$as_echo "$tool_specified" >&6; }
9199        fi
9200      fi
9201    fi
9202
9203  fi
9204
9205
9206
9207  if test "x$MKTEMP" = x; then
9208    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9209  fi
9210
9211
9212
9213
9214
9215  # Publish this variable in the help.
9216
9217
9218  if [ -z "${MV+x}" ]; then
9219    # The variable is not set by user, try to locate tool using the code snippet
9220    for ac_prog in mv
9221do
9222  # Extract the first word of "$ac_prog", so it can be a program name with args.
9223set dummy $ac_prog; ac_word=$2
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225$as_echo_n "checking for $ac_word... " >&6; }
9226if ${ac_cv_path_MV+:} false; then :
9227  $as_echo_n "(cached) " >&6
9228else
9229  case $MV in
9230  [\\/]* | ?:[\\/]*)
9231  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9232  ;;
9233  *)
9234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235for as_dir in $PATH
9236do
9237  IFS=$as_save_IFS
9238  test -z "$as_dir" && as_dir=.
9239    for ac_exec_ext in '' $ac_executable_extensions; do
9240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9241    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9243    break 2
9244  fi
9245done
9246  done
9247IFS=$as_save_IFS
9248
9249  ;;
9250esac
9251fi
9252MV=$ac_cv_path_MV
9253if test -n "$MV"; then
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9255$as_echo "$MV" >&6; }
9256else
9257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
9259fi
9260
9261
9262  test -n "$MV" && break
9263done
9264
9265  else
9266    # The variable is set, but is it from the command line or the environment?
9267
9268    # Try to remove the string !MV! from our list.
9269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9271      # If it failed, the variable was not from the command line. Ignore it,
9272      # but warn the user (except for BASH, which is always set by the calling BASH).
9273      if test "xMV" != xBASH; then
9274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9275$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9276      fi
9277      # Try to locate tool using the code snippet
9278      for ac_prog in mv
9279do
9280  # Extract the first word of "$ac_prog", so it can be a program name with args.
9281set dummy $ac_prog; ac_word=$2
9282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9283$as_echo_n "checking for $ac_word... " >&6; }
9284if ${ac_cv_path_MV+:} false; then :
9285  $as_echo_n "(cached) " >&6
9286else
9287  case $MV in
9288  [\\/]* | ?:[\\/]*)
9289  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9290  ;;
9291  *)
9292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9293for as_dir in $PATH
9294do
9295  IFS=$as_save_IFS
9296  test -z "$as_dir" && as_dir=.
9297    for ac_exec_ext in '' $ac_executable_extensions; do
9298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9299    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9301    break 2
9302  fi
9303done
9304  done
9305IFS=$as_save_IFS
9306
9307  ;;
9308esac
9309fi
9310MV=$ac_cv_path_MV
9311if test -n "$MV"; then
9312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9313$as_echo "$MV" >&6; }
9314else
9315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
9317fi
9318
9319
9320  test -n "$MV" && break
9321done
9322
9323    else
9324      # If it succeeded, then it was overridden by the user. We will use it
9325      # for the tool.
9326
9327      # First remove it from the list of overridden variables, so we can test
9328      # for unknown variables in the end.
9329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9330
9331      # Check if we try to supply an empty value
9332      if test "x$MV" = x; then
9333        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9334$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9335        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9336$as_echo_n "checking for MV... " >&6; }
9337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9338$as_echo "disabled" >&6; }
9339      else
9340        # Check if the provided tool contains a complete path.
9341        tool_specified="$MV"
9342        tool_basename="${tool_specified##*/}"
9343        if test "x$tool_basename" = "x$tool_specified"; then
9344          # A command without a complete path is provided, search $PATH.
9345          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9346$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9347          # Extract the first word of "$tool_basename", so it can be a program name with args.
9348set dummy $tool_basename; ac_word=$2
9349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9350$as_echo_n "checking for $ac_word... " >&6; }
9351if ${ac_cv_path_MV+:} false; then :
9352  $as_echo_n "(cached) " >&6
9353else
9354  case $MV in
9355  [\\/]* | ?:[\\/]*)
9356  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9357  ;;
9358  *)
9359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9360for as_dir in $PATH
9361do
9362  IFS=$as_save_IFS
9363  test -z "$as_dir" && as_dir=.
9364    for ac_exec_ext in '' $ac_executable_extensions; do
9365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9366    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9368    break 2
9369  fi
9370done
9371  done
9372IFS=$as_save_IFS
9373
9374  ;;
9375esac
9376fi
9377MV=$ac_cv_path_MV
9378if test -n "$MV"; then
9379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9380$as_echo "$MV" >&6; }
9381else
9382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9383$as_echo "no" >&6; }
9384fi
9385
9386
9387          if test "x$MV" = x; then
9388            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9389          fi
9390        else
9391          # Otherwise we believe it is a complete path. Use it as it is.
9392          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9393$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9394          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9395$as_echo_n "checking for MV... " >&6; }
9396          if test ! -x "$tool_specified"; then
9397            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9398$as_echo "not found" >&6; }
9399            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9400          fi
9401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9402$as_echo "$tool_specified" >&6; }
9403        fi
9404      fi
9405    fi
9406
9407  fi
9408
9409
9410
9411  if test "x$MV" = x; then
9412    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9413  fi
9414
9415
9416
9417
9418
9419  # Publish this variable in the help.
9420
9421
9422  if [ -z "${NAWK+x}" ]; then
9423    # The variable is not set by user, try to locate tool using the code snippet
9424    for ac_prog in nawk gawk awk
9425do
9426  # Extract the first word of "$ac_prog", so it can be a program name with args.
9427set dummy $ac_prog; ac_word=$2
9428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9429$as_echo_n "checking for $ac_word... " >&6; }
9430if ${ac_cv_path_NAWK+:} false; then :
9431  $as_echo_n "(cached) " >&6
9432else
9433  case $NAWK in
9434  [\\/]* | ?:[\\/]*)
9435  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9436  ;;
9437  *)
9438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9439for as_dir in $PATH
9440do
9441  IFS=$as_save_IFS
9442  test -z "$as_dir" && as_dir=.
9443    for ac_exec_ext in '' $ac_executable_extensions; do
9444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9445    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9447    break 2
9448  fi
9449done
9450  done
9451IFS=$as_save_IFS
9452
9453  ;;
9454esac
9455fi
9456NAWK=$ac_cv_path_NAWK
9457if test -n "$NAWK"; then
9458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9459$as_echo "$NAWK" >&6; }
9460else
9461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9462$as_echo "no" >&6; }
9463fi
9464
9465
9466  test -n "$NAWK" && break
9467done
9468
9469  else
9470    # The variable is set, but is it from the command line or the environment?
9471
9472    # Try to remove the string !NAWK! from our list.
9473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9475      # If it failed, the variable was not from the command line. Ignore it,
9476      # but warn the user (except for BASH, which is always set by the calling BASH).
9477      if test "xNAWK" != xBASH; then
9478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9479$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9480      fi
9481      # Try to locate tool using the code snippet
9482      for ac_prog in nawk gawk awk
9483do
9484  # Extract the first word of "$ac_prog", so it can be a program name with args.
9485set dummy $ac_prog; ac_word=$2
9486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9487$as_echo_n "checking for $ac_word... " >&6; }
9488if ${ac_cv_path_NAWK+:} false; then :
9489  $as_echo_n "(cached) " >&6
9490else
9491  case $NAWK in
9492  [\\/]* | ?:[\\/]*)
9493  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9494  ;;
9495  *)
9496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9497for as_dir in $PATH
9498do
9499  IFS=$as_save_IFS
9500  test -z "$as_dir" && as_dir=.
9501    for ac_exec_ext in '' $ac_executable_extensions; do
9502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9503    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9505    break 2
9506  fi
9507done
9508  done
9509IFS=$as_save_IFS
9510
9511  ;;
9512esac
9513fi
9514NAWK=$ac_cv_path_NAWK
9515if test -n "$NAWK"; then
9516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9517$as_echo "$NAWK" >&6; }
9518else
9519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9520$as_echo "no" >&6; }
9521fi
9522
9523
9524  test -n "$NAWK" && break
9525done
9526
9527    else
9528      # If it succeeded, then it was overridden by the user. We will use it
9529      # for the tool.
9530
9531      # First remove it from the list of overridden variables, so we can test
9532      # for unknown variables in the end.
9533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9534
9535      # Check if we try to supply an empty value
9536      if test "x$NAWK" = x; then
9537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9538$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9540$as_echo_n "checking for NAWK... " >&6; }
9541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9542$as_echo "disabled" >&6; }
9543      else
9544        # Check if the provided tool contains a complete path.
9545        tool_specified="$NAWK"
9546        tool_basename="${tool_specified##*/}"
9547        if test "x$tool_basename" = "x$tool_specified"; then
9548          # A command without a complete path is provided, search $PATH.
9549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9550$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9551          # Extract the first word of "$tool_basename", so it can be a program name with args.
9552set dummy $tool_basename; ac_word=$2
9553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9554$as_echo_n "checking for $ac_word... " >&6; }
9555if ${ac_cv_path_NAWK+:} false; then :
9556  $as_echo_n "(cached) " >&6
9557else
9558  case $NAWK in
9559  [\\/]* | ?:[\\/]*)
9560  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9561  ;;
9562  *)
9563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9564for as_dir in $PATH
9565do
9566  IFS=$as_save_IFS
9567  test -z "$as_dir" && as_dir=.
9568    for ac_exec_ext in '' $ac_executable_extensions; do
9569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9570    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9572    break 2
9573  fi
9574done
9575  done
9576IFS=$as_save_IFS
9577
9578  ;;
9579esac
9580fi
9581NAWK=$ac_cv_path_NAWK
9582if test -n "$NAWK"; then
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9584$as_echo "$NAWK" >&6; }
9585else
9586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588fi
9589
9590
9591          if test "x$NAWK" = x; then
9592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9593          fi
9594        else
9595          # Otherwise we believe it is a complete path. Use it as it is.
9596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9597$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9599$as_echo_n "checking for NAWK... " >&6; }
9600          if test ! -x "$tool_specified"; then
9601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9602$as_echo "not found" >&6; }
9603            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9604          fi
9605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9606$as_echo "$tool_specified" >&6; }
9607        fi
9608      fi
9609    fi
9610
9611  fi
9612
9613
9614
9615  if test "x$NAWK" = x; then
9616    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9617  fi
9618
9619
9620
9621
9622
9623  # Publish this variable in the help.
9624
9625
9626  if [ -z "${PRINTF+x}" ]; then
9627    # The variable is not set by user, try to locate tool using the code snippet
9628    for ac_prog in printf
9629do
9630  # Extract the first word of "$ac_prog", so it can be a program name with args.
9631set dummy $ac_prog; ac_word=$2
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9633$as_echo_n "checking for $ac_word... " >&6; }
9634if ${ac_cv_path_PRINTF+:} false; then :
9635  $as_echo_n "(cached) " >&6
9636else
9637  case $PRINTF in
9638  [\\/]* | ?:[\\/]*)
9639  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9640  ;;
9641  *)
9642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9643for as_dir in $PATH
9644do
9645  IFS=$as_save_IFS
9646  test -z "$as_dir" && as_dir=.
9647    for ac_exec_ext in '' $ac_executable_extensions; do
9648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9649    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9651    break 2
9652  fi
9653done
9654  done
9655IFS=$as_save_IFS
9656
9657  ;;
9658esac
9659fi
9660PRINTF=$ac_cv_path_PRINTF
9661if test -n "$PRINTF"; then
9662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9663$as_echo "$PRINTF" >&6; }
9664else
9665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9666$as_echo "no" >&6; }
9667fi
9668
9669
9670  test -n "$PRINTF" && break
9671done
9672
9673  else
9674    # The variable is set, but is it from the command line or the environment?
9675
9676    # Try to remove the string !PRINTF! from our list.
9677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9679      # If it failed, the variable was not from the command line. Ignore it,
9680      # but warn the user (except for BASH, which is always set by the calling BASH).
9681      if test "xPRINTF" != xBASH; then
9682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9683$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9684      fi
9685      # Try to locate tool using the code snippet
9686      for ac_prog in printf
9687do
9688  # Extract the first word of "$ac_prog", so it can be a program name with args.
9689set dummy $ac_prog; ac_word=$2
9690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9691$as_echo_n "checking for $ac_word... " >&6; }
9692if ${ac_cv_path_PRINTF+:} false; then :
9693  $as_echo_n "(cached) " >&6
9694else
9695  case $PRINTF in
9696  [\\/]* | ?:[\\/]*)
9697  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9698  ;;
9699  *)
9700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9701for as_dir in $PATH
9702do
9703  IFS=$as_save_IFS
9704  test -z "$as_dir" && as_dir=.
9705    for ac_exec_ext in '' $ac_executable_extensions; do
9706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9707    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9709    break 2
9710  fi
9711done
9712  done
9713IFS=$as_save_IFS
9714
9715  ;;
9716esac
9717fi
9718PRINTF=$ac_cv_path_PRINTF
9719if test -n "$PRINTF"; then
9720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9721$as_echo "$PRINTF" >&6; }
9722else
9723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
9725fi
9726
9727
9728  test -n "$PRINTF" && break
9729done
9730
9731    else
9732      # If it succeeded, then it was overridden by the user. We will use it
9733      # for the tool.
9734
9735      # First remove it from the list of overridden variables, so we can test
9736      # for unknown variables in the end.
9737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9738
9739      # Check if we try to supply an empty value
9740      if test "x$PRINTF" = x; then
9741        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9742$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9744$as_echo_n "checking for PRINTF... " >&6; }
9745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9746$as_echo "disabled" >&6; }
9747      else
9748        # Check if the provided tool contains a complete path.
9749        tool_specified="$PRINTF"
9750        tool_basename="${tool_specified##*/}"
9751        if test "x$tool_basename" = "x$tool_specified"; then
9752          # A command without a complete path is provided, search $PATH.
9753          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9754$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9755          # Extract the first word of "$tool_basename", so it can be a program name with args.
9756set dummy $tool_basename; ac_word=$2
9757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9758$as_echo_n "checking for $ac_word... " >&6; }
9759if ${ac_cv_path_PRINTF+:} false; then :
9760  $as_echo_n "(cached) " >&6
9761else
9762  case $PRINTF in
9763  [\\/]* | ?:[\\/]*)
9764  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9765  ;;
9766  *)
9767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9768for as_dir in $PATH
9769do
9770  IFS=$as_save_IFS
9771  test -z "$as_dir" && as_dir=.
9772    for ac_exec_ext in '' $ac_executable_extensions; do
9773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9774    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9776    break 2
9777  fi
9778done
9779  done
9780IFS=$as_save_IFS
9781
9782  ;;
9783esac
9784fi
9785PRINTF=$ac_cv_path_PRINTF
9786if test -n "$PRINTF"; then
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9788$as_echo "$PRINTF" >&6; }
9789else
9790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9791$as_echo "no" >&6; }
9792fi
9793
9794
9795          if test "x$PRINTF" = x; then
9796            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9797          fi
9798        else
9799          # Otherwise we believe it is a complete path. Use it as it is.
9800          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9801$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9802          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9803$as_echo_n "checking for PRINTF... " >&6; }
9804          if test ! -x "$tool_specified"; then
9805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9806$as_echo "not found" >&6; }
9807            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9808          fi
9809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9810$as_echo "$tool_specified" >&6; }
9811        fi
9812      fi
9813    fi
9814
9815  fi
9816
9817
9818
9819  if test "x$PRINTF" = x; then
9820    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9821  fi
9822
9823
9824
9825
9826
9827  # Publish this variable in the help.
9828
9829
9830  if [ -z "${RM+x}" ]; then
9831    # The variable is not set by user, try to locate tool using the code snippet
9832    for ac_prog in rm
9833do
9834  # Extract the first word of "$ac_prog", so it can be a program name with args.
9835set dummy $ac_prog; ac_word=$2
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837$as_echo_n "checking for $ac_word... " >&6; }
9838if ${ac_cv_path_RM+:} false; then :
9839  $as_echo_n "(cached) " >&6
9840else
9841  case $RM in
9842  [\\/]* | ?:[\\/]*)
9843  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9844  ;;
9845  *)
9846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9847for as_dir in $PATH
9848do
9849  IFS=$as_save_IFS
9850  test -z "$as_dir" && as_dir=.
9851    for ac_exec_ext in '' $ac_executable_extensions; do
9852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9853    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9855    break 2
9856  fi
9857done
9858  done
9859IFS=$as_save_IFS
9860
9861  ;;
9862esac
9863fi
9864RM=$ac_cv_path_RM
9865if test -n "$RM"; then
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9867$as_echo "$RM" >&6; }
9868else
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
9871fi
9872
9873
9874  test -n "$RM" && break
9875done
9876
9877  else
9878    # The variable is set, but is it from the command line or the environment?
9879
9880    # Try to remove the string !RM! from our list.
9881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9883      # If it failed, the variable was not from the command line. Ignore it,
9884      # but warn the user (except for BASH, which is always set by the calling BASH).
9885      if test "xRM" != xBASH; then
9886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9887$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9888      fi
9889      # Try to locate tool using the code snippet
9890      for ac_prog in rm
9891do
9892  # Extract the first word of "$ac_prog", so it can be a program name with args.
9893set dummy $ac_prog; ac_word=$2
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9895$as_echo_n "checking for $ac_word... " >&6; }
9896if ${ac_cv_path_RM+:} false; then :
9897  $as_echo_n "(cached) " >&6
9898else
9899  case $RM in
9900  [\\/]* | ?:[\\/]*)
9901  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9902  ;;
9903  *)
9904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9905for as_dir in $PATH
9906do
9907  IFS=$as_save_IFS
9908  test -z "$as_dir" && as_dir=.
9909    for ac_exec_ext in '' $ac_executable_extensions; do
9910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9911    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9913    break 2
9914  fi
9915done
9916  done
9917IFS=$as_save_IFS
9918
9919  ;;
9920esac
9921fi
9922RM=$ac_cv_path_RM
9923if test -n "$RM"; then
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9925$as_echo "$RM" >&6; }
9926else
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
9929fi
9930
9931
9932  test -n "$RM" && break
9933done
9934
9935    else
9936      # If it succeeded, then it was overridden by the user. We will use it
9937      # for the tool.
9938
9939      # First remove it from the list of overridden variables, so we can test
9940      # for unknown variables in the end.
9941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9942
9943      # Check if we try to supply an empty value
9944      if test "x$RM" = x; then
9945        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9946$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9948$as_echo_n "checking for RM... " >&6; }
9949        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9950$as_echo "disabled" >&6; }
9951      else
9952        # Check if the provided tool contains a complete path.
9953        tool_specified="$RM"
9954        tool_basename="${tool_specified##*/}"
9955        if test "x$tool_basename" = "x$tool_specified"; then
9956          # A command without a complete path is provided, search $PATH.
9957          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9958$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9959          # Extract the first word of "$tool_basename", so it can be a program name with args.
9960set dummy $tool_basename; ac_word=$2
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9962$as_echo_n "checking for $ac_word... " >&6; }
9963if ${ac_cv_path_RM+:} false; then :
9964  $as_echo_n "(cached) " >&6
9965else
9966  case $RM in
9967  [\\/]* | ?:[\\/]*)
9968  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9969  ;;
9970  *)
9971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9972for as_dir in $PATH
9973do
9974  IFS=$as_save_IFS
9975  test -z "$as_dir" && as_dir=.
9976    for ac_exec_ext in '' $ac_executable_extensions; do
9977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9978    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9980    break 2
9981  fi
9982done
9983  done
9984IFS=$as_save_IFS
9985
9986  ;;
9987esac
9988fi
9989RM=$ac_cv_path_RM
9990if test -n "$RM"; then
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9992$as_echo "$RM" >&6; }
9993else
9994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9995$as_echo "no" >&6; }
9996fi
9997
9998
9999          if test "x$RM" = x; then
10000            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10001          fi
10002        else
10003          # Otherwise we believe it is a complete path. Use it as it is.
10004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10005$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10006          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10007$as_echo_n "checking for RM... " >&6; }
10008          if test ! -x "$tool_specified"; then
10009            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10010$as_echo "not found" >&6; }
10011            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10012          fi
10013          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10014$as_echo "$tool_specified" >&6; }
10015        fi
10016      fi
10017    fi
10018
10019  fi
10020
10021
10022
10023  if test "x$RM" = x; then
10024    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10025  fi
10026
10027
10028
10029
10030
10031  # Publish this variable in the help.
10032
10033
10034  if [ -z "${RMDIR+x}" ]; then
10035    # The variable is not set by user, try to locate tool using the code snippet
10036    for ac_prog in rmdir
10037do
10038  # Extract the first word of "$ac_prog", so it can be a program name with args.
10039set dummy $ac_prog; ac_word=$2
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041$as_echo_n "checking for $ac_word... " >&6; }
10042if ${ac_cv_path_RMDIR+:} false; then :
10043  $as_echo_n "(cached) " >&6
10044else
10045  case $RMDIR in
10046  [\\/]* | ?:[\\/]*)
10047  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10048  ;;
10049  *)
10050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051for as_dir in $PATH
10052do
10053  IFS=$as_save_IFS
10054  test -z "$as_dir" && as_dir=.
10055    for ac_exec_ext in '' $ac_executable_extensions; do
10056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10057    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059    break 2
10060  fi
10061done
10062  done
10063IFS=$as_save_IFS
10064
10065  ;;
10066esac
10067fi
10068RMDIR=$ac_cv_path_RMDIR
10069if test -n "$RMDIR"; then
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10071$as_echo "$RMDIR" >&6; }
10072else
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078  test -n "$RMDIR" && break
10079done
10080
10081  else
10082    # The variable is set, but is it from the command line or the environment?
10083
10084    # Try to remove the string !RMDIR! from our list.
10085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10087      # If it failed, the variable was not from the command line. Ignore it,
10088      # but warn the user (except for BASH, which is always set by the calling BASH).
10089      if test "xRMDIR" != xBASH; then
10090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10091$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10092      fi
10093      # Try to locate tool using the code snippet
10094      for ac_prog in rmdir
10095do
10096  # Extract the first word of "$ac_prog", so it can be a program name with args.
10097set dummy $ac_prog; ac_word=$2
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10099$as_echo_n "checking for $ac_word... " >&6; }
10100if ${ac_cv_path_RMDIR+:} false; then :
10101  $as_echo_n "(cached) " >&6
10102else
10103  case $RMDIR in
10104  [\\/]* | ?:[\\/]*)
10105  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10106  ;;
10107  *)
10108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10109for as_dir in $PATH
10110do
10111  IFS=$as_save_IFS
10112  test -z "$as_dir" && as_dir=.
10113    for ac_exec_ext in '' $ac_executable_extensions; do
10114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10115    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10117    break 2
10118  fi
10119done
10120  done
10121IFS=$as_save_IFS
10122
10123  ;;
10124esac
10125fi
10126RMDIR=$ac_cv_path_RMDIR
10127if test -n "$RMDIR"; then
10128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10129$as_echo "$RMDIR" >&6; }
10130else
10131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
10133fi
10134
10135
10136  test -n "$RMDIR" && break
10137done
10138
10139    else
10140      # If it succeeded, then it was overridden by the user. We will use it
10141      # for the tool.
10142
10143      # First remove it from the list of overridden variables, so we can test
10144      # for unknown variables in the end.
10145      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10146
10147      # Check if we try to supply an empty value
10148      if test "x$RMDIR" = x; then
10149        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10150$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10152$as_echo_n "checking for RMDIR... " >&6; }
10153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10154$as_echo "disabled" >&6; }
10155      else
10156        # Check if the provided tool contains a complete path.
10157        tool_specified="$RMDIR"
10158        tool_basename="${tool_specified##*/}"
10159        if test "x$tool_basename" = "x$tool_specified"; then
10160          # A command without a complete path is provided, search $PATH.
10161          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10162$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10163          # Extract the first word of "$tool_basename", so it can be a program name with args.
10164set dummy $tool_basename; ac_word=$2
10165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10166$as_echo_n "checking for $ac_word... " >&6; }
10167if ${ac_cv_path_RMDIR+:} false; then :
10168  $as_echo_n "(cached) " >&6
10169else
10170  case $RMDIR in
10171  [\\/]* | ?:[\\/]*)
10172  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10173  ;;
10174  *)
10175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10176for as_dir in $PATH
10177do
10178  IFS=$as_save_IFS
10179  test -z "$as_dir" && as_dir=.
10180    for ac_exec_ext in '' $ac_executable_extensions; do
10181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10182    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10184    break 2
10185  fi
10186done
10187  done
10188IFS=$as_save_IFS
10189
10190  ;;
10191esac
10192fi
10193RMDIR=$ac_cv_path_RMDIR
10194if test -n "$RMDIR"; then
10195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10196$as_echo "$RMDIR" >&6; }
10197else
10198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10199$as_echo "no" >&6; }
10200fi
10201
10202
10203          if test "x$RMDIR" = x; then
10204            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10205          fi
10206        else
10207          # Otherwise we believe it is a complete path. Use it as it is.
10208          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10209$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10210          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10211$as_echo_n "checking for RMDIR... " >&6; }
10212          if test ! -x "$tool_specified"; then
10213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10214$as_echo "not found" >&6; }
10215            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10216          fi
10217          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10218$as_echo "$tool_specified" >&6; }
10219        fi
10220      fi
10221    fi
10222
10223  fi
10224
10225
10226
10227  if test "x$RMDIR" = x; then
10228    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10229  fi
10230
10231
10232
10233
10234
10235  # Publish this variable in the help.
10236
10237
10238  if [ -z "${SH+x}" ]; then
10239    # The variable is not set by user, try to locate tool using the code snippet
10240    for ac_prog in sh
10241do
10242  # Extract the first word of "$ac_prog", so it can be a program name with args.
10243set dummy $ac_prog; ac_word=$2
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245$as_echo_n "checking for $ac_word... " >&6; }
10246if ${ac_cv_path_SH+:} false; then :
10247  $as_echo_n "(cached) " >&6
10248else
10249  case $SH in
10250  [\\/]* | ?:[\\/]*)
10251  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10252  ;;
10253  *)
10254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255for as_dir in $PATH
10256do
10257  IFS=$as_save_IFS
10258  test -z "$as_dir" && as_dir=.
10259    for ac_exec_ext in '' $ac_executable_extensions; do
10260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263    break 2
10264  fi
10265done
10266  done
10267IFS=$as_save_IFS
10268
10269  ;;
10270esac
10271fi
10272SH=$ac_cv_path_SH
10273if test -n "$SH"; then
10274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10275$as_echo "$SH" >&6; }
10276else
10277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278$as_echo "no" >&6; }
10279fi
10280
10281
10282  test -n "$SH" && break
10283done
10284
10285  else
10286    # The variable is set, but is it from the command line or the environment?
10287
10288    # Try to remove the string !SH! from our list.
10289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10291      # If it failed, the variable was not from the command line. Ignore it,
10292      # but warn the user (except for BASH, which is always set by the calling BASH).
10293      if test "xSH" != xBASH; then
10294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10295$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10296      fi
10297      # Try to locate tool using the code snippet
10298      for ac_prog in sh
10299do
10300  # Extract the first word of "$ac_prog", so it can be a program name with args.
10301set dummy $ac_prog; ac_word=$2
10302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10303$as_echo_n "checking for $ac_word... " >&6; }
10304if ${ac_cv_path_SH+:} false; then :
10305  $as_echo_n "(cached) " >&6
10306else
10307  case $SH in
10308  [\\/]* | ?:[\\/]*)
10309  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10310  ;;
10311  *)
10312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10313for as_dir in $PATH
10314do
10315  IFS=$as_save_IFS
10316  test -z "$as_dir" && as_dir=.
10317    for ac_exec_ext in '' $ac_executable_extensions; do
10318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10319    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10321    break 2
10322  fi
10323done
10324  done
10325IFS=$as_save_IFS
10326
10327  ;;
10328esac
10329fi
10330SH=$ac_cv_path_SH
10331if test -n "$SH"; then
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10333$as_echo "$SH" >&6; }
10334else
10335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10336$as_echo "no" >&6; }
10337fi
10338
10339
10340  test -n "$SH" && break
10341done
10342
10343    else
10344      # If it succeeded, then it was overridden by the user. We will use it
10345      # for the tool.
10346
10347      # First remove it from the list of overridden variables, so we can test
10348      # for unknown variables in the end.
10349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10350
10351      # Check if we try to supply an empty value
10352      if test "x$SH" = x; then
10353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10354$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10356$as_echo_n "checking for SH... " >&6; }
10357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10358$as_echo "disabled" >&6; }
10359      else
10360        # Check if the provided tool contains a complete path.
10361        tool_specified="$SH"
10362        tool_basename="${tool_specified##*/}"
10363        if test "x$tool_basename" = "x$tool_specified"; then
10364          # A command without a complete path is provided, search $PATH.
10365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10366$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10367          # Extract the first word of "$tool_basename", so it can be a program name with args.
10368set dummy $tool_basename; ac_word=$2
10369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10370$as_echo_n "checking for $ac_word... " >&6; }
10371if ${ac_cv_path_SH+:} false; then :
10372  $as_echo_n "(cached) " >&6
10373else
10374  case $SH in
10375  [\\/]* | ?:[\\/]*)
10376  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10377  ;;
10378  *)
10379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10380for as_dir in $PATH
10381do
10382  IFS=$as_save_IFS
10383  test -z "$as_dir" && as_dir=.
10384    for ac_exec_ext in '' $ac_executable_extensions; do
10385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10386    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10388    break 2
10389  fi
10390done
10391  done
10392IFS=$as_save_IFS
10393
10394  ;;
10395esac
10396fi
10397SH=$ac_cv_path_SH
10398if test -n "$SH"; then
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10400$as_echo "$SH" >&6; }
10401else
10402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10403$as_echo "no" >&6; }
10404fi
10405
10406
10407          if test "x$SH" = x; then
10408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10409          fi
10410        else
10411          # Otherwise we believe it is a complete path. Use it as it is.
10412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10413$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10415$as_echo_n "checking for SH... " >&6; }
10416          if test ! -x "$tool_specified"; then
10417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10418$as_echo "not found" >&6; }
10419            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10420          fi
10421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10422$as_echo "$tool_specified" >&6; }
10423        fi
10424      fi
10425    fi
10426
10427  fi
10428
10429
10430
10431  if test "x$SH" = x; then
10432    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10433  fi
10434
10435
10436
10437
10438
10439  # Publish this variable in the help.
10440
10441
10442  if [ -z "${SORT+x}" ]; then
10443    # The variable is not set by user, try to locate tool using the code snippet
10444    for ac_prog in sort
10445do
10446  # Extract the first word of "$ac_prog", so it can be a program name with args.
10447set dummy $ac_prog; ac_word=$2
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10449$as_echo_n "checking for $ac_word... " >&6; }
10450if ${ac_cv_path_SORT+:} false; then :
10451  $as_echo_n "(cached) " >&6
10452else
10453  case $SORT in
10454  [\\/]* | ?:[\\/]*)
10455  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10456  ;;
10457  *)
10458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10459for as_dir in $PATH
10460do
10461  IFS=$as_save_IFS
10462  test -z "$as_dir" && as_dir=.
10463    for ac_exec_ext in '' $ac_executable_extensions; do
10464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10465    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10467    break 2
10468  fi
10469done
10470  done
10471IFS=$as_save_IFS
10472
10473  ;;
10474esac
10475fi
10476SORT=$ac_cv_path_SORT
10477if test -n "$SORT"; then
10478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10479$as_echo "$SORT" >&6; }
10480else
10481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
10483fi
10484
10485
10486  test -n "$SORT" && break
10487done
10488
10489  else
10490    # The variable is set, but is it from the command line or the environment?
10491
10492    # Try to remove the string !SORT! from our list.
10493    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10494    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10495      # If it failed, the variable was not from the command line. Ignore it,
10496      # but warn the user (except for BASH, which is always set by the calling BASH).
10497      if test "xSORT" != xBASH; then
10498        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10499$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10500      fi
10501      # Try to locate tool using the code snippet
10502      for ac_prog in sort
10503do
10504  # Extract the first word of "$ac_prog", so it can be a program name with args.
10505set dummy $ac_prog; ac_word=$2
10506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10507$as_echo_n "checking for $ac_word... " >&6; }
10508if ${ac_cv_path_SORT+:} false; then :
10509  $as_echo_n "(cached) " >&6
10510else
10511  case $SORT in
10512  [\\/]* | ?:[\\/]*)
10513  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10514  ;;
10515  *)
10516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10517for as_dir in $PATH
10518do
10519  IFS=$as_save_IFS
10520  test -z "$as_dir" && as_dir=.
10521    for ac_exec_ext in '' $ac_executable_extensions; do
10522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10523    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10525    break 2
10526  fi
10527done
10528  done
10529IFS=$as_save_IFS
10530
10531  ;;
10532esac
10533fi
10534SORT=$ac_cv_path_SORT
10535if test -n "$SORT"; then
10536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10537$as_echo "$SORT" >&6; }
10538else
10539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
10541fi
10542
10543
10544  test -n "$SORT" && break
10545done
10546
10547    else
10548      # If it succeeded, then it was overridden by the user. We will use it
10549      # for the tool.
10550
10551      # First remove it from the list of overridden variables, so we can test
10552      # for unknown variables in the end.
10553      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10554
10555      # Check if we try to supply an empty value
10556      if test "x$SORT" = x; then
10557        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10558$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10559        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10560$as_echo_n "checking for SORT... " >&6; }
10561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10562$as_echo "disabled" >&6; }
10563      else
10564        # Check if the provided tool contains a complete path.
10565        tool_specified="$SORT"
10566        tool_basename="${tool_specified##*/}"
10567        if test "x$tool_basename" = "x$tool_specified"; then
10568          # A command without a complete path is provided, search $PATH.
10569          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10570$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10571          # Extract the first word of "$tool_basename", so it can be a program name with args.
10572set dummy $tool_basename; ac_word=$2
10573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10574$as_echo_n "checking for $ac_word... " >&6; }
10575if ${ac_cv_path_SORT+:} false; then :
10576  $as_echo_n "(cached) " >&6
10577else
10578  case $SORT in
10579  [\\/]* | ?:[\\/]*)
10580  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10581  ;;
10582  *)
10583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10584for as_dir in $PATH
10585do
10586  IFS=$as_save_IFS
10587  test -z "$as_dir" && as_dir=.
10588    for ac_exec_ext in '' $ac_executable_extensions; do
10589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10590    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10592    break 2
10593  fi
10594done
10595  done
10596IFS=$as_save_IFS
10597
10598  ;;
10599esac
10600fi
10601SORT=$ac_cv_path_SORT
10602if test -n "$SORT"; then
10603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10604$as_echo "$SORT" >&6; }
10605else
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10607$as_echo "no" >&6; }
10608fi
10609
10610
10611          if test "x$SORT" = x; then
10612            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10613          fi
10614        else
10615          # Otherwise we believe it is a complete path. Use it as it is.
10616          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10617$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10618          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10619$as_echo_n "checking for SORT... " >&6; }
10620          if test ! -x "$tool_specified"; then
10621            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10622$as_echo "not found" >&6; }
10623            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10624          fi
10625          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10626$as_echo "$tool_specified" >&6; }
10627        fi
10628      fi
10629    fi
10630
10631  fi
10632
10633
10634
10635  if test "x$SORT" = x; then
10636    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10637  fi
10638
10639
10640
10641
10642
10643  # Publish this variable in the help.
10644
10645
10646  if [ -z "${TAIL+x}" ]; then
10647    # The variable is not set by user, try to locate tool using the code snippet
10648    for ac_prog in tail
10649do
10650  # Extract the first word of "$ac_prog", so it can be a program name with args.
10651set dummy $ac_prog; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_TAIL+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $TAIL in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680TAIL=$ac_cv_path_TAIL
10681if test -n "$TAIL"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10683$as_echo "$TAIL" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689
10690  test -n "$TAIL" && break
10691done
10692
10693  else
10694    # The variable is set, but is it from the command line or the environment?
10695
10696    # Try to remove the string !TAIL! from our list.
10697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10699      # If it failed, the variable was not from the command line. Ignore it,
10700      # but warn the user (except for BASH, which is always set by the calling BASH).
10701      if test "xTAIL" != xBASH; then
10702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10703$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10704      fi
10705      # Try to locate tool using the code snippet
10706      for ac_prog in tail
10707do
10708  # Extract the first word of "$ac_prog", so it can be a program name with args.
10709set dummy $ac_prog; ac_word=$2
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10711$as_echo_n "checking for $ac_word... " >&6; }
10712if ${ac_cv_path_TAIL+:} false; then :
10713  $as_echo_n "(cached) " >&6
10714else
10715  case $TAIL in
10716  [\\/]* | ?:[\\/]*)
10717  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10718  ;;
10719  *)
10720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10721for as_dir in $PATH
10722do
10723  IFS=$as_save_IFS
10724  test -z "$as_dir" && as_dir=.
10725    for ac_exec_ext in '' $ac_executable_extensions; do
10726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10727    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10729    break 2
10730  fi
10731done
10732  done
10733IFS=$as_save_IFS
10734
10735  ;;
10736esac
10737fi
10738TAIL=$ac_cv_path_TAIL
10739if test -n "$TAIL"; then
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10741$as_echo "$TAIL" >&6; }
10742else
10743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744$as_echo "no" >&6; }
10745fi
10746
10747
10748  test -n "$TAIL" && break
10749done
10750
10751    else
10752      # If it succeeded, then it was overridden by the user. We will use it
10753      # for the tool.
10754
10755      # First remove it from the list of overridden variables, so we can test
10756      # for unknown variables in the end.
10757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10758
10759      # Check if we try to supply an empty value
10760      if test "x$TAIL" = x; then
10761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10762$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10764$as_echo_n "checking for TAIL... " >&6; }
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10766$as_echo "disabled" >&6; }
10767      else
10768        # Check if the provided tool contains a complete path.
10769        tool_specified="$TAIL"
10770        tool_basename="${tool_specified##*/}"
10771        if test "x$tool_basename" = "x$tool_specified"; then
10772          # A command without a complete path is provided, search $PATH.
10773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10774$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10775          # Extract the first word of "$tool_basename", so it can be a program name with args.
10776set dummy $tool_basename; ac_word=$2
10777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10778$as_echo_n "checking for $ac_word... " >&6; }
10779if ${ac_cv_path_TAIL+:} false; then :
10780  $as_echo_n "(cached) " >&6
10781else
10782  case $TAIL in
10783  [\\/]* | ?:[\\/]*)
10784  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10785  ;;
10786  *)
10787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10788for as_dir in $PATH
10789do
10790  IFS=$as_save_IFS
10791  test -z "$as_dir" && as_dir=.
10792    for ac_exec_ext in '' $ac_executable_extensions; do
10793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10794    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10796    break 2
10797  fi
10798done
10799  done
10800IFS=$as_save_IFS
10801
10802  ;;
10803esac
10804fi
10805TAIL=$ac_cv_path_TAIL
10806if test -n "$TAIL"; then
10807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10808$as_echo "$TAIL" >&6; }
10809else
10810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10811$as_echo "no" >&6; }
10812fi
10813
10814
10815          if test "x$TAIL" = x; then
10816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10817          fi
10818        else
10819          # Otherwise we believe it is a complete path. Use it as it is.
10820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10821$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10823$as_echo_n "checking for TAIL... " >&6; }
10824          if test ! -x "$tool_specified"; then
10825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10826$as_echo "not found" >&6; }
10827            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10828          fi
10829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10830$as_echo "$tool_specified" >&6; }
10831        fi
10832      fi
10833    fi
10834
10835  fi
10836
10837
10838
10839  if test "x$TAIL" = x; then
10840    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10841  fi
10842
10843
10844
10845
10846
10847  # Publish this variable in the help.
10848
10849
10850  if [ -z "${TAR+x}" ]; then
10851    # The variable is not set by user, try to locate tool using the code snippet
10852    for ac_prog in tar
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_TAR+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $TAR in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884TAR=$ac_cv_path_TAR
10885if test -n "$TAR"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10887$as_echo "$TAR" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894  test -n "$TAR" && break
10895done
10896
10897  else
10898    # The variable is set, but is it from the command line or the environment?
10899
10900    # Try to remove the string !TAR! from our list.
10901    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10902    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10903      # If it failed, the variable was not from the command line. Ignore it,
10904      # but warn the user (except for BASH, which is always set by the calling BASH).
10905      if test "xTAR" != xBASH; then
10906        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10907$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10908      fi
10909      # Try to locate tool using the code snippet
10910      for ac_prog in tar
10911do
10912  # Extract the first word of "$ac_prog", so it can be a program name with args.
10913set dummy $ac_prog; ac_word=$2
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10915$as_echo_n "checking for $ac_word... " >&6; }
10916if ${ac_cv_path_TAR+:} false; then :
10917  $as_echo_n "(cached) " >&6
10918else
10919  case $TAR in
10920  [\\/]* | ?:[\\/]*)
10921  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10922  ;;
10923  *)
10924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10925for as_dir in $PATH
10926do
10927  IFS=$as_save_IFS
10928  test -z "$as_dir" && as_dir=.
10929    for ac_exec_ext in '' $ac_executable_extensions; do
10930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10931    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10933    break 2
10934  fi
10935done
10936  done
10937IFS=$as_save_IFS
10938
10939  ;;
10940esac
10941fi
10942TAR=$ac_cv_path_TAR
10943if test -n "$TAR"; then
10944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10945$as_echo "$TAR" >&6; }
10946else
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
10949fi
10950
10951
10952  test -n "$TAR" && break
10953done
10954
10955    else
10956      # If it succeeded, then it was overridden by the user. We will use it
10957      # for the tool.
10958
10959      # First remove it from the list of overridden variables, so we can test
10960      # for unknown variables in the end.
10961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10962
10963      # Check if we try to supply an empty value
10964      if test "x$TAR" = x; then
10965        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10966$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10968$as_echo_n "checking for TAR... " >&6; }
10969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10970$as_echo "disabled" >&6; }
10971      else
10972        # Check if the provided tool contains a complete path.
10973        tool_specified="$TAR"
10974        tool_basename="${tool_specified##*/}"
10975        if test "x$tool_basename" = "x$tool_specified"; then
10976          # A command without a complete path is provided, search $PATH.
10977          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10978$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10979          # Extract the first word of "$tool_basename", so it can be a program name with args.
10980set dummy $tool_basename; ac_word=$2
10981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10982$as_echo_n "checking for $ac_word... " >&6; }
10983if ${ac_cv_path_TAR+:} false; then :
10984  $as_echo_n "(cached) " >&6
10985else
10986  case $TAR in
10987  [\\/]* | ?:[\\/]*)
10988  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10989  ;;
10990  *)
10991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10992for as_dir in $PATH
10993do
10994  IFS=$as_save_IFS
10995  test -z "$as_dir" && as_dir=.
10996    for ac_exec_ext in '' $ac_executable_extensions; do
10997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10998    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11000    break 2
11001  fi
11002done
11003  done
11004IFS=$as_save_IFS
11005
11006  ;;
11007esac
11008fi
11009TAR=$ac_cv_path_TAR
11010if test -n "$TAR"; then
11011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11012$as_echo "$TAR" >&6; }
11013else
11014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
11016fi
11017
11018
11019          if test "x$TAR" = x; then
11020            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11021          fi
11022        else
11023          # Otherwise we believe it is a complete path. Use it as it is.
11024          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11025$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11026          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11027$as_echo_n "checking for TAR... " >&6; }
11028          if test ! -x "$tool_specified"; then
11029            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11030$as_echo "not found" >&6; }
11031            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11032          fi
11033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11034$as_echo "$tool_specified" >&6; }
11035        fi
11036      fi
11037    fi
11038
11039  fi
11040
11041
11042
11043  if test "x$TAR" = x; then
11044    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11045  fi
11046
11047
11048
11049
11050
11051  # Publish this variable in the help.
11052
11053
11054  if [ -z "${TEE+x}" ]; then
11055    # The variable is not set by user, try to locate tool using the code snippet
11056    for ac_prog in tee
11057do
11058  # Extract the first word of "$ac_prog", so it can be a program name with args.
11059set dummy $ac_prog; ac_word=$2
11060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11061$as_echo_n "checking for $ac_word... " >&6; }
11062if ${ac_cv_path_TEE+:} false; then :
11063  $as_echo_n "(cached) " >&6
11064else
11065  case $TEE in
11066  [\\/]* | ?:[\\/]*)
11067  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11068  ;;
11069  *)
11070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11071for as_dir in $PATH
11072do
11073  IFS=$as_save_IFS
11074  test -z "$as_dir" && as_dir=.
11075    for ac_exec_ext in '' $ac_executable_extensions; do
11076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11077    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11079    break 2
11080  fi
11081done
11082  done
11083IFS=$as_save_IFS
11084
11085  ;;
11086esac
11087fi
11088TEE=$ac_cv_path_TEE
11089if test -n "$TEE"; then
11090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11091$as_echo "$TEE" >&6; }
11092else
11093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11094$as_echo "no" >&6; }
11095fi
11096
11097
11098  test -n "$TEE" && break
11099done
11100
11101  else
11102    # The variable is set, but is it from the command line or the environment?
11103
11104    # Try to remove the string !TEE! from our list.
11105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11107      # If it failed, the variable was not from the command line. Ignore it,
11108      # but warn the user (except for BASH, which is always set by the calling BASH).
11109      if test "xTEE" != xBASH; then
11110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11111$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11112      fi
11113      # Try to locate tool using the code snippet
11114      for ac_prog in tee
11115do
11116  # Extract the first word of "$ac_prog", so it can be a program name with args.
11117set dummy $ac_prog; ac_word=$2
11118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11119$as_echo_n "checking for $ac_word... " >&6; }
11120if ${ac_cv_path_TEE+:} false; then :
11121  $as_echo_n "(cached) " >&6
11122else
11123  case $TEE in
11124  [\\/]* | ?:[\\/]*)
11125  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11126  ;;
11127  *)
11128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11129for as_dir in $PATH
11130do
11131  IFS=$as_save_IFS
11132  test -z "$as_dir" && as_dir=.
11133    for ac_exec_ext in '' $ac_executable_extensions; do
11134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11135    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11137    break 2
11138  fi
11139done
11140  done
11141IFS=$as_save_IFS
11142
11143  ;;
11144esac
11145fi
11146TEE=$ac_cv_path_TEE
11147if test -n "$TEE"; then
11148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11149$as_echo "$TEE" >&6; }
11150else
11151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
11153fi
11154
11155
11156  test -n "$TEE" && break
11157done
11158
11159    else
11160      # If it succeeded, then it was overridden by the user. We will use it
11161      # for the tool.
11162
11163      # First remove it from the list of overridden variables, so we can test
11164      # for unknown variables in the end.
11165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11166
11167      # Check if we try to supply an empty value
11168      if test "x$TEE" = x; then
11169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11170$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11172$as_echo_n "checking for TEE... " >&6; }
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11174$as_echo "disabled" >&6; }
11175      else
11176        # Check if the provided tool contains a complete path.
11177        tool_specified="$TEE"
11178        tool_basename="${tool_specified##*/}"
11179        if test "x$tool_basename" = "x$tool_specified"; then
11180          # A command without a complete path is provided, search $PATH.
11181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11182$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11183          # Extract the first word of "$tool_basename", so it can be a program name with args.
11184set dummy $tool_basename; ac_word=$2
11185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11186$as_echo_n "checking for $ac_word... " >&6; }
11187if ${ac_cv_path_TEE+:} false; then :
11188  $as_echo_n "(cached) " >&6
11189else
11190  case $TEE in
11191  [\\/]* | ?:[\\/]*)
11192  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11193  ;;
11194  *)
11195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11196for as_dir in $PATH
11197do
11198  IFS=$as_save_IFS
11199  test -z "$as_dir" && as_dir=.
11200    for ac_exec_ext in '' $ac_executable_extensions; do
11201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11202    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11204    break 2
11205  fi
11206done
11207  done
11208IFS=$as_save_IFS
11209
11210  ;;
11211esac
11212fi
11213TEE=$ac_cv_path_TEE
11214if test -n "$TEE"; then
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11216$as_echo "$TEE" >&6; }
11217else
11218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220fi
11221
11222
11223          if test "x$TEE" = x; then
11224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11225          fi
11226        else
11227          # Otherwise we believe it is a complete path. Use it as it is.
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11229$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11231$as_echo_n "checking for TEE... " >&6; }
11232          if test ! -x "$tool_specified"; then
11233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11234$as_echo "not found" >&6; }
11235            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11236          fi
11237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11238$as_echo "$tool_specified" >&6; }
11239        fi
11240      fi
11241    fi
11242
11243  fi
11244
11245
11246
11247  if test "x$TEE" = x; then
11248    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11249  fi
11250
11251
11252
11253
11254
11255  # Publish this variable in the help.
11256
11257
11258  if [ -z "${TOUCH+x}" ]; then
11259    # The variable is not set by user, try to locate tool using the code snippet
11260    for ac_prog in touch
11261do
11262  # Extract the first word of "$ac_prog", so it can be a program name with args.
11263set dummy $ac_prog; ac_word=$2
11264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11265$as_echo_n "checking for $ac_word... " >&6; }
11266if ${ac_cv_path_TOUCH+:} false; then :
11267  $as_echo_n "(cached) " >&6
11268else
11269  case $TOUCH in
11270  [\\/]* | ?:[\\/]*)
11271  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11272  ;;
11273  *)
11274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11275for as_dir in $PATH
11276do
11277  IFS=$as_save_IFS
11278  test -z "$as_dir" && as_dir=.
11279    for ac_exec_ext in '' $ac_executable_extensions; do
11280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11281    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11283    break 2
11284  fi
11285done
11286  done
11287IFS=$as_save_IFS
11288
11289  ;;
11290esac
11291fi
11292TOUCH=$ac_cv_path_TOUCH
11293if test -n "$TOUCH"; then
11294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11295$as_echo "$TOUCH" >&6; }
11296else
11297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299fi
11300
11301
11302  test -n "$TOUCH" && break
11303done
11304
11305  else
11306    # The variable is set, but is it from the command line or the environment?
11307
11308    # Try to remove the string !TOUCH! from our list.
11309    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11310    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11311      # If it failed, the variable was not from the command line. Ignore it,
11312      # but warn the user (except for BASH, which is always set by the calling BASH).
11313      if test "xTOUCH" != xBASH; then
11314        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11315$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11316      fi
11317      # Try to locate tool using the code snippet
11318      for ac_prog in touch
11319do
11320  # Extract the first word of "$ac_prog", so it can be a program name with args.
11321set dummy $ac_prog; ac_word=$2
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11323$as_echo_n "checking for $ac_word... " >&6; }
11324if ${ac_cv_path_TOUCH+:} false; then :
11325  $as_echo_n "(cached) " >&6
11326else
11327  case $TOUCH in
11328  [\\/]* | ?:[\\/]*)
11329  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11330  ;;
11331  *)
11332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11333for as_dir in $PATH
11334do
11335  IFS=$as_save_IFS
11336  test -z "$as_dir" && as_dir=.
11337    for ac_exec_ext in '' $ac_executable_extensions; do
11338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11339    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11341    break 2
11342  fi
11343done
11344  done
11345IFS=$as_save_IFS
11346
11347  ;;
11348esac
11349fi
11350TOUCH=$ac_cv_path_TOUCH
11351if test -n "$TOUCH"; then
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11353$as_echo "$TOUCH" >&6; }
11354else
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
11357fi
11358
11359
11360  test -n "$TOUCH" && break
11361done
11362
11363    else
11364      # If it succeeded, then it was overridden by the user. We will use it
11365      # for the tool.
11366
11367      # First remove it from the list of overridden variables, so we can test
11368      # for unknown variables in the end.
11369      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11370
11371      # Check if we try to supply an empty value
11372      if test "x$TOUCH" = x; then
11373        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11374$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11375        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11376$as_echo_n "checking for TOUCH... " >&6; }
11377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11378$as_echo "disabled" >&6; }
11379      else
11380        # Check if the provided tool contains a complete path.
11381        tool_specified="$TOUCH"
11382        tool_basename="${tool_specified##*/}"
11383        if test "x$tool_basename" = "x$tool_specified"; then
11384          # A command without a complete path is provided, search $PATH.
11385          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11386$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11387          # Extract the first word of "$tool_basename", so it can be a program name with args.
11388set dummy $tool_basename; ac_word=$2
11389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11390$as_echo_n "checking for $ac_word... " >&6; }
11391if ${ac_cv_path_TOUCH+:} false; then :
11392  $as_echo_n "(cached) " >&6
11393else
11394  case $TOUCH in
11395  [\\/]* | ?:[\\/]*)
11396  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11397  ;;
11398  *)
11399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11400for as_dir in $PATH
11401do
11402  IFS=$as_save_IFS
11403  test -z "$as_dir" && as_dir=.
11404    for ac_exec_ext in '' $ac_executable_extensions; do
11405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11406    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11408    break 2
11409  fi
11410done
11411  done
11412IFS=$as_save_IFS
11413
11414  ;;
11415esac
11416fi
11417TOUCH=$ac_cv_path_TOUCH
11418if test -n "$TOUCH"; then
11419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11420$as_echo "$TOUCH" >&6; }
11421else
11422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11423$as_echo "no" >&6; }
11424fi
11425
11426
11427          if test "x$TOUCH" = x; then
11428            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11429          fi
11430        else
11431          # Otherwise we believe it is a complete path. Use it as it is.
11432          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11433$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11434          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11435$as_echo_n "checking for TOUCH... " >&6; }
11436          if test ! -x "$tool_specified"; then
11437            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11438$as_echo "not found" >&6; }
11439            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11440          fi
11441          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11442$as_echo "$tool_specified" >&6; }
11443        fi
11444      fi
11445    fi
11446
11447  fi
11448
11449
11450
11451  if test "x$TOUCH" = x; then
11452    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11453  fi
11454
11455
11456
11457
11458
11459  # Publish this variable in the help.
11460
11461
11462  if [ -z "${TR+x}" ]; then
11463    # The variable is not set by user, try to locate tool using the code snippet
11464    for ac_prog in tr
11465do
11466  # Extract the first word of "$ac_prog", so it can be a program name with args.
11467set dummy $ac_prog; ac_word=$2
11468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11469$as_echo_n "checking for $ac_word... " >&6; }
11470if ${ac_cv_path_TR+:} false; then :
11471  $as_echo_n "(cached) " >&6
11472else
11473  case $TR in
11474  [\\/]* | ?:[\\/]*)
11475  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11476  ;;
11477  *)
11478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11479for as_dir in $PATH
11480do
11481  IFS=$as_save_IFS
11482  test -z "$as_dir" && as_dir=.
11483    for ac_exec_ext in '' $ac_executable_extensions; do
11484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11485    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11487    break 2
11488  fi
11489done
11490  done
11491IFS=$as_save_IFS
11492
11493  ;;
11494esac
11495fi
11496TR=$ac_cv_path_TR
11497if test -n "$TR"; then
11498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11499$as_echo "$TR" >&6; }
11500else
11501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11502$as_echo "no" >&6; }
11503fi
11504
11505
11506  test -n "$TR" && break
11507done
11508
11509  else
11510    # The variable is set, but is it from the command line or the environment?
11511
11512    # Try to remove the string !TR! from our list.
11513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11515      # If it failed, the variable was not from the command line. Ignore it,
11516      # but warn the user (except for BASH, which is always set by the calling BASH).
11517      if test "xTR" != xBASH; then
11518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11519$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11520      fi
11521      # Try to locate tool using the code snippet
11522      for ac_prog in tr
11523do
11524  # Extract the first word of "$ac_prog", so it can be a program name with args.
11525set dummy $ac_prog; ac_word=$2
11526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11527$as_echo_n "checking for $ac_word... " >&6; }
11528if ${ac_cv_path_TR+:} false; then :
11529  $as_echo_n "(cached) " >&6
11530else
11531  case $TR in
11532  [\\/]* | ?:[\\/]*)
11533  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11534  ;;
11535  *)
11536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11537for as_dir in $PATH
11538do
11539  IFS=$as_save_IFS
11540  test -z "$as_dir" && as_dir=.
11541    for ac_exec_ext in '' $ac_executable_extensions; do
11542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11543    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11545    break 2
11546  fi
11547done
11548  done
11549IFS=$as_save_IFS
11550
11551  ;;
11552esac
11553fi
11554TR=$ac_cv_path_TR
11555if test -n "$TR"; then
11556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11557$as_echo "$TR" >&6; }
11558else
11559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
11561fi
11562
11563
11564  test -n "$TR" && break
11565done
11566
11567    else
11568      # If it succeeded, then it was overridden by the user. We will use it
11569      # for the tool.
11570
11571      # First remove it from the list of overridden variables, so we can test
11572      # for unknown variables in the end.
11573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11574
11575      # Check if we try to supply an empty value
11576      if test "x$TR" = x; then
11577        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11578$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11580$as_echo_n "checking for TR... " >&6; }
11581        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11582$as_echo "disabled" >&6; }
11583      else
11584        # Check if the provided tool contains a complete path.
11585        tool_specified="$TR"
11586        tool_basename="${tool_specified##*/}"
11587        if test "x$tool_basename" = "x$tool_specified"; then
11588          # A command without a complete path is provided, search $PATH.
11589          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11590$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11591          # Extract the first word of "$tool_basename", so it can be a program name with args.
11592set dummy $tool_basename; ac_word=$2
11593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11594$as_echo_n "checking for $ac_word... " >&6; }
11595if ${ac_cv_path_TR+:} false; then :
11596  $as_echo_n "(cached) " >&6
11597else
11598  case $TR in
11599  [\\/]* | ?:[\\/]*)
11600  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11601  ;;
11602  *)
11603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11604for as_dir in $PATH
11605do
11606  IFS=$as_save_IFS
11607  test -z "$as_dir" && as_dir=.
11608    for ac_exec_ext in '' $ac_executable_extensions; do
11609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11610    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11612    break 2
11613  fi
11614done
11615  done
11616IFS=$as_save_IFS
11617
11618  ;;
11619esac
11620fi
11621TR=$ac_cv_path_TR
11622if test -n "$TR"; then
11623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11624$as_echo "$TR" >&6; }
11625else
11626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11627$as_echo "no" >&6; }
11628fi
11629
11630
11631          if test "x$TR" = x; then
11632            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11633          fi
11634        else
11635          # Otherwise we believe it is a complete path. Use it as it is.
11636          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11637$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11638          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11639$as_echo_n "checking for TR... " >&6; }
11640          if test ! -x "$tool_specified"; then
11641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11642$as_echo "not found" >&6; }
11643            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11644          fi
11645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11646$as_echo "$tool_specified" >&6; }
11647        fi
11648      fi
11649    fi
11650
11651  fi
11652
11653
11654
11655  if test "x$TR" = x; then
11656    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11657  fi
11658
11659
11660
11661
11662
11663  # Publish this variable in the help.
11664
11665
11666  if [ -z "${UNAME+x}" ]; then
11667    # The variable is not set by user, try to locate tool using the code snippet
11668    for ac_prog in uname
11669do
11670  # Extract the first word of "$ac_prog", so it can be a program name with args.
11671set dummy $ac_prog; ac_word=$2
11672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11673$as_echo_n "checking for $ac_word... " >&6; }
11674if ${ac_cv_path_UNAME+:} false; then :
11675  $as_echo_n "(cached) " >&6
11676else
11677  case $UNAME in
11678  [\\/]* | ?:[\\/]*)
11679  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11680  ;;
11681  *)
11682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11683for as_dir in $PATH
11684do
11685  IFS=$as_save_IFS
11686  test -z "$as_dir" && as_dir=.
11687    for ac_exec_ext in '' $ac_executable_extensions; do
11688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11689    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11691    break 2
11692  fi
11693done
11694  done
11695IFS=$as_save_IFS
11696
11697  ;;
11698esac
11699fi
11700UNAME=$ac_cv_path_UNAME
11701if test -n "$UNAME"; then
11702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11703$as_echo "$UNAME" >&6; }
11704else
11705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11706$as_echo "no" >&6; }
11707fi
11708
11709
11710  test -n "$UNAME" && break
11711done
11712
11713  else
11714    # The variable is set, but is it from the command line or the environment?
11715
11716    # Try to remove the string !UNAME! from our list.
11717    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11718    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11719      # If it failed, the variable was not from the command line. Ignore it,
11720      # but warn the user (except for BASH, which is always set by the calling BASH).
11721      if test "xUNAME" != xBASH; then
11722        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11723$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11724      fi
11725      # Try to locate tool using the code snippet
11726      for ac_prog in uname
11727do
11728  # Extract the first word of "$ac_prog", so it can be a program name with args.
11729set dummy $ac_prog; ac_word=$2
11730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11731$as_echo_n "checking for $ac_word... " >&6; }
11732if ${ac_cv_path_UNAME+:} false; then :
11733  $as_echo_n "(cached) " >&6
11734else
11735  case $UNAME in
11736  [\\/]* | ?:[\\/]*)
11737  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11738  ;;
11739  *)
11740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11741for as_dir in $PATH
11742do
11743  IFS=$as_save_IFS
11744  test -z "$as_dir" && as_dir=.
11745    for ac_exec_ext in '' $ac_executable_extensions; do
11746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11747    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11749    break 2
11750  fi
11751done
11752  done
11753IFS=$as_save_IFS
11754
11755  ;;
11756esac
11757fi
11758UNAME=$ac_cv_path_UNAME
11759if test -n "$UNAME"; then
11760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11761$as_echo "$UNAME" >&6; }
11762else
11763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11764$as_echo "no" >&6; }
11765fi
11766
11767
11768  test -n "$UNAME" && break
11769done
11770
11771    else
11772      # If it succeeded, then it was overridden by the user. We will use it
11773      # for the tool.
11774
11775      # First remove it from the list of overridden variables, so we can test
11776      # for unknown variables in the end.
11777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11778
11779      # Check if we try to supply an empty value
11780      if test "x$UNAME" = x; then
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11782$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11784$as_echo_n "checking for UNAME... " >&6; }
11785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11786$as_echo "disabled" >&6; }
11787      else
11788        # Check if the provided tool contains a complete path.
11789        tool_specified="$UNAME"
11790        tool_basename="${tool_specified##*/}"
11791        if test "x$tool_basename" = "x$tool_specified"; then
11792          # A command without a complete path is provided, search $PATH.
11793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11794$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11795          # Extract the first word of "$tool_basename", so it can be a program name with args.
11796set dummy $tool_basename; ac_word=$2
11797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11798$as_echo_n "checking for $ac_word... " >&6; }
11799if ${ac_cv_path_UNAME+:} false; then :
11800  $as_echo_n "(cached) " >&6
11801else
11802  case $UNAME in
11803  [\\/]* | ?:[\\/]*)
11804  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11805  ;;
11806  *)
11807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11808for as_dir in $PATH
11809do
11810  IFS=$as_save_IFS
11811  test -z "$as_dir" && as_dir=.
11812    for ac_exec_ext in '' $ac_executable_extensions; do
11813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11814    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11816    break 2
11817  fi
11818done
11819  done
11820IFS=$as_save_IFS
11821
11822  ;;
11823esac
11824fi
11825UNAME=$ac_cv_path_UNAME
11826if test -n "$UNAME"; then
11827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11828$as_echo "$UNAME" >&6; }
11829else
11830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11831$as_echo "no" >&6; }
11832fi
11833
11834
11835          if test "x$UNAME" = x; then
11836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11837          fi
11838        else
11839          # Otherwise we believe it is a complete path. Use it as it is.
11840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11841$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11843$as_echo_n "checking for UNAME... " >&6; }
11844          if test ! -x "$tool_specified"; then
11845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11846$as_echo "not found" >&6; }
11847            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11848          fi
11849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11850$as_echo "$tool_specified" >&6; }
11851        fi
11852      fi
11853    fi
11854
11855  fi
11856
11857
11858
11859  if test "x$UNAME" = x; then
11860    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11861  fi
11862
11863
11864
11865
11866
11867  # Publish this variable in the help.
11868
11869
11870  if [ -z "${UNIQ+x}" ]; then
11871    # The variable is not set by user, try to locate tool using the code snippet
11872    for ac_prog in uniq
11873do
11874  # Extract the first word of "$ac_prog", so it can be a program name with args.
11875set dummy $ac_prog; ac_word=$2
11876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11877$as_echo_n "checking for $ac_word... " >&6; }
11878if ${ac_cv_path_UNIQ+:} false; then :
11879  $as_echo_n "(cached) " >&6
11880else
11881  case $UNIQ in
11882  [\\/]* | ?:[\\/]*)
11883  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11884  ;;
11885  *)
11886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11887for as_dir in $PATH
11888do
11889  IFS=$as_save_IFS
11890  test -z "$as_dir" && as_dir=.
11891    for ac_exec_ext in '' $ac_executable_extensions; do
11892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11893    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11895    break 2
11896  fi
11897done
11898  done
11899IFS=$as_save_IFS
11900
11901  ;;
11902esac
11903fi
11904UNIQ=$ac_cv_path_UNIQ
11905if test -n "$UNIQ"; then
11906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11907$as_echo "$UNIQ" >&6; }
11908else
11909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11910$as_echo "no" >&6; }
11911fi
11912
11913
11914  test -n "$UNIQ" && break
11915done
11916
11917  else
11918    # The variable is set, but is it from the command line or the environment?
11919
11920    # Try to remove the string !UNIQ! from our list.
11921    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11922    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11923      # If it failed, the variable was not from the command line. Ignore it,
11924      # but warn the user (except for BASH, which is always set by the calling BASH).
11925      if test "xUNIQ" != xBASH; then
11926        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11927$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11928      fi
11929      # Try to locate tool using the code snippet
11930      for ac_prog in uniq
11931do
11932  # Extract the first word of "$ac_prog", so it can be a program name with args.
11933set dummy $ac_prog; ac_word=$2
11934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11935$as_echo_n "checking for $ac_word... " >&6; }
11936if ${ac_cv_path_UNIQ+:} false; then :
11937  $as_echo_n "(cached) " >&6
11938else
11939  case $UNIQ in
11940  [\\/]* | ?:[\\/]*)
11941  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11942  ;;
11943  *)
11944  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11945for as_dir in $PATH
11946do
11947  IFS=$as_save_IFS
11948  test -z "$as_dir" && as_dir=.
11949    for ac_exec_ext in '' $ac_executable_extensions; do
11950  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11951    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11952    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11953    break 2
11954  fi
11955done
11956  done
11957IFS=$as_save_IFS
11958
11959  ;;
11960esac
11961fi
11962UNIQ=$ac_cv_path_UNIQ
11963if test -n "$UNIQ"; then
11964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11965$as_echo "$UNIQ" >&6; }
11966else
11967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11968$as_echo "no" >&6; }
11969fi
11970
11971
11972  test -n "$UNIQ" && break
11973done
11974
11975    else
11976      # If it succeeded, then it was overridden by the user. We will use it
11977      # for the tool.
11978
11979      # First remove it from the list of overridden variables, so we can test
11980      # for unknown variables in the end.
11981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11982
11983      # Check if we try to supply an empty value
11984      if test "x$UNIQ" = x; then
11985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11986$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11988$as_echo_n "checking for UNIQ... " >&6; }
11989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11990$as_echo "disabled" >&6; }
11991      else
11992        # Check if the provided tool contains a complete path.
11993        tool_specified="$UNIQ"
11994        tool_basename="${tool_specified##*/}"
11995        if test "x$tool_basename" = "x$tool_specified"; then
11996          # A command without a complete path is provided, search $PATH.
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
11998$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
11999          # Extract the first word of "$tool_basename", so it can be a program name with args.
12000set dummy $tool_basename; ac_word=$2
12001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12002$as_echo_n "checking for $ac_word... " >&6; }
12003if ${ac_cv_path_UNIQ+:} false; then :
12004  $as_echo_n "(cached) " >&6
12005else
12006  case $UNIQ in
12007  [\\/]* | ?:[\\/]*)
12008  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12009  ;;
12010  *)
12011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12012for as_dir in $PATH
12013do
12014  IFS=$as_save_IFS
12015  test -z "$as_dir" && as_dir=.
12016    for ac_exec_ext in '' $ac_executable_extensions; do
12017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12018    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12020    break 2
12021  fi
12022done
12023  done
12024IFS=$as_save_IFS
12025
12026  ;;
12027esac
12028fi
12029UNIQ=$ac_cv_path_UNIQ
12030if test -n "$UNIQ"; then
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12032$as_echo "$UNIQ" >&6; }
12033else
12034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12035$as_echo "no" >&6; }
12036fi
12037
12038
12039          if test "x$UNIQ" = x; then
12040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12041          fi
12042        else
12043          # Otherwise we believe it is a complete path. Use it as it is.
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12045$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12047$as_echo_n "checking for UNIQ... " >&6; }
12048          if test ! -x "$tool_specified"; then
12049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12050$as_echo "not found" >&6; }
12051            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12052          fi
12053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12054$as_echo "$tool_specified" >&6; }
12055        fi
12056      fi
12057    fi
12058
12059  fi
12060
12061
12062
12063  if test "x$UNIQ" = x; then
12064    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12065  fi
12066
12067
12068
12069
12070
12071  # Publish this variable in the help.
12072
12073
12074  if [ -z "${WC+x}" ]; then
12075    # The variable is not set by user, try to locate tool using the code snippet
12076    for ac_prog in wc
12077do
12078  # Extract the first word of "$ac_prog", so it can be a program name with args.
12079set dummy $ac_prog; ac_word=$2
12080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12081$as_echo_n "checking for $ac_word... " >&6; }
12082if ${ac_cv_path_WC+:} false; then :
12083  $as_echo_n "(cached) " >&6
12084else
12085  case $WC in
12086  [\\/]* | ?:[\\/]*)
12087  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12088  ;;
12089  *)
12090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12091for as_dir in $PATH
12092do
12093  IFS=$as_save_IFS
12094  test -z "$as_dir" && as_dir=.
12095    for ac_exec_ext in '' $ac_executable_extensions; do
12096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12097    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12099    break 2
12100  fi
12101done
12102  done
12103IFS=$as_save_IFS
12104
12105  ;;
12106esac
12107fi
12108WC=$ac_cv_path_WC
12109if test -n "$WC"; then
12110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12111$as_echo "$WC" >&6; }
12112else
12113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12114$as_echo "no" >&6; }
12115fi
12116
12117
12118  test -n "$WC" && break
12119done
12120
12121  else
12122    # The variable is set, but is it from the command line or the environment?
12123
12124    # Try to remove the string !WC! from our list.
12125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12127      # If it failed, the variable was not from the command line. Ignore it,
12128      # but warn the user (except for BASH, which is always set by the calling BASH).
12129      if test "xWC" != xBASH; then
12130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12131$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12132      fi
12133      # Try to locate tool using the code snippet
12134      for ac_prog in wc
12135do
12136  # Extract the first word of "$ac_prog", so it can be a program name with args.
12137set dummy $ac_prog; ac_word=$2
12138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12139$as_echo_n "checking for $ac_word... " >&6; }
12140if ${ac_cv_path_WC+:} false; then :
12141  $as_echo_n "(cached) " >&6
12142else
12143  case $WC in
12144  [\\/]* | ?:[\\/]*)
12145  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12146  ;;
12147  *)
12148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12149for as_dir in $PATH
12150do
12151  IFS=$as_save_IFS
12152  test -z "$as_dir" && as_dir=.
12153    for ac_exec_ext in '' $ac_executable_extensions; do
12154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12155    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12157    break 2
12158  fi
12159done
12160  done
12161IFS=$as_save_IFS
12162
12163  ;;
12164esac
12165fi
12166WC=$ac_cv_path_WC
12167if test -n "$WC"; then
12168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12169$as_echo "$WC" >&6; }
12170else
12171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12172$as_echo "no" >&6; }
12173fi
12174
12175
12176  test -n "$WC" && break
12177done
12178
12179    else
12180      # If it succeeded, then it was overridden by the user. We will use it
12181      # for the tool.
12182
12183      # First remove it from the list of overridden variables, so we can test
12184      # for unknown variables in the end.
12185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12186
12187      # Check if we try to supply an empty value
12188      if test "x$WC" = x; then
12189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12190$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12192$as_echo_n "checking for WC... " >&6; }
12193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12194$as_echo "disabled" >&6; }
12195      else
12196        # Check if the provided tool contains a complete path.
12197        tool_specified="$WC"
12198        tool_basename="${tool_specified##*/}"
12199        if test "x$tool_basename" = "x$tool_specified"; then
12200          # A command without a complete path is provided, search $PATH.
12201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12202$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12203          # Extract the first word of "$tool_basename", so it can be a program name with args.
12204set dummy $tool_basename; ac_word=$2
12205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12206$as_echo_n "checking for $ac_word... " >&6; }
12207if ${ac_cv_path_WC+:} false; then :
12208  $as_echo_n "(cached) " >&6
12209else
12210  case $WC in
12211  [\\/]* | ?:[\\/]*)
12212  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12213  ;;
12214  *)
12215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12216for as_dir in $PATH
12217do
12218  IFS=$as_save_IFS
12219  test -z "$as_dir" && as_dir=.
12220    for ac_exec_ext in '' $ac_executable_extensions; do
12221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12222    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12224    break 2
12225  fi
12226done
12227  done
12228IFS=$as_save_IFS
12229
12230  ;;
12231esac
12232fi
12233WC=$ac_cv_path_WC
12234if test -n "$WC"; then
12235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12236$as_echo "$WC" >&6; }
12237else
12238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12239$as_echo "no" >&6; }
12240fi
12241
12242
12243          if test "x$WC" = x; then
12244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12245          fi
12246        else
12247          # Otherwise we believe it is a complete path. Use it as it is.
12248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12249$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12251$as_echo_n "checking for WC... " >&6; }
12252          if test ! -x "$tool_specified"; then
12253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12254$as_echo "not found" >&6; }
12255            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12256          fi
12257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12258$as_echo "$tool_specified" >&6; }
12259        fi
12260      fi
12261    fi
12262
12263  fi
12264
12265
12266
12267  if test "x$WC" = x; then
12268    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12269  fi
12270
12271
12272
12273
12274
12275  # Publish this variable in the help.
12276
12277
12278  if [ -z "${WHICH+x}" ]; then
12279    # The variable is not set by user, try to locate tool using the code snippet
12280    for ac_prog in which
12281do
12282  # Extract the first word of "$ac_prog", so it can be a program name with args.
12283set dummy $ac_prog; ac_word=$2
12284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12285$as_echo_n "checking for $ac_word... " >&6; }
12286if ${ac_cv_path_WHICH+:} false; then :
12287  $as_echo_n "(cached) " >&6
12288else
12289  case $WHICH in
12290  [\\/]* | ?:[\\/]*)
12291  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12292  ;;
12293  *)
12294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12295for as_dir in $PATH
12296do
12297  IFS=$as_save_IFS
12298  test -z "$as_dir" && as_dir=.
12299    for ac_exec_ext in '' $ac_executable_extensions; do
12300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12301    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12303    break 2
12304  fi
12305done
12306  done
12307IFS=$as_save_IFS
12308
12309  ;;
12310esac
12311fi
12312WHICH=$ac_cv_path_WHICH
12313if test -n "$WHICH"; then
12314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12315$as_echo "$WHICH" >&6; }
12316else
12317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12318$as_echo "no" >&6; }
12319fi
12320
12321
12322  test -n "$WHICH" && break
12323done
12324
12325  else
12326    # The variable is set, but is it from the command line or the environment?
12327
12328    # Try to remove the string !WHICH! from our list.
12329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12331      # If it failed, the variable was not from the command line. Ignore it,
12332      # but warn the user (except for BASH, which is always set by the calling BASH).
12333      if test "xWHICH" != xBASH; then
12334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12335$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12336      fi
12337      # Try to locate tool using the code snippet
12338      for ac_prog in which
12339do
12340  # Extract the first word of "$ac_prog", so it can be a program name with args.
12341set dummy $ac_prog; ac_word=$2
12342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12343$as_echo_n "checking for $ac_word... " >&6; }
12344if ${ac_cv_path_WHICH+:} false; then :
12345  $as_echo_n "(cached) " >&6
12346else
12347  case $WHICH in
12348  [\\/]* | ?:[\\/]*)
12349  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12350  ;;
12351  *)
12352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12353for as_dir in $PATH
12354do
12355  IFS=$as_save_IFS
12356  test -z "$as_dir" && as_dir=.
12357    for ac_exec_ext in '' $ac_executable_extensions; do
12358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12359    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12361    break 2
12362  fi
12363done
12364  done
12365IFS=$as_save_IFS
12366
12367  ;;
12368esac
12369fi
12370WHICH=$ac_cv_path_WHICH
12371if test -n "$WHICH"; then
12372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12373$as_echo "$WHICH" >&6; }
12374else
12375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
12377fi
12378
12379
12380  test -n "$WHICH" && break
12381done
12382
12383    else
12384      # If it succeeded, then it was overridden by the user. We will use it
12385      # for the tool.
12386
12387      # First remove it from the list of overridden variables, so we can test
12388      # for unknown variables in the end.
12389      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12390
12391      # Check if we try to supply an empty value
12392      if test "x$WHICH" = x; then
12393        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12394$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12396$as_echo_n "checking for WHICH... " >&6; }
12397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12398$as_echo "disabled" >&6; }
12399      else
12400        # Check if the provided tool contains a complete path.
12401        tool_specified="$WHICH"
12402        tool_basename="${tool_specified##*/}"
12403        if test "x$tool_basename" = "x$tool_specified"; then
12404          # A command without a complete path is provided, search $PATH.
12405          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12406$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12407          # Extract the first word of "$tool_basename", so it can be a program name with args.
12408set dummy $tool_basename; ac_word=$2
12409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12410$as_echo_n "checking for $ac_word... " >&6; }
12411if ${ac_cv_path_WHICH+:} false; then :
12412  $as_echo_n "(cached) " >&6
12413else
12414  case $WHICH in
12415  [\\/]* | ?:[\\/]*)
12416  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12417  ;;
12418  *)
12419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12420for as_dir in $PATH
12421do
12422  IFS=$as_save_IFS
12423  test -z "$as_dir" && as_dir=.
12424    for ac_exec_ext in '' $ac_executable_extensions; do
12425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12426    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12428    break 2
12429  fi
12430done
12431  done
12432IFS=$as_save_IFS
12433
12434  ;;
12435esac
12436fi
12437WHICH=$ac_cv_path_WHICH
12438if test -n "$WHICH"; then
12439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12440$as_echo "$WHICH" >&6; }
12441else
12442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12443$as_echo "no" >&6; }
12444fi
12445
12446
12447          if test "x$WHICH" = x; then
12448            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12449          fi
12450        else
12451          # Otherwise we believe it is a complete path. Use it as it is.
12452          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12453$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12454          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12455$as_echo_n "checking for WHICH... " >&6; }
12456          if test ! -x "$tool_specified"; then
12457            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12458$as_echo "not found" >&6; }
12459            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12460          fi
12461          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12462$as_echo "$tool_specified" >&6; }
12463        fi
12464      fi
12465    fi
12466
12467  fi
12468
12469
12470
12471  if test "x$WHICH" = x; then
12472    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12473  fi
12474
12475
12476
12477
12478
12479  # Publish this variable in the help.
12480
12481
12482  if [ -z "${XARGS+x}" ]; then
12483    # The variable is not set by user, try to locate tool using the code snippet
12484    for ac_prog in xargs
12485do
12486  # Extract the first word of "$ac_prog", so it can be a program name with args.
12487set dummy $ac_prog; ac_word=$2
12488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12489$as_echo_n "checking for $ac_word... " >&6; }
12490if ${ac_cv_path_XARGS+:} false; then :
12491  $as_echo_n "(cached) " >&6
12492else
12493  case $XARGS in
12494  [\\/]* | ?:[\\/]*)
12495  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12496  ;;
12497  *)
12498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12499for as_dir in $PATH
12500do
12501  IFS=$as_save_IFS
12502  test -z "$as_dir" && as_dir=.
12503    for ac_exec_ext in '' $ac_executable_extensions; do
12504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12505    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12507    break 2
12508  fi
12509done
12510  done
12511IFS=$as_save_IFS
12512
12513  ;;
12514esac
12515fi
12516XARGS=$ac_cv_path_XARGS
12517if test -n "$XARGS"; then
12518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12519$as_echo "$XARGS" >&6; }
12520else
12521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12522$as_echo "no" >&6; }
12523fi
12524
12525
12526  test -n "$XARGS" && break
12527done
12528
12529  else
12530    # The variable is set, but is it from the command line or the environment?
12531
12532    # Try to remove the string !XARGS! from our list.
12533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12535      # If it failed, the variable was not from the command line. Ignore it,
12536      # but warn the user (except for BASH, which is always set by the calling BASH).
12537      if test "xXARGS" != xBASH; then
12538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12539$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12540      fi
12541      # Try to locate tool using the code snippet
12542      for ac_prog in xargs
12543do
12544  # Extract the first word of "$ac_prog", so it can be a program name with args.
12545set dummy $ac_prog; ac_word=$2
12546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12547$as_echo_n "checking for $ac_word... " >&6; }
12548if ${ac_cv_path_XARGS+:} false; then :
12549  $as_echo_n "(cached) " >&6
12550else
12551  case $XARGS in
12552  [\\/]* | ?:[\\/]*)
12553  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12554  ;;
12555  *)
12556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12557for as_dir in $PATH
12558do
12559  IFS=$as_save_IFS
12560  test -z "$as_dir" && as_dir=.
12561    for ac_exec_ext in '' $ac_executable_extensions; do
12562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12563    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12565    break 2
12566  fi
12567done
12568  done
12569IFS=$as_save_IFS
12570
12571  ;;
12572esac
12573fi
12574XARGS=$ac_cv_path_XARGS
12575if test -n "$XARGS"; then
12576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12577$as_echo "$XARGS" >&6; }
12578else
12579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
12581fi
12582
12583
12584  test -n "$XARGS" && break
12585done
12586
12587    else
12588      # If it succeeded, then it was overridden by the user. We will use it
12589      # for the tool.
12590
12591      # First remove it from the list of overridden variables, so we can test
12592      # for unknown variables in the end.
12593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12594
12595      # Check if we try to supply an empty value
12596      if test "x$XARGS" = x; then
12597        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12598$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12599        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12600$as_echo_n "checking for XARGS... " >&6; }
12601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12602$as_echo "disabled" >&6; }
12603      else
12604        # Check if the provided tool contains a complete path.
12605        tool_specified="$XARGS"
12606        tool_basename="${tool_specified##*/}"
12607        if test "x$tool_basename" = "x$tool_specified"; then
12608          # A command without a complete path is provided, search $PATH.
12609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12610$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12611          # Extract the first word of "$tool_basename", so it can be a program name with args.
12612set dummy $tool_basename; ac_word=$2
12613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12614$as_echo_n "checking for $ac_word... " >&6; }
12615if ${ac_cv_path_XARGS+:} false; then :
12616  $as_echo_n "(cached) " >&6
12617else
12618  case $XARGS in
12619  [\\/]* | ?:[\\/]*)
12620  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12621  ;;
12622  *)
12623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12624for as_dir in $PATH
12625do
12626  IFS=$as_save_IFS
12627  test -z "$as_dir" && as_dir=.
12628    for ac_exec_ext in '' $ac_executable_extensions; do
12629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12630    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12632    break 2
12633  fi
12634done
12635  done
12636IFS=$as_save_IFS
12637
12638  ;;
12639esac
12640fi
12641XARGS=$ac_cv_path_XARGS
12642if test -n "$XARGS"; then
12643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12644$as_echo "$XARGS" >&6; }
12645else
12646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12647$as_echo "no" >&6; }
12648fi
12649
12650
12651          if test "x$XARGS" = x; then
12652            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12653          fi
12654        else
12655          # Otherwise we believe it is a complete path. Use it as it is.
12656          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12657$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12658          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12659$as_echo_n "checking for XARGS... " >&6; }
12660          if test ! -x "$tool_specified"; then
12661            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12662$as_echo "not found" >&6; }
12663            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12664          fi
12665          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12666$as_echo "$tool_specified" >&6; }
12667        fi
12668      fi
12669    fi
12670
12671  fi
12672
12673
12674
12675  if test "x$XARGS" = x; then
12676    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12677  fi
12678
12679
12680
12681  # Then required tools that require some special treatment.
12682
12683
12684  # Publish this variable in the help.
12685
12686
12687  if [ -z "${AWK+x}" ]; then
12688    # The variable is not set by user, try to locate tool using the code snippet
12689    for ac_prog in gawk mawk nawk awk
12690do
12691  # Extract the first word of "$ac_prog", so it can be a program name with args.
12692set dummy $ac_prog; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_prog_AWK+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  if test -n "$AWK"; then
12699  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12700else
12701as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12702for as_dir in $PATH
12703do
12704  IFS=$as_save_IFS
12705  test -z "$as_dir" && as_dir=.
12706    for ac_exec_ext in '' $ac_executable_extensions; do
12707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12708    ac_cv_prog_AWK="$ac_prog"
12709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12710    break 2
12711  fi
12712done
12713  done
12714IFS=$as_save_IFS
12715
12716fi
12717fi
12718AWK=$ac_cv_prog_AWK
12719if test -n "$AWK"; then
12720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12721$as_echo "$AWK" >&6; }
12722else
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
12725fi
12726
12727
12728  test -n "$AWK" && break
12729done
12730
12731  else
12732    # The variable is set, but is it from the command line or the environment?
12733
12734    # Try to remove the string !AWK! from our list.
12735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12737      # If it failed, the variable was not from the command line. Ignore it,
12738      # but warn the user (except for BASH, which is always set by the calling BASH).
12739      if test "xAWK" != xBASH; then
12740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12741$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12742      fi
12743      # Try to locate tool using the code snippet
12744      for ac_prog in gawk mawk nawk awk
12745do
12746  # Extract the first word of "$ac_prog", so it can be a program name with args.
12747set dummy $ac_prog; ac_word=$2
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12749$as_echo_n "checking for $ac_word... " >&6; }
12750if ${ac_cv_prog_AWK+:} false; then :
12751  $as_echo_n "(cached) " >&6
12752else
12753  if test -n "$AWK"; then
12754  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12755else
12756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12757for as_dir in $PATH
12758do
12759  IFS=$as_save_IFS
12760  test -z "$as_dir" && as_dir=.
12761    for ac_exec_ext in '' $ac_executable_extensions; do
12762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12763    ac_cv_prog_AWK="$ac_prog"
12764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12765    break 2
12766  fi
12767done
12768  done
12769IFS=$as_save_IFS
12770
12771fi
12772fi
12773AWK=$ac_cv_prog_AWK
12774if test -n "$AWK"; then
12775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12776$as_echo "$AWK" >&6; }
12777else
12778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12779$as_echo "no" >&6; }
12780fi
12781
12782
12783  test -n "$AWK" && break
12784done
12785
12786    else
12787      # If it succeeded, then it was overridden by the user. We will use it
12788      # for the tool.
12789
12790      # First remove it from the list of overridden variables, so we can test
12791      # for unknown variables in the end.
12792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12793
12794      # Check if we try to supply an empty value
12795      if test "x$AWK" = x; then
12796        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12797$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12798        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12799$as_echo_n "checking for AWK... " >&6; }
12800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12801$as_echo "disabled" >&6; }
12802      else
12803        # Check if the provided tool contains a complete path.
12804        tool_specified="$AWK"
12805        tool_basename="${tool_specified##*/}"
12806        if test "x$tool_basename" = "x$tool_specified"; then
12807          # A command without a complete path is provided, search $PATH.
12808          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12809$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12810          # Extract the first word of "$tool_basename", so it can be a program name with args.
12811set dummy $tool_basename; ac_word=$2
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12813$as_echo_n "checking for $ac_word... " >&6; }
12814if ${ac_cv_path_AWK+:} false; then :
12815  $as_echo_n "(cached) " >&6
12816else
12817  case $AWK in
12818  [\\/]* | ?:[\\/]*)
12819  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12820  ;;
12821  *)
12822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12823for as_dir in $PATH
12824do
12825  IFS=$as_save_IFS
12826  test -z "$as_dir" && as_dir=.
12827    for ac_exec_ext in '' $ac_executable_extensions; do
12828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12829    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12831    break 2
12832  fi
12833done
12834  done
12835IFS=$as_save_IFS
12836
12837  ;;
12838esac
12839fi
12840AWK=$ac_cv_path_AWK
12841if test -n "$AWK"; then
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12843$as_echo "$AWK" >&6; }
12844else
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12846$as_echo "no" >&6; }
12847fi
12848
12849
12850          if test "x$AWK" = x; then
12851            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12852          fi
12853        else
12854          # Otherwise we believe it is a complete path. Use it as it is.
12855          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12856$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12858$as_echo_n "checking for AWK... " >&6; }
12859          if test ! -x "$tool_specified"; then
12860            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12861$as_echo "not found" >&6; }
12862            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12863          fi
12864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12865$as_echo "$tool_specified" >&6; }
12866        fi
12867      fi
12868    fi
12869
12870  fi
12871
12872
12873  if test "x$AWK" = x; then
12874    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12875  fi
12876
12877
12878
12879
12880  # Publish this variable in the help.
12881
12882
12883  if [ -z "${GREP+x}" ]; then
12884    # The variable is not set by user, try to locate tool using the code snippet
12885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12886$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12887if ${ac_cv_path_GREP+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  if test -z "$GREP"; then
12891  ac_path_GREP_found=false
12892  # Loop through the user's path and test for each of PROGNAME-LIST
12893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12894for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12895do
12896  IFS=$as_save_IFS
12897  test -z "$as_dir" && as_dir=.
12898    for ac_prog in grep ggrep; do
12899    for ac_exec_ext in '' $ac_executable_extensions; do
12900      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12901      as_fn_executable_p "$ac_path_GREP" || continue
12902# Check for GNU ac_path_GREP and select it if it is found.
12903  # Check for GNU $ac_path_GREP
12904case `"$ac_path_GREP" --version 2>&1` in
12905*GNU*)
12906  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12907*)
12908  ac_count=0
12909  $as_echo_n 0123456789 >"conftest.in"
12910  while :
12911  do
12912    cat "conftest.in" "conftest.in" >"conftest.tmp"
12913    mv "conftest.tmp" "conftest.in"
12914    cp "conftest.in" "conftest.nl"
12915    $as_echo 'GREP' >> "conftest.nl"
12916    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12917    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12918    as_fn_arith $ac_count + 1 && ac_count=$as_val
12919    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12920      # Best one so far, save it but keep looking for a better one
12921      ac_cv_path_GREP="$ac_path_GREP"
12922      ac_path_GREP_max=$ac_count
12923    fi
12924    # 10*(2^10) chars as input seems more than enough
12925    test $ac_count -gt 10 && break
12926  done
12927  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12928esac
12929
12930      $ac_path_GREP_found && break 3
12931    done
12932  done
12933  done
12934IFS=$as_save_IFS
12935  if test -z "$ac_cv_path_GREP"; then
12936    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12937  fi
12938else
12939  ac_cv_path_GREP=$GREP
12940fi
12941
12942fi
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12944$as_echo "$ac_cv_path_GREP" >&6; }
12945 GREP="$ac_cv_path_GREP"
12946
12947
12948  else
12949    # The variable is set, but is it from the command line or the environment?
12950
12951    # Try to remove the string !GREP! from our list.
12952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12954      # If it failed, the variable was not from the command line. Ignore it,
12955      # but warn the user (except for BASH, which is always set by the calling BASH).
12956      if test "xGREP" != xBASH; then
12957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12958$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12959      fi
12960      # Try to locate tool using the code snippet
12961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12962$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12963if ${ac_cv_path_GREP+:} false; then :
12964  $as_echo_n "(cached) " >&6
12965else
12966  if test -z "$GREP"; then
12967  ac_path_GREP_found=false
12968  # Loop through the user's path and test for each of PROGNAME-LIST
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_prog in grep ggrep; do
12975    for ac_exec_ext in '' $ac_executable_extensions; do
12976      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12977      as_fn_executable_p "$ac_path_GREP" || continue
12978# Check for GNU ac_path_GREP and select it if it is found.
12979  # Check for GNU $ac_path_GREP
12980case `"$ac_path_GREP" --version 2>&1` in
12981*GNU*)
12982  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12983*)
12984  ac_count=0
12985  $as_echo_n 0123456789 >"conftest.in"
12986  while :
12987  do
12988    cat "conftest.in" "conftest.in" >"conftest.tmp"
12989    mv "conftest.tmp" "conftest.in"
12990    cp "conftest.in" "conftest.nl"
12991    $as_echo 'GREP' >> "conftest.nl"
12992    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12993    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12994    as_fn_arith $ac_count + 1 && ac_count=$as_val
12995    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12996      # Best one so far, save it but keep looking for a better one
12997      ac_cv_path_GREP="$ac_path_GREP"
12998      ac_path_GREP_max=$ac_count
12999    fi
13000    # 10*(2^10) chars as input seems more than enough
13001    test $ac_count -gt 10 && break
13002  done
13003  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13004esac
13005
13006      $ac_path_GREP_found && break 3
13007    done
13008  done
13009  done
13010IFS=$as_save_IFS
13011  if test -z "$ac_cv_path_GREP"; then
13012    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13013  fi
13014else
13015  ac_cv_path_GREP=$GREP
13016fi
13017
13018fi
13019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13020$as_echo "$ac_cv_path_GREP" >&6; }
13021 GREP="$ac_cv_path_GREP"
13022
13023
13024    else
13025      # If it succeeded, then it was overridden by the user. We will use it
13026      # for the tool.
13027
13028      # First remove it from the list of overridden variables, so we can test
13029      # for unknown variables in the end.
13030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13031
13032      # Check if we try to supply an empty value
13033      if test "x$GREP" = x; then
13034        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13035$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13036        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13037$as_echo_n "checking for GREP... " >&6; }
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13039$as_echo "disabled" >&6; }
13040      else
13041        # Check if the provided tool contains a complete path.
13042        tool_specified="$GREP"
13043        tool_basename="${tool_specified##*/}"
13044        if test "x$tool_basename" = "x$tool_specified"; then
13045          # A command without a complete path is provided, search $PATH.
13046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13047$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13048          # Extract the first word of "$tool_basename", so it can be a program name with args.
13049set dummy $tool_basename; ac_word=$2
13050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13051$as_echo_n "checking for $ac_word... " >&6; }
13052if ${ac_cv_path_GREP+:} false; then :
13053  $as_echo_n "(cached) " >&6
13054else
13055  case $GREP in
13056  [\\/]* | ?:[\\/]*)
13057  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13058  ;;
13059  *)
13060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13061for as_dir in $PATH
13062do
13063  IFS=$as_save_IFS
13064  test -z "$as_dir" && as_dir=.
13065    for ac_exec_ext in '' $ac_executable_extensions; do
13066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13067    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13069    break 2
13070  fi
13071done
13072  done
13073IFS=$as_save_IFS
13074
13075  ;;
13076esac
13077fi
13078GREP=$ac_cv_path_GREP
13079if test -n "$GREP"; then
13080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13081$as_echo "$GREP" >&6; }
13082else
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13084$as_echo "no" >&6; }
13085fi
13086
13087
13088          if test "x$GREP" = x; then
13089            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13090          fi
13091        else
13092          # Otherwise we believe it is a complete path. Use it as it is.
13093          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13094$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13095          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13096$as_echo_n "checking for GREP... " >&6; }
13097          if test ! -x "$tool_specified"; then
13098            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13099$as_echo "not found" >&6; }
13100            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13101          fi
13102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13103$as_echo "$tool_specified" >&6; }
13104        fi
13105      fi
13106    fi
13107
13108  fi
13109
13110
13111  if test "x$GREP" = x; then
13112    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13113  fi
13114
13115
13116
13117
13118  # Publish this variable in the help.
13119
13120
13121  if [ -z "${EGREP+x}" ]; then
13122    # The variable is not set by user, try to locate tool using the code snippet
13123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13124$as_echo_n "checking for egrep... " >&6; }
13125if ${ac_cv_path_EGREP+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13129   then ac_cv_path_EGREP="$GREP -E"
13130   else
13131     if test -z "$EGREP"; then
13132  ac_path_EGREP_found=false
13133  # Loop through the user's path and test for each of PROGNAME-LIST
13134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13135for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13136do
13137  IFS=$as_save_IFS
13138  test -z "$as_dir" && as_dir=.
13139    for ac_prog in egrep; do
13140    for ac_exec_ext in '' $ac_executable_extensions; do
13141      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13142      as_fn_executable_p "$ac_path_EGREP" || continue
13143# Check for GNU ac_path_EGREP and select it if it is found.
13144  # Check for GNU $ac_path_EGREP
13145case `"$ac_path_EGREP" --version 2>&1` in
13146*GNU*)
13147  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13148*)
13149  ac_count=0
13150  $as_echo_n 0123456789 >"conftest.in"
13151  while :
13152  do
13153    cat "conftest.in" "conftest.in" >"conftest.tmp"
13154    mv "conftest.tmp" "conftest.in"
13155    cp "conftest.in" "conftest.nl"
13156    $as_echo 'EGREP' >> "conftest.nl"
13157    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13158    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13159    as_fn_arith $ac_count + 1 && ac_count=$as_val
13160    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13161      # Best one so far, save it but keep looking for a better one
13162      ac_cv_path_EGREP="$ac_path_EGREP"
13163      ac_path_EGREP_max=$ac_count
13164    fi
13165    # 10*(2^10) chars as input seems more than enough
13166    test $ac_count -gt 10 && break
13167  done
13168  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13169esac
13170
13171      $ac_path_EGREP_found && break 3
13172    done
13173  done
13174  done
13175IFS=$as_save_IFS
13176  if test -z "$ac_cv_path_EGREP"; then
13177    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13178  fi
13179else
13180  ac_cv_path_EGREP=$EGREP
13181fi
13182
13183   fi
13184fi
13185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13186$as_echo "$ac_cv_path_EGREP" >&6; }
13187 EGREP="$ac_cv_path_EGREP"
13188
13189
13190  else
13191    # The variable is set, but is it from the command line or the environment?
13192
13193    # Try to remove the string !EGREP! from our list.
13194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13196      # If it failed, the variable was not from the command line. Ignore it,
13197      # but warn the user (except for BASH, which is always set by the calling BASH).
13198      if test "xEGREP" != xBASH; then
13199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13200$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13201      fi
13202      # Try to locate tool using the code snippet
13203      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13204$as_echo_n "checking for egrep... " >&6; }
13205if ${ac_cv_path_EGREP+:} false; then :
13206  $as_echo_n "(cached) " >&6
13207else
13208  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13209   then ac_cv_path_EGREP="$GREP -E"
13210   else
13211     if test -z "$EGREP"; then
13212  ac_path_EGREP_found=false
13213  # Loop through the user's path and test for each of PROGNAME-LIST
13214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13216do
13217  IFS=$as_save_IFS
13218  test -z "$as_dir" && as_dir=.
13219    for ac_prog in egrep; do
13220    for ac_exec_ext in '' $ac_executable_extensions; do
13221      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13222      as_fn_executable_p "$ac_path_EGREP" || continue
13223# Check for GNU ac_path_EGREP and select it if it is found.
13224  # Check for GNU $ac_path_EGREP
13225case `"$ac_path_EGREP" --version 2>&1` in
13226*GNU*)
13227  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13228*)
13229  ac_count=0
13230  $as_echo_n 0123456789 >"conftest.in"
13231  while :
13232  do
13233    cat "conftest.in" "conftest.in" >"conftest.tmp"
13234    mv "conftest.tmp" "conftest.in"
13235    cp "conftest.in" "conftest.nl"
13236    $as_echo 'EGREP' >> "conftest.nl"
13237    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13238    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13239    as_fn_arith $ac_count + 1 && ac_count=$as_val
13240    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13241      # Best one so far, save it but keep looking for a better one
13242      ac_cv_path_EGREP="$ac_path_EGREP"
13243      ac_path_EGREP_max=$ac_count
13244    fi
13245    # 10*(2^10) chars as input seems more than enough
13246    test $ac_count -gt 10 && break
13247  done
13248  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13249esac
13250
13251      $ac_path_EGREP_found && break 3
13252    done
13253  done
13254  done
13255IFS=$as_save_IFS
13256  if test -z "$ac_cv_path_EGREP"; then
13257    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13258  fi
13259else
13260  ac_cv_path_EGREP=$EGREP
13261fi
13262
13263   fi
13264fi
13265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13266$as_echo "$ac_cv_path_EGREP" >&6; }
13267 EGREP="$ac_cv_path_EGREP"
13268
13269
13270    else
13271      # If it succeeded, then it was overridden by the user. We will use it
13272      # for the tool.
13273
13274      # First remove it from the list of overridden variables, so we can test
13275      # for unknown variables in the end.
13276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13277
13278      # Check if we try to supply an empty value
13279      if test "x$EGREP" = x; then
13280        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13281$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13283$as_echo_n "checking for EGREP... " >&6; }
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13285$as_echo "disabled" >&6; }
13286      else
13287        # Check if the provided tool contains a complete path.
13288        tool_specified="$EGREP"
13289        tool_basename="${tool_specified##*/}"
13290        if test "x$tool_basename" = "x$tool_specified"; then
13291          # A command without a complete path is provided, search $PATH.
13292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13293$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13294          # Extract the first word of "$tool_basename", so it can be a program name with args.
13295set dummy $tool_basename; ac_word=$2
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13297$as_echo_n "checking for $ac_word... " >&6; }
13298if ${ac_cv_path_EGREP+:} false; then :
13299  $as_echo_n "(cached) " >&6
13300else
13301  case $EGREP in
13302  [\\/]* | ?:[\\/]*)
13303  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13304  ;;
13305  *)
13306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13307for as_dir in $PATH
13308do
13309  IFS=$as_save_IFS
13310  test -z "$as_dir" && as_dir=.
13311    for ac_exec_ext in '' $ac_executable_extensions; do
13312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13313    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13315    break 2
13316  fi
13317done
13318  done
13319IFS=$as_save_IFS
13320
13321  ;;
13322esac
13323fi
13324EGREP=$ac_cv_path_EGREP
13325if test -n "$EGREP"; then
13326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13327$as_echo "$EGREP" >&6; }
13328else
13329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13330$as_echo "no" >&6; }
13331fi
13332
13333
13334          if test "x$EGREP" = x; then
13335            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13336          fi
13337        else
13338          # Otherwise we believe it is a complete path. Use it as it is.
13339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13340$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13341          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13342$as_echo_n "checking for EGREP... " >&6; }
13343          if test ! -x "$tool_specified"; then
13344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13345$as_echo "not found" >&6; }
13346            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13347          fi
13348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13349$as_echo "$tool_specified" >&6; }
13350        fi
13351      fi
13352    fi
13353
13354  fi
13355
13356
13357  if test "x$EGREP" = x; then
13358    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13359  fi
13360
13361
13362
13363
13364  # Publish this variable in the help.
13365
13366
13367  if [ -z "${FGREP+x}" ]; then
13368    # The variable is not set by user, try to locate tool using the code snippet
13369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13370$as_echo_n "checking for fgrep... " >&6; }
13371if ${ac_cv_path_FGREP+:} false; then :
13372  $as_echo_n "(cached) " >&6
13373else
13374  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13375   then ac_cv_path_FGREP="$GREP -F"
13376   else
13377     if test -z "$FGREP"; then
13378  ac_path_FGREP_found=false
13379  # Loop through the user's path and test for each of PROGNAME-LIST
13380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13381for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13382do
13383  IFS=$as_save_IFS
13384  test -z "$as_dir" && as_dir=.
13385    for ac_prog in fgrep; do
13386    for ac_exec_ext in '' $ac_executable_extensions; do
13387      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13388      as_fn_executable_p "$ac_path_FGREP" || continue
13389# Check for GNU ac_path_FGREP and select it if it is found.
13390  # Check for GNU $ac_path_FGREP
13391case `"$ac_path_FGREP" --version 2>&1` in
13392*GNU*)
13393  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13394*)
13395  ac_count=0
13396  $as_echo_n 0123456789 >"conftest.in"
13397  while :
13398  do
13399    cat "conftest.in" "conftest.in" >"conftest.tmp"
13400    mv "conftest.tmp" "conftest.in"
13401    cp "conftest.in" "conftest.nl"
13402    $as_echo 'FGREP' >> "conftest.nl"
13403    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13404    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13405    as_fn_arith $ac_count + 1 && ac_count=$as_val
13406    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13407      # Best one so far, save it but keep looking for a better one
13408      ac_cv_path_FGREP="$ac_path_FGREP"
13409      ac_path_FGREP_max=$ac_count
13410    fi
13411    # 10*(2^10) chars as input seems more than enough
13412    test $ac_count -gt 10 && break
13413  done
13414  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13415esac
13416
13417      $ac_path_FGREP_found && break 3
13418    done
13419  done
13420  done
13421IFS=$as_save_IFS
13422  if test -z "$ac_cv_path_FGREP"; then
13423    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13424  fi
13425else
13426  ac_cv_path_FGREP=$FGREP
13427fi
13428
13429   fi
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13432$as_echo "$ac_cv_path_FGREP" >&6; }
13433 FGREP="$ac_cv_path_FGREP"
13434
13435
13436  else
13437    # The variable is set, but is it from the command line or the environment?
13438
13439    # Try to remove the string !FGREP! from our list.
13440    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13441    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13442      # If it failed, the variable was not from the command line. Ignore it,
13443      # but warn the user (except for BASH, which is always set by the calling BASH).
13444      if test "xFGREP" != xBASH; then
13445        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13446$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13447      fi
13448      # Try to locate tool using the code snippet
13449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13450$as_echo_n "checking for fgrep... " >&6; }
13451if ${ac_cv_path_FGREP+:} false; then :
13452  $as_echo_n "(cached) " >&6
13453else
13454  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13455   then ac_cv_path_FGREP="$GREP -F"
13456   else
13457     if test -z "$FGREP"; then
13458  ac_path_FGREP_found=false
13459  # Loop through the user's path and test for each of PROGNAME-LIST
13460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13461for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13462do
13463  IFS=$as_save_IFS
13464  test -z "$as_dir" && as_dir=.
13465    for ac_prog in fgrep; do
13466    for ac_exec_ext in '' $ac_executable_extensions; do
13467      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13468      as_fn_executable_p "$ac_path_FGREP" || continue
13469# Check for GNU ac_path_FGREP and select it if it is found.
13470  # Check for GNU $ac_path_FGREP
13471case `"$ac_path_FGREP" --version 2>&1` in
13472*GNU*)
13473  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13474*)
13475  ac_count=0
13476  $as_echo_n 0123456789 >"conftest.in"
13477  while :
13478  do
13479    cat "conftest.in" "conftest.in" >"conftest.tmp"
13480    mv "conftest.tmp" "conftest.in"
13481    cp "conftest.in" "conftest.nl"
13482    $as_echo 'FGREP' >> "conftest.nl"
13483    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13484    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13485    as_fn_arith $ac_count + 1 && ac_count=$as_val
13486    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13487      # Best one so far, save it but keep looking for a better one
13488      ac_cv_path_FGREP="$ac_path_FGREP"
13489      ac_path_FGREP_max=$ac_count
13490    fi
13491    # 10*(2^10) chars as input seems more than enough
13492    test $ac_count -gt 10 && break
13493  done
13494  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13495esac
13496
13497      $ac_path_FGREP_found && break 3
13498    done
13499  done
13500  done
13501IFS=$as_save_IFS
13502  if test -z "$ac_cv_path_FGREP"; then
13503    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13504  fi
13505else
13506  ac_cv_path_FGREP=$FGREP
13507fi
13508
13509   fi
13510fi
13511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13512$as_echo "$ac_cv_path_FGREP" >&6; }
13513 FGREP="$ac_cv_path_FGREP"
13514
13515
13516    else
13517      # If it succeeded, then it was overridden by the user. We will use it
13518      # for the tool.
13519
13520      # First remove it from the list of overridden variables, so we can test
13521      # for unknown variables in the end.
13522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13523
13524      # Check if we try to supply an empty value
13525      if test "x$FGREP" = x; then
13526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13527$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13529$as_echo_n "checking for FGREP... " >&6; }
13530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13531$as_echo "disabled" >&6; }
13532      else
13533        # Check if the provided tool contains a complete path.
13534        tool_specified="$FGREP"
13535        tool_basename="${tool_specified##*/}"
13536        if test "x$tool_basename" = "x$tool_specified"; then
13537          # A command without a complete path is provided, search $PATH.
13538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13539$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13540          # Extract the first word of "$tool_basename", so it can be a program name with args.
13541set dummy $tool_basename; ac_word=$2
13542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13543$as_echo_n "checking for $ac_word... " >&6; }
13544if ${ac_cv_path_FGREP+:} false; then :
13545  $as_echo_n "(cached) " >&6
13546else
13547  case $FGREP in
13548  [\\/]* | ?:[\\/]*)
13549  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13550  ;;
13551  *)
13552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13553for as_dir in $PATH
13554do
13555  IFS=$as_save_IFS
13556  test -z "$as_dir" && as_dir=.
13557    for ac_exec_ext in '' $ac_executable_extensions; do
13558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13559    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13561    break 2
13562  fi
13563done
13564  done
13565IFS=$as_save_IFS
13566
13567  ;;
13568esac
13569fi
13570FGREP=$ac_cv_path_FGREP
13571if test -n "$FGREP"; then
13572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13573$as_echo "$FGREP" >&6; }
13574else
13575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13576$as_echo "no" >&6; }
13577fi
13578
13579
13580          if test "x$FGREP" = x; then
13581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13582          fi
13583        else
13584          # Otherwise we believe it is a complete path. Use it as it is.
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13586$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13588$as_echo_n "checking for FGREP... " >&6; }
13589          if test ! -x "$tool_specified"; then
13590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13591$as_echo "not found" >&6; }
13592            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13593          fi
13594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13595$as_echo "$tool_specified" >&6; }
13596        fi
13597      fi
13598    fi
13599
13600  fi
13601
13602
13603  if test "x$FGREP" = x; then
13604    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13605  fi
13606
13607
13608
13609
13610  # Publish this variable in the help.
13611
13612
13613  if [ -z "${SED+x}" ]; then
13614    # The variable is not set by user, try to locate tool using the code snippet
13615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13616$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13617if ${ac_cv_path_SED+:} false; then :
13618  $as_echo_n "(cached) " >&6
13619else
13620            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13621     for ac_i in 1 2 3 4 5 6 7; do
13622       ac_script="$ac_script$as_nl$ac_script"
13623     done
13624     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13625     { ac_script=; unset ac_script;}
13626     if test -z "$SED"; then
13627  ac_path_SED_found=false
13628  # Loop through the user's path and test for each of PROGNAME-LIST
13629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13630for as_dir in $PATH
13631do
13632  IFS=$as_save_IFS
13633  test -z "$as_dir" && as_dir=.
13634    for ac_prog in sed gsed; do
13635    for ac_exec_ext in '' $ac_executable_extensions; do
13636      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13637      as_fn_executable_p "$ac_path_SED" || continue
13638# Check for GNU ac_path_SED and select it if it is found.
13639  # Check for GNU $ac_path_SED
13640case `"$ac_path_SED" --version 2>&1` in
13641*GNU*)
13642  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13643*)
13644  ac_count=0
13645  $as_echo_n 0123456789 >"conftest.in"
13646  while :
13647  do
13648    cat "conftest.in" "conftest.in" >"conftest.tmp"
13649    mv "conftest.tmp" "conftest.in"
13650    cp "conftest.in" "conftest.nl"
13651    $as_echo '' >> "conftest.nl"
13652    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13653    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13654    as_fn_arith $ac_count + 1 && ac_count=$as_val
13655    if test $ac_count -gt ${ac_path_SED_max-0}; then
13656      # Best one so far, save it but keep looking for a better one
13657      ac_cv_path_SED="$ac_path_SED"
13658      ac_path_SED_max=$ac_count
13659    fi
13660    # 10*(2^10) chars as input seems more than enough
13661    test $ac_count -gt 10 && break
13662  done
13663  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13664esac
13665
13666      $ac_path_SED_found && break 3
13667    done
13668  done
13669  done
13670IFS=$as_save_IFS
13671  if test -z "$ac_cv_path_SED"; then
13672    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13673  fi
13674else
13675  ac_cv_path_SED=$SED
13676fi
13677
13678fi
13679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13680$as_echo "$ac_cv_path_SED" >&6; }
13681 SED="$ac_cv_path_SED"
13682  rm -f conftest.sed
13683
13684  else
13685    # The variable is set, but is it from the command line or the environment?
13686
13687    # Try to remove the string !SED! from our list.
13688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13690      # If it failed, the variable was not from the command line. Ignore it,
13691      # but warn the user (except for BASH, which is always set by the calling BASH).
13692      if test "xSED" != xBASH; then
13693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13694$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13695      fi
13696      # Try to locate tool using the code snippet
13697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13698$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13699if ${ac_cv_path_SED+:} false; then :
13700  $as_echo_n "(cached) " >&6
13701else
13702            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13703     for ac_i in 1 2 3 4 5 6 7; do
13704       ac_script="$ac_script$as_nl$ac_script"
13705     done
13706     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13707     { ac_script=; unset ac_script;}
13708     if test -z "$SED"; then
13709  ac_path_SED_found=false
13710  # Loop through the user's path and test for each of PROGNAME-LIST
13711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13712for as_dir in $PATH
13713do
13714  IFS=$as_save_IFS
13715  test -z "$as_dir" && as_dir=.
13716    for ac_prog in sed gsed; do
13717    for ac_exec_ext in '' $ac_executable_extensions; do
13718      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13719      as_fn_executable_p "$ac_path_SED" || continue
13720# Check for GNU ac_path_SED and select it if it is found.
13721  # Check for GNU $ac_path_SED
13722case `"$ac_path_SED" --version 2>&1` in
13723*GNU*)
13724  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13725*)
13726  ac_count=0
13727  $as_echo_n 0123456789 >"conftest.in"
13728  while :
13729  do
13730    cat "conftest.in" "conftest.in" >"conftest.tmp"
13731    mv "conftest.tmp" "conftest.in"
13732    cp "conftest.in" "conftest.nl"
13733    $as_echo '' >> "conftest.nl"
13734    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13735    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13736    as_fn_arith $ac_count + 1 && ac_count=$as_val
13737    if test $ac_count -gt ${ac_path_SED_max-0}; then
13738      # Best one so far, save it but keep looking for a better one
13739      ac_cv_path_SED="$ac_path_SED"
13740      ac_path_SED_max=$ac_count
13741    fi
13742    # 10*(2^10) chars as input seems more than enough
13743    test $ac_count -gt 10 && break
13744  done
13745  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13746esac
13747
13748      $ac_path_SED_found && break 3
13749    done
13750  done
13751  done
13752IFS=$as_save_IFS
13753  if test -z "$ac_cv_path_SED"; then
13754    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13755  fi
13756else
13757  ac_cv_path_SED=$SED
13758fi
13759
13760fi
13761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13762$as_echo "$ac_cv_path_SED" >&6; }
13763 SED="$ac_cv_path_SED"
13764  rm -f conftest.sed
13765
13766    else
13767      # If it succeeded, then it was overridden by the user. We will use it
13768      # for the tool.
13769
13770      # First remove it from the list of overridden variables, so we can test
13771      # for unknown variables in the end.
13772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13773
13774      # Check if we try to supply an empty value
13775      if test "x$SED" = x; then
13776        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13777$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13779$as_echo_n "checking for SED... " >&6; }
13780        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13781$as_echo "disabled" >&6; }
13782      else
13783        # Check if the provided tool contains a complete path.
13784        tool_specified="$SED"
13785        tool_basename="${tool_specified##*/}"
13786        if test "x$tool_basename" = "x$tool_specified"; then
13787          # A command without a complete path is provided, search $PATH.
13788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13789$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13790          # Extract the first word of "$tool_basename", so it can be a program name with args.
13791set dummy $tool_basename; ac_word=$2
13792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13793$as_echo_n "checking for $ac_word... " >&6; }
13794if ${ac_cv_path_SED+:} false; then :
13795  $as_echo_n "(cached) " >&6
13796else
13797  case $SED in
13798  [\\/]* | ?:[\\/]*)
13799  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13800  ;;
13801  *)
13802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13803for as_dir in $PATH
13804do
13805  IFS=$as_save_IFS
13806  test -z "$as_dir" && as_dir=.
13807    for ac_exec_ext in '' $ac_executable_extensions; do
13808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13809    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13811    break 2
13812  fi
13813done
13814  done
13815IFS=$as_save_IFS
13816
13817  ;;
13818esac
13819fi
13820SED=$ac_cv_path_SED
13821if test -n "$SED"; then
13822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13823$as_echo "$SED" >&6; }
13824else
13825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13826$as_echo "no" >&6; }
13827fi
13828
13829
13830          if test "x$SED" = x; then
13831            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13832          fi
13833        else
13834          # Otherwise we believe it is a complete path. Use it as it is.
13835          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13836$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13837          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13838$as_echo_n "checking for SED... " >&6; }
13839          if test ! -x "$tool_specified"; then
13840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13841$as_echo "not found" >&6; }
13842            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13843          fi
13844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13845$as_echo "$tool_specified" >&6; }
13846        fi
13847      fi
13848    fi
13849
13850  fi
13851
13852
13853  if test "x$SED" = x; then
13854    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13855  fi
13856
13857
13858
13859  # Always force rm.
13860  RM="$RM -f"
13861
13862  # pwd behaves differently on various platforms and some don't support the -L flag.
13863  # Always use the bash builtin pwd to get uniform behavior.
13864  THEPWDCMD=pwd
13865
13866  # These are not required on all platforms
13867
13868
13869  # Publish this variable in the help.
13870
13871
13872  if [ -z "${CYGPATH+x}" ]; then
13873    # The variable is not set by user, try to locate tool using the code snippet
13874    for ac_prog in cygpath
13875do
13876  # Extract the first word of "$ac_prog", so it can be a program name with args.
13877set dummy $ac_prog; ac_word=$2
13878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13879$as_echo_n "checking for $ac_word... " >&6; }
13880if ${ac_cv_path_CYGPATH+:} false; then :
13881  $as_echo_n "(cached) " >&6
13882else
13883  case $CYGPATH in
13884  [\\/]* | ?:[\\/]*)
13885  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13886  ;;
13887  *)
13888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13889for as_dir in $PATH
13890do
13891  IFS=$as_save_IFS
13892  test -z "$as_dir" && as_dir=.
13893    for ac_exec_ext in '' $ac_executable_extensions; do
13894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13895    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13897    break 2
13898  fi
13899done
13900  done
13901IFS=$as_save_IFS
13902
13903  ;;
13904esac
13905fi
13906CYGPATH=$ac_cv_path_CYGPATH
13907if test -n "$CYGPATH"; then
13908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13909$as_echo "$CYGPATH" >&6; }
13910else
13911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13912$as_echo "no" >&6; }
13913fi
13914
13915
13916  test -n "$CYGPATH" && break
13917done
13918
13919  else
13920    # The variable is set, but is it from the command line or the environment?
13921
13922    # Try to remove the string !CYGPATH! from our list.
13923    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13924    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13925      # If it failed, the variable was not from the command line. Ignore it,
13926      # but warn the user (except for BASH, which is always set by the calling BASH).
13927      if test "xCYGPATH" != xBASH; then
13928        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13929$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13930      fi
13931      # Try to locate tool using the code snippet
13932      for ac_prog in cygpath
13933do
13934  # Extract the first word of "$ac_prog", so it can be a program name with args.
13935set dummy $ac_prog; ac_word=$2
13936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13937$as_echo_n "checking for $ac_word... " >&6; }
13938if ${ac_cv_path_CYGPATH+:} false; then :
13939  $as_echo_n "(cached) " >&6
13940else
13941  case $CYGPATH in
13942  [\\/]* | ?:[\\/]*)
13943  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13944  ;;
13945  *)
13946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13947for as_dir in $PATH
13948do
13949  IFS=$as_save_IFS
13950  test -z "$as_dir" && as_dir=.
13951    for ac_exec_ext in '' $ac_executable_extensions; do
13952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13953    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13955    break 2
13956  fi
13957done
13958  done
13959IFS=$as_save_IFS
13960
13961  ;;
13962esac
13963fi
13964CYGPATH=$ac_cv_path_CYGPATH
13965if test -n "$CYGPATH"; then
13966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13967$as_echo "$CYGPATH" >&6; }
13968else
13969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13970$as_echo "no" >&6; }
13971fi
13972
13973
13974  test -n "$CYGPATH" && break
13975done
13976
13977    else
13978      # If it succeeded, then it was overridden by the user. We will use it
13979      # for the tool.
13980
13981      # First remove it from the list of overridden variables, so we can test
13982      # for unknown variables in the end.
13983      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13984
13985      # Check if we try to supply an empty value
13986      if test "x$CYGPATH" = x; then
13987        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13988$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13989        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13990$as_echo_n "checking for CYGPATH... " >&6; }
13991        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13992$as_echo "disabled" >&6; }
13993      else
13994        # Check if the provided tool contains a complete path.
13995        tool_specified="$CYGPATH"
13996        tool_basename="${tool_specified##*/}"
13997        if test "x$tool_basename" = "x$tool_specified"; then
13998          # A command without a complete path is provided, search $PATH.
13999          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14000$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14001          # Extract the first word of "$tool_basename", so it can be a program name with args.
14002set dummy $tool_basename; ac_word=$2
14003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14004$as_echo_n "checking for $ac_word... " >&6; }
14005if ${ac_cv_path_CYGPATH+:} false; then :
14006  $as_echo_n "(cached) " >&6
14007else
14008  case $CYGPATH in
14009  [\\/]* | ?:[\\/]*)
14010  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14011  ;;
14012  *)
14013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14014for as_dir in $PATH
14015do
14016  IFS=$as_save_IFS
14017  test -z "$as_dir" && as_dir=.
14018    for ac_exec_ext in '' $ac_executable_extensions; do
14019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14020    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14022    break 2
14023  fi
14024done
14025  done
14026IFS=$as_save_IFS
14027
14028  ;;
14029esac
14030fi
14031CYGPATH=$ac_cv_path_CYGPATH
14032if test -n "$CYGPATH"; then
14033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14034$as_echo "$CYGPATH" >&6; }
14035else
14036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14037$as_echo "no" >&6; }
14038fi
14039
14040
14041          if test "x$CYGPATH" = x; then
14042            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14043          fi
14044        else
14045          # Otherwise we believe it is a complete path. Use it as it is.
14046          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14047$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14048          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14049$as_echo_n "checking for CYGPATH... " >&6; }
14050          if test ! -x "$tool_specified"; then
14051            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14052$as_echo "not found" >&6; }
14053            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14054          fi
14055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14056$as_echo "$tool_specified" >&6; }
14057        fi
14058      fi
14059    fi
14060
14061  fi
14062
14063
14064
14065
14066  # Publish this variable in the help.
14067
14068
14069  if [ -z "${READLINK+x}" ]; then
14070    # The variable is not set by user, try to locate tool using the code snippet
14071    for ac_prog in greadlink readlink
14072do
14073  # Extract the first word of "$ac_prog", so it can be a program name with args.
14074set dummy $ac_prog; ac_word=$2
14075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14076$as_echo_n "checking for $ac_word... " >&6; }
14077if ${ac_cv_path_READLINK+:} false; then :
14078  $as_echo_n "(cached) " >&6
14079else
14080  case $READLINK in
14081  [\\/]* | ?:[\\/]*)
14082  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14083  ;;
14084  *)
14085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14086for as_dir in $PATH
14087do
14088  IFS=$as_save_IFS
14089  test -z "$as_dir" && as_dir=.
14090    for ac_exec_ext in '' $ac_executable_extensions; do
14091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14092    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14094    break 2
14095  fi
14096done
14097  done
14098IFS=$as_save_IFS
14099
14100  ;;
14101esac
14102fi
14103READLINK=$ac_cv_path_READLINK
14104if test -n "$READLINK"; then
14105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14106$as_echo "$READLINK" >&6; }
14107else
14108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14109$as_echo "no" >&6; }
14110fi
14111
14112
14113  test -n "$READLINK" && break
14114done
14115
14116  else
14117    # The variable is set, but is it from the command line or the environment?
14118
14119    # Try to remove the string !READLINK! from our list.
14120    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14121    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122      # If it failed, the variable was not from the command line. Ignore it,
14123      # but warn the user (except for BASH, which is always set by the calling BASH).
14124      if test "xREADLINK" != xBASH; then
14125        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14126$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14127      fi
14128      # Try to locate tool using the code snippet
14129      for ac_prog in greadlink readlink
14130do
14131  # Extract the first word of "$ac_prog", so it can be a program name with args.
14132set dummy $ac_prog; ac_word=$2
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14134$as_echo_n "checking for $ac_word... " >&6; }
14135if ${ac_cv_path_READLINK+:} false; then :
14136  $as_echo_n "(cached) " >&6
14137else
14138  case $READLINK in
14139  [\\/]* | ?:[\\/]*)
14140  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14141  ;;
14142  *)
14143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144for as_dir in $PATH
14145do
14146  IFS=$as_save_IFS
14147  test -z "$as_dir" && as_dir=.
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14150    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14152    break 2
14153  fi
14154done
14155  done
14156IFS=$as_save_IFS
14157
14158  ;;
14159esac
14160fi
14161READLINK=$ac_cv_path_READLINK
14162if test -n "$READLINK"; then
14163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14164$as_echo "$READLINK" >&6; }
14165else
14166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14167$as_echo "no" >&6; }
14168fi
14169
14170
14171  test -n "$READLINK" && break
14172done
14173
14174    else
14175      # If it succeeded, then it was overridden by the user. We will use it
14176      # for the tool.
14177
14178      # First remove it from the list of overridden variables, so we can test
14179      # for unknown variables in the end.
14180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14181
14182      # Check if we try to supply an empty value
14183      if test "x$READLINK" = x; then
14184        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14185$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14187$as_echo_n "checking for READLINK... " >&6; }
14188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14189$as_echo "disabled" >&6; }
14190      else
14191        # Check if the provided tool contains a complete path.
14192        tool_specified="$READLINK"
14193        tool_basename="${tool_specified##*/}"
14194        if test "x$tool_basename" = "x$tool_specified"; then
14195          # A command without a complete path is provided, search $PATH.
14196          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14197$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14198          # Extract the first word of "$tool_basename", so it can be a program name with args.
14199set dummy $tool_basename; ac_word=$2
14200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14201$as_echo_n "checking for $ac_word... " >&6; }
14202if ${ac_cv_path_READLINK+:} false; then :
14203  $as_echo_n "(cached) " >&6
14204else
14205  case $READLINK in
14206  [\\/]* | ?:[\\/]*)
14207  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14208  ;;
14209  *)
14210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14211for as_dir in $PATH
14212do
14213  IFS=$as_save_IFS
14214  test -z "$as_dir" && as_dir=.
14215    for ac_exec_ext in '' $ac_executable_extensions; do
14216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14217    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14219    break 2
14220  fi
14221done
14222  done
14223IFS=$as_save_IFS
14224
14225  ;;
14226esac
14227fi
14228READLINK=$ac_cv_path_READLINK
14229if test -n "$READLINK"; then
14230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14231$as_echo "$READLINK" >&6; }
14232else
14233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14234$as_echo "no" >&6; }
14235fi
14236
14237
14238          if test "x$READLINK" = x; then
14239            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14240          fi
14241        else
14242          # Otherwise we believe it is a complete path. Use it as it is.
14243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14244$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14245          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14246$as_echo_n "checking for READLINK... " >&6; }
14247          if test ! -x "$tool_specified"; then
14248            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14249$as_echo "not found" >&6; }
14250            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14251          fi
14252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14253$as_echo "$tool_specified" >&6; }
14254        fi
14255      fi
14256    fi
14257
14258  fi
14259
14260
14261
14262
14263  # Publish this variable in the help.
14264
14265
14266  if [ -z "${DF+x}" ]; then
14267    # The variable is not set by user, try to locate tool using the code snippet
14268    for ac_prog in df
14269do
14270  # Extract the first word of "$ac_prog", so it can be a program name with args.
14271set dummy $ac_prog; ac_word=$2
14272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14273$as_echo_n "checking for $ac_word... " >&6; }
14274if ${ac_cv_path_DF+:} false; then :
14275  $as_echo_n "(cached) " >&6
14276else
14277  case $DF in
14278  [\\/]* | ?:[\\/]*)
14279  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14280  ;;
14281  *)
14282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14283for as_dir in $PATH
14284do
14285  IFS=$as_save_IFS
14286  test -z "$as_dir" && as_dir=.
14287    for ac_exec_ext in '' $ac_executable_extensions; do
14288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14289    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14291    break 2
14292  fi
14293done
14294  done
14295IFS=$as_save_IFS
14296
14297  ;;
14298esac
14299fi
14300DF=$ac_cv_path_DF
14301if test -n "$DF"; then
14302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14303$as_echo "$DF" >&6; }
14304else
14305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14306$as_echo "no" >&6; }
14307fi
14308
14309
14310  test -n "$DF" && break
14311done
14312
14313  else
14314    # The variable is set, but is it from the command line or the environment?
14315
14316    # Try to remove the string !DF! from our list.
14317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14319      # If it failed, the variable was not from the command line. Ignore it,
14320      # but warn the user (except for BASH, which is always set by the calling BASH).
14321      if test "xDF" != xBASH; then
14322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14323$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14324      fi
14325      # Try to locate tool using the code snippet
14326      for ac_prog in df
14327do
14328  # Extract the first word of "$ac_prog", so it can be a program name with args.
14329set dummy $ac_prog; ac_word=$2
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14331$as_echo_n "checking for $ac_word... " >&6; }
14332if ${ac_cv_path_DF+:} false; then :
14333  $as_echo_n "(cached) " >&6
14334else
14335  case $DF in
14336  [\\/]* | ?:[\\/]*)
14337  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14338  ;;
14339  *)
14340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14341for as_dir in $PATH
14342do
14343  IFS=$as_save_IFS
14344  test -z "$as_dir" && as_dir=.
14345    for ac_exec_ext in '' $ac_executable_extensions; do
14346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14347    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14349    break 2
14350  fi
14351done
14352  done
14353IFS=$as_save_IFS
14354
14355  ;;
14356esac
14357fi
14358DF=$ac_cv_path_DF
14359if test -n "$DF"; then
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14361$as_echo "$DF" >&6; }
14362else
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14364$as_echo "no" >&6; }
14365fi
14366
14367
14368  test -n "$DF" && break
14369done
14370
14371    else
14372      # If it succeeded, then it was overridden by the user. We will use it
14373      # for the tool.
14374
14375      # First remove it from the list of overridden variables, so we can test
14376      # for unknown variables in the end.
14377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14378
14379      # Check if we try to supply an empty value
14380      if test "x$DF" = x; then
14381        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14382$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14384$as_echo_n "checking for DF... " >&6; }
14385        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14386$as_echo "disabled" >&6; }
14387      else
14388        # Check if the provided tool contains a complete path.
14389        tool_specified="$DF"
14390        tool_basename="${tool_specified##*/}"
14391        if test "x$tool_basename" = "x$tool_specified"; then
14392          # A command without a complete path is provided, search $PATH.
14393          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14394$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14395          # Extract the first word of "$tool_basename", so it can be a program name with args.
14396set dummy $tool_basename; ac_word=$2
14397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14398$as_echo_n "checking for $ac_word... " >&6; }
14399if ${ac_cv_path_DF+:} false; then :
14400  $as_echo_n "(cached) " >&6
14401else
14402  case $DF in
14403  [\\/]* | ?:[\\/]*)
14404  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14405  ;;
14406  *)
14407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14408for as_dir in $PATH
14409do
14410  IFS=$as_save_IFS
14411  test -z "$as_dir" && as_dir=.
14412    for ac_exec_ext in '' $ac_executable_extensions; do
14413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14414    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14416    break 2
14417  fi
14418done
14419  done
14420IFS=$as_save_IFS
14421
14422  ;;
14423esac
14424fi
14425DF=$ac_cv_path_DF
14426if test -n "$DF"; then
14427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14428$as_echo "$DF" >&6; }
14429else
14430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14431$as_echo "no" >&6; }
14432fi
14433
14434
14435          if test "x$DF" = x; then
14436            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14437          fi
14438        else
14439          # Otherwise we believe it is a complete path. Use it as it is.
14440          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14441$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14442          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14443$as_echo_n "checking for DF... " >&6; }
14444          if test ! -x "$tool_specified"; then
14445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14446$as_echo "not found" >&6; }
14447            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14448          fi
14449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14450$as_echo "$tool_specified" >&6; }
14451        fi
14452      fi
14453    fi
14454
14455  fi
14456
14457
14458
14459
14460  # Publish this variable in the help.
14461
14462
14463  if [ -z "${CPIO+x}" ]; then
14464    # The variable is not set by user, try to locate tool using the code snippet
14465    for ac_prog in cpio bsdcpio
14466do
14467  # Extract the first word of "$ac_prog", so it can be a program name with args.
14468set dummy $ac_prog; ac_word=$2
14469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14470$as_echo_n "checking for $ac_word... " >&6; }
14471if ${ac_cv_path_CPIO+:} false; then :
14472  $as_echo_n "(cached) " >&6
14473else
14474  case $CPIO in
14475  [\\/]* | ?:[\\/]*)
14476  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14477  ;;
14478  *)
14479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14480for as_dir in $PATH
14481do
14482  IFS=$as_save_IFS
14483  test -z "$as_dir" && as_dir=.
14484    for ac_exec_ext in '' $ac_executable_extensions; do
14485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14486    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14488    break 2
14489  fi
14490done
14491  done
14492IFS=$as_save_IFS
14493
14494  ;;
14495esac
14496fi
14497CPIO=$ac_cv_path_CPIO
14498if test -n "$CPIO"; then
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14500$as_echo "$CPIO" >&6; }
14501else
14502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14503$as_echo "no" >&6; }
14504fi
14505
14506
14507  test -n "$CPIO" && break
14508done
14509
14510  else
14511    # The variable is set, but is it from the command line or the environment?
14512
14513    # Try to remove the string !CPIO! from our list.
14514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14516      # If it failed, the variable was not from the command line. Ignore it,
14517      # but warn the user (except for BASH, which is always set by the calling BASH).
14518      if test "xCPIO" != xBASH; then
14519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14520$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14521      fi
14522      # Try to locate tool using the code snippet
14523      for ac_prog in cpio bsdcpio
14524do
14525  # Extract the first word of "$ac_prog", so it can be a program name with args.
14526set dummy $ac_prog; ac_word=$2
14527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14528$as_echo_n "checking for $ac_word... " >&6; }
14529if ${ac_cv_path_CPIO+:} false; then :
14530  $as_echo_n "(cached) " >&6
14531else
14532  case $CPIO in
14533  [\\/]* | ?:[\\/]*)
14534  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14535  ;;
14536  *)
14537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14538for as_dir in $PATH
14539do
14540  IFS=$as_save_IFS
14541  test -z "$as_dir" && as_dir=.
14542    for ac_exec_ext in '' $ac_executable_extensions; do
14543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14544    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14546    break 2
14547  fi
14548done
14549  done
14550IFS=$as_save_IFS
14551
14552  ;;
14553esac
14554fi
14555CPIO=$ac_cv_path_CPIO
14556if test -n "$CPIO"; then
14557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14558$as_echo "$CPIO" >&6; }
14559else
14560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14561$as_echo "no" >&6; }
14562fi
14563
14564
14565  test -n "$CPIO" && break
14566done
14567
14568    else
14569      # If it succeeded, then it was overridden by the user. We will use it
14570      # for the tool.
14571
14572      # First remove it from the list of overridden variables, so we can test
14573      # for unknown variables in the end.
14574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14575
14576      # Check if we try to supply an empty value
14577      if test "x$CPIO" = x; then
14578        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14579$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14581$as_echo_n "checking for CPIO... " >&6; }
14582        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14583$as_echo "disabled" >&6; }
14584      else
14585        # Check if the provided tool contains a complete path.
14586        tool_specified="$CPIO"
14587        tool_basename="${tool_specified##*/}"
14588        if test "x$tool_basename" = "x$tool_specified"; then
14589          # A command without a complete path is provided, search $PATH.
14590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14591$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14592          # Extract the first word of "$tool_basename", so it can be a program name with args.
14593set dummy $tool_basename; ac_word=$2
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14595$as_echo_n "checking for $ac_word... " >&6; }
14596if ${ac_cv_path_CPIO+:} false; then :
14597  $as_echo_n "(cached) " >&6
14598else
14599  case $CPIO in
14600  [\\/]* | ?:[\\/]*)
14601  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14602  ;;
14603  *)
14604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14605for as_dir in $PATH
14606do
14607  IFS=$as_save_IFS
14608  test -z "$as_dir" && as_dir=.
14609    for ac_exec_ext in '' $ac_executable_extensions; do
14610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14611    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14613    break 2
14614  fi
14615done
14616  done
14617IFS=$as_save_IFS
14618
14619  ;;
14620esac
14621fi
14622CPIO=$ac_cv_path_CPIO
14623if test -n "$CPIO"; then
14624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14625$as_echo "$CPIO" >&6; }
14626else
14627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14628$as_echo "no" >&6; }
14629fi
14630
14631
14632          if test "x$CPIO" = x; then
14633            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14634          fi
14635        else
14636          # Otherwise we believe it is a complete path. Use it as it is.
14637          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14638$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14639          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14640$as_echo_n "checking for CPIO... " >&6; }
14641          if test ! -x "$tool_specified"; then
14642            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14643$as_echo "not found" >&6; }
14644            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14645          fi
14646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14647$as_echo "$tool_specified" >&6; }
14648        fi
14649      fi
14650    fi
14651
14652  fi
14653
14654
14655
14656
14657  # Publish this variable in the help.
14658
14659
14660  if [ -z "${NICE+x}" ]; then
14661    # The variable is not set by user, try to locate tool using the code snippet
14662    for ac_prog in nice
14663do
14664  # Extract the first word of "$ac_prog", so it can be a program name with args.
14665set dummy $ac_prog; ac_word=$2
14666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14667$as_echo_n "checking for $ac_word... " >&6; }
14668if ${ac_cv_path_NICE+:} false; then :
14669  $as_echo_n "(cached) " >&6
14670else
14671  case $NICE in
14672  [\\/]* | ?:[\\/]*)
14673  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14674  ;;
14675  *)
14676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14677for as_dir in $PATH
14678do
14679  IFS=$as_save_IFS
14680  test -z "$as_dir" && as_dir=.
14681    for ac_exec_ext in '' $ac_executable_extensions; do
14682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14683    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14685    break 2
14686  fi
14687done
14688  done
14689IFS=$as_save_IFS
14690
14691  ;;
14692esac
14693fi
14694NICE=$ac_cv_path_NICE
14695if test -n "$NICE"; then
14696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14697$as_echo "$NICE" >&6; }
14698else
14699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14700$as_echo "no" >&6; }
14701fi
14702
14703
14704  test -n "$NICE" && break
14705done
14706
14707  else
14708    # The variable is set, but is it from the command line or the environment?
14709
14710    # Try to remove the string !NICE! from our list.
14711    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14712    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14713      # If it failed, the variable was not from the command line. Ignore it,
14714      # but warn the user (except for BASH, which is always set by the calling BASH).
14715      if test "xNICE" != xBASH; then
14716        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14717$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14718      fi
14719      # Try to locate tool using the code snippet
14720      for ac_prog in nice
14721do
14722  # Extract the first word of "$ac_prog", so it can be a program name with args.
14723set dummy $ac_prog; ac_word=$2
14724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14725$as_echo_n "checking for $ac_word... " >&6; }
14726if ${ac_cv_path_NICE+:} false; then :
14727  $as_echo_n "(cached) " >&6
14728else
14729  case $NICE in
14730  [\\/]* | ?:[\\/]*)
14731  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14732  ;;
14733  *)
14734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14735for as_dir in $PATH
14736do
14737  IFS=$as_save_IFS
14738  test -z "$as_dir" && as_dir=.
14739    for ac_exec_ext in '' $ac_executable_extensions; do
14740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14741    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14743    break 2
14744  fi
14745done
14746  done
14747IFS=$as_save_IFS
14748
14749  ;;
14750esac
14751fi
14752NICE=$ac_cv_path_NICE
14753if test -n "$NICE"; then
14754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14755$as_echo "$NICE" >&6; }
14756else
14757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14758$as_echo "no" >&6; }
14759fi
14760
14761
14762  test -n "$NICE" && break
14763done
14764
14765    else
14766      # If it succeeded, then it was overridden by the user. We will use it
14767      # for the tool.
14768
14769      # First remove it from the list of overridden variables, so we can test
14770      # for unknown variables in the end.
14771      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14772
14773      # Check if we try to supply an empty value
14774      if test "x$NICE" = x; then
14775        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14776$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14777        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14778$as_echo_n "checking for NICE... " >&6; }
14779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14780$as_echo "disabled" >&6; }
14781      else
14782        # Check if the provided tool contains a complete path.
14783        tool_specified="$NICE"
14784        tool_basename="${tool_specified##*/}"
14785        if test "x$tool_basename" = "x$tool_specified"; then
14786          # A command without a complete path is provided, search $PATH.
14787          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14788$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14789          # Extract the first word of "$tool_basename", so it can be a program name with args.
14790set dummy $tool_basename; ac_word=$2
14791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14792$as_echo_n "checking for $ac_word... " >&6; }
14793if ${ac_cv_path_NICE+:} false; then :
14794  $as_echo_n "(cached) " >&6
14795else
14796  case $NICE in
14797  [\\/]* | ?:[\\/]*)
14798  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14799  ;;
14800  *)
14801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14802for as_dir in $PATH
14803do
14804  IFS=$as_save_IFS
14805  test -z "$as_dir" && as_dir=.
14806    for ac_exec_ext in '' $ac_executable_extensions; do
14807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14808    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14810    break 2
14811  fi
14812done
14813  done
14814IFS=$as_save_IFS
14815
14816  ;;
14817esac
14818fi
14819NICE=$ac_cv_path_NICE
14820if test -n "$NICE"; then
14821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14822$as_echo "$NICE" >&6; }
14823else
14824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825$as_echo "no" >&6; }
14826fi
14827
14828
14829          if test "x$NICE" = x; then
14830            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14831          fi
14832        else
14833          # Otherwise we believe it is a complete path. Use it as it is.
14834          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14835$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14836          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14837$as_echo_n "checking for NICE... " >&6; }
14838          if test ! -x "$tool_specified"; then
14839            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14840$as_echo "not found" >&6; }
14841            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14842          fi
14843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14844$as_echo "$tool_specified" >&6; }
14845        fi
14846      fi
14847    fi
14848
14849  fi
14850
14851
14852
14853
14854# Now we can determine OpenJDK build and target platforms. This is required to
14855# have early on.
14856# Make sure we can run config.sub.
14857$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14858  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14859
14860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14861$as_echo_n "checking build system type... " >&6; }
14862if ${ac_cv_build+:} false; then :
14863  $as_echo_n "(cached) " >&6
14864else
14865  ac_build_alias=$build_alias
14866test "x$ac_build_alias" = x &&
14867  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14868test "x$ac_build_alias" = x &&
14869  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14870ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14871  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14872
14873fi
14874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14875$as_echo "$ac_cv_build" >&6; }
14876case $ac_cv_build in
14877*-*-*) ;;
14878*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14879esac
14880build=$ac_cv_build
14881ac_save_IFS=$IFS; IFS='-'
14882set x $ac_cv_build
14883shift
14884build_cpu=$1
14885build_vendor=$2
14886shift; shift
14887# Remember, the first character of IFS is used to create $*,
14888# except with old shells:
14889build_os=$*
14890IFS=$ac_save_IFS
14891case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14892
14893
14894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14895$as_echo_n "checking host system type... " >&6; }
14896if ${ac_cv_host+:} false; then :
14897  $as_echo_n "(cached) " >&6
14898else
14899  if test "x$host_alias" = x; then
14900  ac_cv_host=$ac_cv_build
14901else
14902  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14903    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14904fi
14905
14906fi
14907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14908$as_echo "$ac_cv_host" >&6; }
14909case $ac_cv_host in
14910*-*-*) ;;
14911*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14912esac
14913host=$ac_cv_host
14914ac_save_IFS=$IFS; IFS='-'
14915set x $ac_cv_host
14916shift
14917host_cpu=$1
14918host_vendor=$2
14919shift; shift
14920# Remember, the first character of IFS is used to create $*,
14921# except with old shells:
14922host_os=$*
14923IFS=$ac_save_IFS
14924case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14925
14926
14927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14928$as_echo_n "checking target system type... " >&6; }
14929if ${ac_cv_target+:} false; then :
14930  $as_echo_n "(cached) " >&6
14931else
14932  if test "x$target_alias" = x; then
14933  ac_cv_target=$ac_cv_host
14934else
14935  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14936    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14937fi
14938
14939fi
14940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14941$as_echo "$ac_cv_target" >&6; }
14942case $ac_cv_target in
14943*-*-*) ;;
14944*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14945esac
14946target=$ac_cv_target
14947ac_save_IFS=$IFS; IFS='-'
14948set x $ac_cv_target
14949shift
14950target_cpu=$1
14951target_vendor=$2
14952shift; shift
14953# Remember, the first character of IFS is used to create $*,
14954# except with old shells:
14955target_os=$*
14956IFS=$ac_save_IFS
14957case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14958
14959
14960# The aliases save the names the user supplied, while $host etc.
14961# will get canonicalized.
14962test -n "$target_alias" &&
14963  test "$program_prefix$program_suffix$program_transform_name" = \
14964    NONENONEs,x,x, &&
14965  program_prefix=${target_alias}-
14966
14967  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14968  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14969  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14970  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14971  # to use the configure naming style.
14972
14973
14974
14975
14976
14977  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14978  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14979  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14980  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14981  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14982  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14983
14984
14985
14986  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14987
14988  case "$build_os" in
14989    *linux*)
14990      VAR_OS=linux
14991      VAR_OS_TYPE=unix
14992      ;;
14993    *solaris*)
14994      VAR_OS=solaris
14995      VAR_OS_TYPE=unix
14996      ;;
14997    *darwin*)
14998      VAR_OS=macosx
14999      VAR_OS_TYPE=unix
15000      ;;
15001    *bsd*)
15002      VAR_OS=bsd
15003      VAR_OS_TYPE=unix
15004      ;;
15005    *cygwin*)
15006      VAR_OS=windows
15007      VAR_OS_ENV=windows.cygwin
15008      ;;
15009    *mingw*)
15010      VAR_OS=windows
15011      VAR_OS_ENV=windows.msys
15012      ;;
15013    *aix*)
15014      VAR_OS=aix
15015      VAR_OS_TYPE=unix
15016      ;;
15017    *)
15018      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15019      ;;
15020  esac
15021
15022
15023  # First argument is the cpu name from the trip/quad
15024  case "$build_cpu" in
15025    x86_64)
15026      VAR_CPU=x86_64
15027      VAR_CPU_ARCH=x86
15028      VAR_CPU_BITS=64
15029      VAR_CPU_ENDIAN=little
15030      ;;
15031    i?86)
15032      VAR_CPU=x86
15033      VAR_CPU_ARCH=x86
15034      VAR_CPU_BITS=32
15035      VAR_CPU_ENDIAN=little
15036      ;;
15037    arm*)
15038      VAR_CPU=arm
15039      VAR_CPU_ARCH=arm
15040      VAR_CPU_BITS=32
15041      VAR_CPU_ENDIAN=little
15042      ;;
15043    aarch64)
15044      VAR_CPU=aarch64
15045      VAR_CPU_ARCH=aarch64
15046      VAR_CPU_BITS=64
15047      VAR_CPU_ENDIAN=little
15048      ;;
15049    powerpc)
15050      VAR_CPU=ppc
15051      VAR_CPU_ARCH=ppc
15052      VAR_CPU_BITS=32
15053      VAR_CPU_ENDIAN=big
15054      ;;
15055    powerpc64)
15056      VAR_CPU=ppc64
15057      VAR_CPU_ARCH=ppc
15058      VAR_CPU_BITS=64
15059      VAR_CPU_ENDIAN=big
15060      ;;
15061    powerpc64le)
15062      VAR_CPU=ppc64le
15063      VAR_CPU_ARCH=ppc
15064      VAR_CPU_BITS=64
15065      VAR_CPU_ENDIAN=little
15066      ;;
15067    s390)
15068      VAR_CPU=s390
15069      VAR_CPU_ARCH=s390
15070      VAR_CPU_BITS=32
15071      VAR_CPU_ENDIAN=big
15072      ;;
15073    s390x)
15074      VAR_CPU=s390x
15075      VAR_CPU_ARCH=s390
15076      VAR_CPU_BITS=64
15077      VAR_CPU_ENDIAN=big
15078      ;;
15079    sparc)
15080      VAR_CPU=sparc
15081      VAR_CPU_ARCH=sparc
15082      VAR_CPU_BITS=32
15083      VAR_CPU_ENDIAN=big
15084      ;;
15085    sparcv9|sparc64)
15086      VAR_CPU=sparcv9
15087      VAR_CPU_ARCH=sparc
15088      VAR_CPU_BITS=64
15089      VAR_CPU_ENDIAN=big
15090      ;;
15091    *)
15092      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15093      ;;
15094  esac
15095
15096  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15097  OPENJDK_BUILD_OS="$VAR_OS"
15098  if test "x$VAR_OS_TYPE" != x; then
15099    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15100  else
15101    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15102  fi
15103  if test "x$VAR_OS_ENV" != x; then
15104    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15105  else
15106    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15107  fi
15108  OPENJDK_BUILD_CPU="$VAR_CPU"
15109  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15110  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15111  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15112
15113
15114
15115
15116
15117
15118
15119
15120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15121$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15123$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15124
15125  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15126
15127  case "$host_os" in
15128    *linux*)
15129      VAR_OS=linux
15130      VAR_OS_TYPE=unix
15131      ;;
15132    *solaris*)
15133      VAR_OS=solaris
15134      VAR_OS_TYPE=unix
15135      ;;
15136    *darwin*)
15137      VAR_OS=macosx
15138      VAR_OS_TYPE=unix
15139      ;;
15140    *bsd*)
15141      VAR_OS=bsd
15142      VAR_OS_TYPE=unix
15143      ;;
15144    *cygwin*)
15145      VAR_OS=windows
15146      VAR_OS_ENV=windows.cygwin
15147      ;;
15148    *mingw*)
15149      VAR_OS=windows
15150      VAR_OS_ENV=windows.msys
15151      ;;
15152    *aix*)
15153      VAR_OS=aix
15154      VAR_OS_TYPE=unix
15155      ;;
15156    *)
15157      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15158      ;;
15159  esac
15160
15161
15162  # First argument is the cpu name from the trip/quad
15163  case "$host_cpu" in
15164    x86_64)
15165      VAR_CPU=x86_64
15166      VAR_CPU_ARCH=x86
15167      VAR_CPU_BITS=64
15168      VAR_CPU_ENDIAN=little
15169      ;;
15170    i?86)
15171      VAR_CPU=x86
15172      VAR_CPU_ARCH=x86
15173      VAR_CPU_BITS=32
15174      VAR_CPU_ENDIAN=little
15175      ;;
15176    arm*)
15177      VAR_CPU=arm
15178      VAR_CPU_ARCH=arm
15179      VAR_CPU_BITS=32
15180      VAR_CPU_ENDIAN=little
15181      ;;
15182    aarch64)
15183      VAR_CPU=aarch64
15184      VAR_CPU_ARCH=aarch64
15185      VAR_CPU_BITS=64
15186      VAR_CPU_ENDIAN=little
15187      ;;
15188    powerpc)
15189      VAR_CPU=ppc
15190      VAR_CPU_ARCH=ppc
15191      VAR_CPU_BITS=32
15192      VAR_CPU_ENDIAN=big
15193      ;;
15194    powerpc64)
15195      VAR_CPU=ppc64
15196      VAR_CPU_ARCH=ppc
15197      VAR_CPU_BITS=64
15198      VAR_CPU_ENDIAN=big
15199      ;;
15200    powerpc64le)
15201      VAR_CPU=ppc64le
15202      VAR_CPU_ARCH=ppc
15203      VAR_CPU_BITS=64
15204      VAR_CPU_ENDIAN=little
15205      ;;
15206    s390)
15207      VAR_CPU=s390
15208      VAR_CPU_ARCH=s390
15209      VAR_CPU_BITS=32
15210      VAR_CPU_ENDIAN=big
15211      ;;
15212    s390x)
15213      VAR_CPU=s390x
15214      VAR_CPU_ARCH=s390
15215      VAR_CPU_BITS=64
15216      VAR_CPU_ENDIAN=big
15217      ;;
15218    sparc)
15219      VAR_CPU=sparc
15220      VAR_CPU_ARCH=sparc
15221      VAR_CPU_BITS=32
15222      VAR_CPU_ENDIAN=big
15223      ;;
15224    sparcv9|sparc64)
15225      VAR_CPU=sparcv9
15226      VAR_CPU_ARCH=sparc
15227      VAR_CPU_BITS=64
15228      VAR_CPU_ENDIAN=big
15229      ;;
15230    *)
15231      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15232      ;;
15233  esac
15234
15235  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15236  OPENJDK_TARGET_OS="$VAR_OS"
15237  if test "x$VAR_OS_TYPE" != x; then
15238    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15239  else
15240    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15241  fi
15242  if test "x$VAR_OS_ENV" != x; then
15243    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15244  else
15245    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15246  fi
15247  OPENJDK_TARGET_CPU="$VAR_CPU"
15248  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15249  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15250  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15251
15252
15253
15254
15255
15256
15257
15258
15259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15260$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15262$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15263
15264
15265
15266# Check whether --with-target-bits was given.
15267if test "${with_target_bits+set}" = set; then :
15268  withval=$with_target_bits;
15269fi
15270
15271
15272  # We have three types of compiles:
15273  # native  == normal compilation, target system == build system
15274  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15275  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15276  #
15277  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15278    # We're doing a proper cross-compilation
15279    COMPILE_TYPE="cross"
15280  else
15281    COMPILE_TYPE="native"
15282  fi
15283
15284  if test "x$with_target_bits" != x; then
15285    if test "x$COMPILE_TYPE" = "xcross"; then
15286      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15287    fi
15288
15289    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15290      # A reduced build is requested
15291      COMPILE_TYPE="reduced"
15292      OPENJDK_TARGET_CPU_BITS=32
15293      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15294        OPENJDK_TARGET_CPU=x86
15295      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15296        OPENJDK_TARGET_CPU=sparc
15297      else
15298        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15299      fi
15300    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15301      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
15302    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15303      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15304$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15305    else
15306      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15307    fi
15308  fi
15309
15310
15311  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15312$as_echo_n "checking compilation type... " >&6; }
15313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15314$as_echo "$COMPILE_TYPE" >&6; }
15315
15316
15317  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15318    REQUIRED_OS_NAME=SunOS
15319    REQUIRED_OS_VERSION=5.10
15320  fi
15321  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15322    REQUIRED_OS_NAME=Linux
15323    REQUIRED_OS_VERSION=2.6
15324  fi
15325  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15326    REQUIRED_OS_NAME=Windows
15327    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15328      REQUIRED_OS_VERSION=5.2
15329    else
15330      REQUIRED_OS_VERSION=5.1
15331    fi
15332  fi
15333  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15334    REQUIRED_OS_NAME=Darwin
15335    REQUIRED_OS_VERSION=11.2
15336  fi
15337  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15338    REQUIRED_OS_NAME=AIX
15339    REQUIRED_OS_VERSION=7.1
15340  fi
15341
15342
15343
15344
15345
15346
15347  # Also store the legacy naming of the cpu.
15348  # Ie i586 and amd64 instead of x86 and x86_64
15349  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15350  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15351    OPENJDK_TARGET_CPU_LEGACY="i586"
15352  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15353    # On all platforms except MacOSX replace x86_64 with amd64.
15354    OPENJDK_TARGET_CPU_LEGACY="amd64"
15355  fi
15356
15357
15358  # And the second legacy naming of the cpu.
15359  # Ie i386 and amd64 instead of x86 and x86_64.
15360  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15361  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15362    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15363  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15364    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15365  fi
15366
15367
15368  # This is the name of the cpu (but using i386 and amd64 instead of
15369  # x86 and x86_64, respectively), preceeded by a /, to be used when
15370  # locating libraries. On macosx, it's empty, though.
15371  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15372  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15373    OPENJDK_TARGET_CPU_LIBDIR=""
15374  fi
15375
15376
15377  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15378  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15379  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15380  OPENJDK_TARGET_CPU_ISADIR=""
15381  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15382    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15383      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15384    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15385      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15386    fi
15387  fi
15388
15389
15390  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15391  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15392  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15393    # On linux only, we replace x86 with i386.
15394    OPENJDK_TARGET_CPU_OSARCH="i386"
15395  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15396    # On all platforms except macosx, we replace x86_64 with amd64.
15397    OPENJDK_TARGET_CPU_OSARCH="amd64"
15398  fi
15399
15400
15401  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15402  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15403    OPENJDK_TARGET_CPU_JLI="i386"
15404  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15405    # On all platforms except macosx, we replace x86_64 with amd64.
15406    OPENJDK_TARGET_CPU_JLI="amd64"
15407  fi
15408  # Now setup the -D flags for building libjli.
15409  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15410  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15411    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15412      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15413    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15414      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15415    fi
15416  fi
15417
15418
15419  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15420      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15421  else
15422      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15423  fi
15424
15425
15426  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15427    A_LP64="LP64:="
15428    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15429    # unpack200.exe
15430    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15431      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15432    fi
15433  fi
15434  LP64=$A_LP64
15435
15436
15437  if test "x$COMPILE_TYPE" = "xcross"; then
15438    # FIXME: ... or should this include reduced builds..?
15439    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15440  else
15441    DEFINE_CROSS_COMPILE_ARCH=""
15442  fi
15443
15444
15445  # Convert openjdk platform names to hotspot names
15446
15447  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15448  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15449    HOTSPOT_TARGET_OS=bsd
15450  fi
15451
15452
15453  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15454  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15455    HOTSPOT_TARGET_OS_TYPE=posix
15456  fi
15457
15458
15459  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15460  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15461    HOTSPOT_TARGET_CPU=x86_32
15462  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15463    HOTSPOT_TARGET_CPU=sparc
15464  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15465    HOTSPOT_TARGET_CPU=ppc_64
15466  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15467    HOTSPOT_TARGET_CPU=ppc_64
15468  fi
15469
15470
15471  # This is identical with OPENJDK_*, but define anyway for consistency.
15472  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15473
15474
15475  # Setup HOTSPOT_TARGET_CPU_DEFINE
15476  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15477    HOTSPOT_TARGET_CPU_DEFINE=IA32
15478  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15479    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15480  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15481    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15482  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15483    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15484  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15485    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15486  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15487    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15488
15489  # The cpu defines below are for zero, we don't support them directly.
15490  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15491    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15492  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15493    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15494  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15495    HOTSPOT_TARGET_CPU_DEFINE=S390
15496  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15497    HOTSPOT_TARGET_CPU_DEFINE=S390
15498  fi
15499
15500
15501
15502
15503  # Also store the legacy naming of the cpu.
15504  # Ie i586 and amd64 instead of x86 and x86_64
15505  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15506  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15507    OPENJDK_BUILD_CPU_LEGACY="i586"
15508  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15509    # On all platforms except MacOSX replace x86_64 with amd64.
15510    OPENJDK_BUILD_CPU_LEGACY="amd64"
15511  fi
15512
15513
15514  # And the second legacy naming of the cpu.
15515  # Ie i386 and amd64 instead of x86 and x86_64.
15516  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15517  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15518    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15519  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15520    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15521  fi
15522
15523
15524  # This is the name of the cpu (but using i386 and amd64 instead of
15525  # x86 and x86_64, respectively), preceeded by a /, to be used when
15526  # locating libraries. On macosx, it's empty, though.
15527  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15528  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15529    OPENJDK_BUILD_CPU_LIBDIR=""
15530  fi
15531
15532
15533  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15534  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15535  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15536  OPENJDK_BUILD_CPU_ISADIR=""
15537  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15538    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15539      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15540    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15541      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15542    fi
15543  fi
15544
15545
15546  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15547  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15548  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15549    # On linux only, we replace x86 with i386.
15550    OPENJDK_BUILD_CPU_OSARCH="i386"
15551  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15552    # On all platforms except macosx, we replace x86_64 with amd64.
15553    OPENJDK_BUILD_CPU_OSARCH="amd64"
15554  fi
15555
15556
15557  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15558  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15559    OPENJDK_BUILD_CPU_JLI="i386"
15560  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15561    # On all platforms except macosx, we replace x86_64 with amd64.
15562    OPENJDK_BUILD_CPU_JLI="amd64"
15563  fi
15564  # Now setup the -D flags for building libjli.
15565  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15566  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15567    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15568      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15569    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15570      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15571    fi
15572  fi
15573
15574
15575  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15576      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15577  else
15578      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15579  fi
15580
15581
15582  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15583    A_LP64="LP64:="
15584    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15585    # unpack200.exe
15586    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15587      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15588    fi
15589  fi
15590  LP64=$A_LP64
15591
15592
15593  if test "x$COMPILE_TYPE" = "xcross"; then
15594    # FIXME: ... or should this include reduced builds..?
15595    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15596  else
15597    DEFINE_CROSS_COMPILE_ARCH=""
15598  fi
15599
15600
15601  # Convert openjdk platform names to hotspot names
15602
15603  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15604  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15605    HOTSPOT_BUILD_OS=bsd
15606  fi
15607
15608
15609  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15610  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15611    HOTSPOT_BUILD_OS_TYPE=posix
15612  fi
15613
15614
15615  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15616  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15617    HOTSPOT_BUILD_CPU=x86_32
15618  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15619    HOTSPOT_BUILD_CPU=sparc
15620  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15621    HOTSPOT_BUILD_CPU=ppc_64
15622  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15623    HOTSPOT_BUILD_CPU=ppc_64
15624  fi
15625
15626
15627  # This is identical with OPENJDK_*, but define anyway for consistency.
15628  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15629
15630
15631  # Setup HOTSPOT_BUILD_CPU_DEFINE
15632  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15633    HOTSPOT_BUILD_CPU_DEFINE=IA32
15634  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15635    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15636  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15637    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15638  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15639    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15640  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15641    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15642  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15643    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15644
15645  # The cpu defines below are for zero, we don't support them directly.
15646  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15647    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15648  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15649    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15650  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15651    HOTSPOT_BUILD_CPU_DEFINE=S390
15652  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15653    HOTSPOT_BUILD_CPU_DEFINE=S390
15654  fi
15655
15656
15657
15658
15659  # ZERO_ARCHDEF is used to enable architecture-specific code.
15660  # This is used in legacy hotspot build.
15661  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15662
15663
15664
15665
15666
15667# Continue setting up basic stuff. Most remaining code require fundamental tools.
15668
15669  # Save the current directory this script was started from
15670  CURDIR="$PWD"
15671
15672  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15673  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15674  # was not available at that time.
15675  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15676  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15677    ORIGINAL_PATH="$REWRITTEN_PATH"
15678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15679$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15680  fi
15681
15682  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15683    PATH_SEP=";"
15684
15685  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15686  if test $SRC_ROOT_LENGTH -gt 100; then
15687    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15688  fi
15689
15690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15691    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15692$as_echo_n "checking cygwin release... " >&6; }
15693    CYGWIN_VERSION=`$UNAME -r`
15694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15695$as_echo "$CYGWIN_VERSION" >&6; }
15696    WINDOWS_ENV_VENDOR='cygwin'
15697    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15698
15699    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15700    if test "x$CYGWIN_VERSION_OLD" != x; then
15701      { $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
15702$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;}
15703      as_fn_error $? "Cannot continue" "$LINENO" 5
15704    fi
15705    if test "x$CYGPATH" = x; then
15706      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15707    fi
15708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15709$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15710    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15711    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15712    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15713    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15714    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15715$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15716    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15717    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15718    if test "x$test_cygdrive_prefix" = x; then
15719      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15720    fi
15721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15723$as_echo_n "checking msys release... " >&6; }
15724    MSYS_VERSION=`$UNAME -r`
15725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15726$as_echo "$MSYS_VERSION" >&6; }
15727
15728    WINDOWS_ENV_VENDOR='msys'
15729    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15730
15731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15732$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15733    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15734    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15735
15736  windows_path="$MSYS_ROOT_PATH"
15737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15738    unix_path=`$CYGPATH -u "$windows_path"`
15739    MSYS_ROOT_PATH="$unix_path"
15740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15742    MSYS_ROOT_PATH="$unix_path"
15743  fi
15744
15745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15746$as_echo "$MSYS_ROOT_PATH" >&6; }
15747    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15748  else
15749    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15750  fi
15751
15752  # Test if windows or unix (cygwin/msys) find is first in path.
15753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15754$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15755  FIND_BINARY_OUTPUT=`find --version 2>&1`
15756  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15758$as_echo "unix style" >&6; }
15759  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15760    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15761$as_echo "Windows" >&6; }
15762    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15763$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15764    { $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
15765$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15766    as_fn_error $? "Cannot continue" "$LINENO" 5
15767  else
15768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15769$as_echo "unknown" >&6; }
15770    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15771$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15772  fi
15773
15774  else
15775    PATH_SEP=":"
15776  fi
15777
15778
15779  # We get the top-level directory from the supporting wrappers.
15780  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15781$as_echo_n "checking for top-level directory... " >&6; }
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15783$as_echo "$TOPDIR" >&6; }
15784
15785
15786  # Save the original version of TOPDIR for string comparisons
15787  ORIGINAL_TOPDIR="$TOPDIR"
15788
15789
15790  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15791
15792  # Only process if variable expands to non-empty
15793
15794  if test "x$CURDIR" != x; then
15795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15796
15797  # Input might be given as Windows format, start by converting to
15798  # unix format.
15799  path="$CURDIR"
15800  new_path=`$CYGPATH -u "$path"`
15801
15802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15805  # "foo.exe" is OK but "foo" is an error.
15806  #
15807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15808  # It is also a way to make sure we got the proper file name for the real test later on.
15809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15810  if test "x$test_shortpath" = x; then
15811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15812$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15813    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15814  fi
15815
15816  # Call helper function which possibly converts this using DOS-style short mode.
15817  # If so, the updated path is stored in $new_path.
15818
15819  input_path="$new_path"
15820  # Check if we need to convert this using DOS-style short mode. If the path
15821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15822  # take no chances and rewrite it.
15823  # Note: m4 eats our [], so we need to use [ and ] instead.
15824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15825  if test "x$has_forbidden_chars" != x; then
15826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15830      # Going to short mode and back again did indeed matter. Since short mode is
15831      # case insensitive, let's make it lowercase to improve readability.
15832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15833      # Now convert it back to Unix-style (cygpath)
15834      input_path=`$CYGPATH -u "$shortmode_path"`
15835      new_path="$input_path"
15836    fi
15837  fi
15838
15839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15840  if test "x$test_cygdrive_prefix" = x; then
15841    # As a simple fix, exclude /usr/bin since it's not a real path.
15842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15844      # a path prefixed by /cygdrive for fixpath to work.
15845      new_path="$CYGWIN_ROOT_PATH$input_path"
15846    fi
15847  fi
15848
15849
15850  if test "x$path" != "x$new_path"; then
15851    CURDIR="$new_path"
15852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15853$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15854  fi
15855
15856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15857
15858  path="$CURDIR"
15859  has_colon=`$ECHO $path | $GREP ^.:`
15860  new_path="$path"
15861  if test "x$has_colon" = x; then
15862    # Not in mixed or Windows style, start by that.
15863    new_path=`cmd //c echo $path`
15864  fi
15865
15866
15867  input_path="$new_path"
15868  # Check if we need to convert this using DOS-style short mode. If the path
15869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15870  # take no chances and rewrite it.
15871  # Note: m4 eats our [], so we need to use [ and ] instead.
15872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15873  if test "x$has_forbidden_chars" != x; then
15874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15876  fi
15877
15878
15879  windows_path="$new_path"
15880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15881    unix_path=`$CYGPATH -u "$windows_path"`
15882    new_path="$unix_path"
15883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15885    new_path="$unix_path"
15886  fi
15887
15888  if test "x$path" != "x$new_path"; then
15889    CURDIR="$new_path"
15890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15891$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15892  fi
15893
15894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15896
15897    else
15898      # We're on a unix platform. Hooray! :)
15899      path="$CURDIR"
15900      has_space=`$ECHO "$path" | $GREP " "`
15901      if test "x$has_space" != x; then
15902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15903$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15905      fi
15906
15907      # Use eval to expand a potential ~
15908      eval path="$path"
15909      if test ! -f "$path" && test ! -d "$path"; then
15910        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15911      fi
15912
15913      if test -d "$path"; then
15914        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15915      else
15916        dir="`$DIRNAME "$path"`"
15917        base="`$BASENAME "$path"`"
15918        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15919      fi
15920    fi
15921  fi
15922
15923
15924  # Only process if variable expands to non-empty
15925
15926  if test "x$TOPDIR" != x; then
15927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15928
15929  # Input might be given as Windows format, start by converting to
15930  # unix format.
15931  path="$TOPDIR"
15932  new_path=`$CYGPATH -u "$path"`
15933
15934  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15935  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15936  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15937  # "foo.exe" is OK but "foo" is an error.
15938  #
15939  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15940  # It is also a way to make sure we got the proper file name for the real test later on.
15941  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15942  if test "x$test_shortpath" = x; then
15943    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15944$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15945    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15946  fi
15947
15948  # Call helper function which possibly converts this using DOS-style short mode.
15949  # If so, the updated path is stored in $new_path.
15950
15951  input_path="$new_path"
15952  # Check if we need to convert this using DOS-style short mode. If the path
15953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15954  # take no chances and rewrite it.
15955  # Note: m4 eats our [], so we need to use [ and ] instead.
15956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15957  if test "x$has_forbidden_chars" != x; then
15958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15962      # Going to short mode and back again did indeed matter. Since short mode is
15963      # case insensitive, let's make it lowercase to improve readability.
15964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15965      # Now convert it back to Unix-style (cygpath)
15966      input_path=`$CYGPATH -u "$shortmode_path"`
15967      new_path="$input_path"
15968    fi
15969  fi
15970
15971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15972  if test "x$test_cygdrive_prefix" = x; then
15973    # As a simple fix, exclude /usr/bin since it's not a real path.
15974    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15976      # a path prefixed by /cygdrive for fixpath to work.
15977      new_path="$CYGWIN_ROOT_PATH$input_path"
15978    fi
15979  fi
15980
15981
15982  if test "x$path" != "x$new_path"; then
15983    TOPDIR="$new_path"
15984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15985$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15986  fi
15987
15988    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15989
15990  path="$TOPDIR"
15991  has_colon=`$ECHO $path | $GREP ^.:`
15992  new_path="$path"
15993  if test "x$has_colon" = x; then
15994    # Not in mixed or Windows style, start by that.
15995    new_path=`cmd //c echo $path`
15996  fi
15997
15998
15999  input_path="$new_path"
16000  # Check if we need to convert this using DOS-style short mode. If the path
16001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16002  # take no chances and rewrite it.
16003  # Note: m4 eats our [], so we need to use [ and ] instead.
16004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16005  if test "x$has_forbidden_chars" != x; then
16006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16008  fi
16009
16010
16011  windows_path="$new_path"
16012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16013    unix_path=`$CYGPATH -u "$windows_path"`
16014    new_path="$unix_path"
16015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16017    new_path="$unix_path"
16018  fi
16019
16020  if test "x$path" != "x$new_path"; then
16021    TOPDIR="$new_path"
16022    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16023$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16024  fi
16025
16026  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16027  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16028
16029    else
16030      # We're on a unix platform. Hooray! :)
16031      path="$TOPDIR"
16032      has_space=`$ECHO "$path" | $GREP " "`
16033      if test "x$has_space" != x; then
16034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16035$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16036        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16037      fi
16038
16039      # Use eval to expand a potential ~
16040      eval path="$path"
16041      if test ! -f "$path" && test ! -d "$path"; then
16042        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16043      fi
16044
16045      if test -d "$path"; then
16046        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16047      else
16048        dir="`$DIRNAME "$path"`"
16049        base="`$BASENAME "$path"`"
16050        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16051      fi
16052    fi
16053  fi
16054
16055  # SRC_ROOT is a traditional alias for TOPDIR.
16056  SRC_ROOT=$TOPDIR
16057
16058  # Calculate a canonical version of TOPDIR for string comparisons
16059  CANONICAL_TOPDIR=$TOPDIR
16060
16061  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16062    # Follow a chain of symbolic links. Use readlink
16063    # where it exists, else fall back to horribly
16064    # complicated shell code.
16065    if test "x$READLINK_TESTED" != yes; then
16066      # On MacOSX there is a readlink tool with a different
16067      # purpose than the GNU readlink tool. Check the found readlink.
16068      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16069      if test "x$ISGNU" = x; then
16070        # A readlink that we do not know how to use.
16071        # Are there other non-GNU readlinks out there?
16072        READLINK_TESTED=yes
16073        READLINK=
16074      fi
16075    fi
16076
16077    if test "x$READLINK" != x; then
16078      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16079    else
16080      # Save the current directory for restoring afterwards
16081      STARTDIR=$PWD
16082      COUNTER=0
16083      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16084      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16085      cd $sym_link_dir
16086      # Use -P flag to resolve symlinks in directories.
16087      cd `$THEPWDCMD -P`
16088      sym_link_dir=`$THEPWDCMD -P`
16089      # Resolve file symlinks
16090      while test $COUNTER -lt 20; do
16091        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16092        if test "x$ISLINK" == x; then
16093          # This is not a symbolic link! We are done!
16094          break
16095        fi
16096        # Again resolve directory symlinks since the target of the just found
16097        # link could be in a different directory
16098        cd `$DIRNAME $ISLINK`
16099        sym_link_dir=`$THEPWDCMD -P`
16100        sym_link_file=`$BASENAME $ISLINK`
16101        let COUNTER=COUNTER+1
16102      done
16103      cd $STARTDIR
16104      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16105    fi
16106  fi
16107
16108
16109
16110  # Locate the directory of this script.
16111  AUTOCONF_DIR=$TOPDIR/common/autoconf
16112
16113  # Setup username (for use in adhoc version strings etc)
16114  # Outer [ ] to quote m4.
16115   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16116
16117
16118
16119# Check if it's a pure open build or if custom sources are to be used.
16120
16121  # Check whether --enable-openjdk-only was given.
16122if test "${enable_openjdk_only+set}" = set; then :
16123  enableval=$enable_openjdk_only;
16124else
16125  enable_openjdk_only="no"
16126fi
16127
16128
16129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16130$as_echo_n "checking for presence of closed sources... " >&6; }
16131  if test -d "$SRC_ROOT/jdk/src/closed"; then
16132    CLOSED_SOURCE_PRESENT=yes
16133  else
16134    CLOSED_SOURCE_PRESENT=no
16135  fi
16136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16137$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16138
16139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16140$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16141  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16143$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16144
16145  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16146    OPENJDK=true
16147    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16148      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16149$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16150    fi
16151  else
16152    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16153      OPENJDK=true
16154    else
16155      OPENJDK=false
16156    fi
16157  fi
16158
16159  if test "x$OPENJDK" = "xtrue"; then
16160    SET_OPENJDK="OPENJDK=true"
16161  fi
16162
16163
16164
16165  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16166  # the IncludeCustomExtension macro.
16167
16168
16169# Check whether --with-custom-make-dir was given.
16170if test "${with_custom_make_dir+set}" = set; then :
16171  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
16172$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16173fi
16174
16175
16176
16177
16178# These are needed to be able to create a configuration name (and thus the output directory)
16179
16180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16181$as_echo_n "checking which variant of the JDK to build... " >&6; }
16182
16183# Check whether --with-jdk-variant was given.
16184if test "${with_jdk_variant+set}" = set; then :
16185  withval=$with_jdk_variant;
16186fi
16187
16188
16189  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16190    JDK_VARIANT="normal"
16191  else
16192    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16193  fi
16194
16195
16196
16197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16198$as_echo "$JDK_VARIANT" >&6; }
16199
16200
16201  DEBUG_LEVEL="release"
16202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16203$as_echo_n "checking which debug level to use... " >&6; }
16204  # Check whether --enable-debug was given.
16205if test "${enable_debug+set}" = set; then :
16206  enableval=$enable_debug;
16207        ENABLE_DEBUG="${enableval}"
16208        DEBUG_LEVEL="fastdebug"
16209
16210else
16211  ENABLE_DEBUG="no"
16212fi
16213
16214
16215
16216# Check whether --with-debug-level was given.
16217if test "${with_debug_level+set}" = set; then :
16218  withval=$with_debug_level;
16219        DEBUG_LEVEL="${withval}"
16220        if test "x$ENABLE_DEBUG" = xyes; then
16221          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16222        fi
16223
16224fi
16225
16226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16227$as_echo "$DEBUG_LEVEL" >&6; }
16228
16229  if test "x$DEBUG_LEVEL" != xrelease && \
16230      test "x$DEBUG_LEVEL" != xoptimized && \
16231      test "x$DEBUG_LEVEL" != xfastdebug && \
16232      test "x$DEBUG_LEVEL" != xslowdebug; then
16233    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16234  fi
16235
16236  # Translate DEBUG_LEVEL to debug level used by Hotspot
16237  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16238  if test "x$DEBUG_LEVEL" = xrelease; then
16239    HOTSPOT_DEBUG_LEVEL="product"
16240  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16241    HOTSPOT_DEBUG_LEVEL="debug"
16242  fi
16243
16244  if test "x$DEBUG_LEVEL" = xoptimized; then
16245    # The debug level 'optimized' is a little special because it is currently only
16246    # applicable to the HotSpot build where it means to build a completely
16247    # optimized version of the VM without any debugging code (like for the
16248    # 'release' debug level which is called 'product' in the HotSpot build) but
16249    # with the exception that it can contain additional code which is otherwise
16250    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16251    # test new and/or experimental features which are not intended for customer
16252    # shipment. Because these new features need to be tested and benchmarked in
16253    # real world scenarios, we want to build the containing JDK at the 'release'
16254    # debug level.
16255    DEBUG_LEVEL="release"
16256  fi
16257
16258
16259
16260
16261
16262
16263# Check whether --with-jvm-variants was given.
16264if test "${with_jvm_variants+set}" = set; then :
16265  withval=$with_jvm_variants;
16266fi
16267
16268
16269  if test "x$with_jvm_variants" = x; then
16270    with_jvm_variants="server"
16271  fi
16272  JVM_VARIANTS_OPT="$with_jvm_variants"
16273
16274  # Has the user listed more than one variant?
16275  # Additional [] needed to keep m4 from mangling shell constructs.
16276  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16277    BUILDING_MULTIPLE_JVM_VARIANTS=true
16278  else
16279    BUILDING_MULTIPLE_JVM_VARIANTS=false
16280  fi
16281  # Replace the commas with AND for use in the build directory name.
16282  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16283
16284  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16285$as_echo_n "checking which variants of the JVM to build... " >&6; }
16286  # JVM_VARIANTS is a space-separated list.
16287  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16288  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16290$as_echo "$JVM_VARIANTS" >&6; }
16291
16292  # Check that the selected variants are valid
16293
16294  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16295  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16296  if test "x$INVALID_VARIANTS" != x; then
16297    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16298$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16299    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16300  fi
16301
16302  # All "special" variants share the same output directory ("server")
16303  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16304  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16305  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16306    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16307  fi
16308
16309
16310
16311
16312  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16313    # zero behaves as a platform and rewrites these values. This is really weird. :(
16314    # We are guaranteed that we do not build any other variants when building zero.
16315    HOTSPOT_TARGET_CPU=zero
16316    HOTSPOT_TARGET_CPU_ARCH=zero
16317  fi
16318
16319
16320# With basic setup done, call the custom early hook.
16321
16322
16323# Check if we have devkits, extra paths or sysroot set.
16324
16325
16326# Check whether --with-devkit was given.
16327if test "${with_devkit+set}" = set; then :
16328  withval=$with_devkit;
16329
16330  # Only process if variable expands to non-empty
16331
16332  if test "x$with_devkit" != x; then
16333    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16334
16335  # Input might be given as Windows format, start by converting to
16336  # unix format.
16337  path="$with_devkit"
16338  new_path=`$CYGPATH -u "$path"`
16339
16340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16343  # "foo.exe" is OK but "foo" is an error.
16344  #
16345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16346  # It is also a way to make sure we got the proper file name for the real test later on.
16347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16348  if test "x$test_shortpath" = x; then
16349    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16350$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16351    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16352  fi
16353
16354  # Call helper function which possibly converts this using DOS-style short mode.
16355  # If so, the updated path is stored in $new_path.
16356
16357  input_path="$new_path"
16358  # Check if we need to convert this using DOS-style short mode. If the path
16359  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16360  # take no chances and rewrite it.
16361  # Note: m4 eats our [], so we need to use [ and ] instead.
16362  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16363  if test "x$has_forbidden_chars" != x; then
16364    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16365    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16366    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16367    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16368      # Going to short mode and back again did indeed matter. Since short mode is
16369      # case insensitive, let's make it lowercase to improve readability.
16370      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16371      # Now convert it back to Unix-style (cygpath)
16372      input_path=`$CYGPATH -u "$shortmode_path"`
16373      new_path="$input_path"
16374    fi
16375  fi
16376
16377  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16378  if test "x$test_cygdrive_prefix" = x; then
16379    # As a simple fix, exclude /usr/bin since it's not a real path.
16380    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16381      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16382      # a path prefixed by /cygdrive for fixpath to work.
16383      new_path="$CYGWIN_ROOT_PATH$input_path"
16384    fi
16385  fi
16386
16387
16388  if test "x$path" != "x$new_path"; then
16389    with_devkit="$new_path"
16390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16391$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16392  fi
16393
16394    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16395
16396  path="$with_devkit"
16397  has_colon=`$ECHO $path | $GREP ^.:`
16398  new_path="$path"
16399  if test "x$has_colon" = x; then
16400    # Not in mixed or Windows style, start by that.
16401    new_path=`cmd //c echo $path`
16402  fi
16403
16404
16405  input_path="$new_path"
16406  # Check if we need to convert this using DOS-style short mode. If the path
16407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16408  # take no chances and rewrite it.
16409  # Note: m4 eats our [], so we need to use [ and ] instead.
16410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16411  if test "x$has_forbidden_chars" != x; then
16412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16413    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16414  fi
16415
16416
16417  windows_path="$new_path"
16418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16419    unix_path=`$CYGPATH -u "$windows_path"`
16420    new_path="$unix_path"
16421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16423    new_path="$unix_path"
16424  fi
16425
16426  if test "x$path" != "x$new_path"; then
16427    with_devkit="$new_path"
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16429$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16430  fi
16431
16432  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16433  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16434
16435    else
16436      # We're on a unix platform. Hooray! :)
16437      path="$with_devkit"
16438      has_space=`$ECHO "$path" | $GREP " "`
16439      if test "x$has_space" != x; then
16440        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16441$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16442        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16443      fi
16444
16445      # Use eval to expand a potential ~
16446      eval path="$path"
16447      if test ! -f "$path" && test ! -d "$path"; then
16448        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16449      fi
16450
16451      if test -d "$path"; then
16452        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16453      else
16454        dir="`$DIRNAME "$path"`"
16455        base="`$BASENAME "$path"`"
16456        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16457      fi
16458    fi
16459  fi
16460
16461        DEVKIT_ROOT="$with_devkit"
16462        # Check for a meta data info file in the root of the devkit
16463        if test -f "$DEVKIT_ROOT/devkit.info"; then
16464          . $DEVKIT_ROOT/devkit.info
16465          # This potentially sets the following:
16466          # A descriptive name of the devkit
16467
16468  if test "x$DEVKIT_NAME" = x; then
16469    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16470  fi
16471
16472          # Corresponds to --with-extra-path
16473
16474  if test "x$DEVKIT_EXTRA_PATH" = x; then
16475    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16476  fi
16477
16478          # Corresponds to --with-toolchain-path
16479
16480  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16481    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16482  fi
16483
16484          # Corresponds to --with-sysroot
16485
16486  if test "x$DEVKIT_SYSROOT" = x; then
16487    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16488  fi
16489
16490
16491          # Identifies the Visual Studio version in the devkit
16492
16493  if test "x$DEVKIT_VS_VERSION" = x; then
16494    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16495  fi
16496
16497          # The Visual Studio include environment variable
16498
16499  if test "x$DEVKIT_VS_INCLUDE" = x; then
16500    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16501  fi
16502
16503          # The Visual Studio lib environment variable
16504
16505  if test "x$DEVKIT_VS_LIB" = x; then
16506    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16507  fi
16508
16509          # Corresponds to --with-msvcr-dll
16510
16511  if test "x$DEVKIT_MSVCR_DLL" = x; then
16512    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16513  fi
16514
16515          # Corresponds to --with-msvcp-dll
16516
16517  if test "x$DEVKIT_MSVCP_DLL" = x; then
16518    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16519  fi
16520
16521        fi
16522
16523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16524$as_echo_n "checking for devkit... " >&6; }
16525        if test "x$DEVKIT_NAME" != x; then
16526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16527$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16528        else
16529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16530$as_echo "$DEVKIT_ROOT" >&6; }
16531        fi
16532
16533
16534  if test "x$DEVKIT_EXTRA_PATH" != x; then
16535    if test "x$EXTRA_PATH" = x; then
16536      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16537    else
16538      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16539    fi
16540  fi
16541
16542
16543        # Fallback default of just /bin if DEVKIT_PATH is not defined
16544        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16545          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16546        fi
16547
16548  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16549    if test "x$TOOLCHAIN_PATH" = x; then
16550      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16551    else
16552      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16553    fi
16554  fi
16555
16556
16557        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16558        # places for backwards compatiblity.
16559        if test "x$DEVKIT_SYSROOT" != x; then
16560          SYSROOT="$DEVKIT_SYSROOT"
16561        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16562          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16563        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16564          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16565        fi
16566
16567
16568fi
16569
16570
16571  # You can force the sysroot if the sysroot encoded into the compiler tools
16572  # is not correct.
16573
16574# Check whether --with-sys-root was given.
16575if test "${with_sys_root+set}" = set; then :
16576  withval=$with_sys_root; SYSROOT=$with_sys_root
16577
16578fi
16579
16580
16581
16582# Check whether --with-sysroot was given.
16583if test "${with_sysroot+set}" = set; then :
16584  withval=$with_sysroot; SYSROOT=$with_sysroot
16585
16586fi
16587
16588
16589
16590# Check whether --with-tools-dir was given.
16591if test "${with_tools_dir+set}" = set; then :
16592  withval=$with_tools_dir;
16593  if test "x$with_tools_dir" != x; then
16594    if test "x$TOOLCHAIN_PATH" = x; then
16595      TOOLCHAIN_PATH="$with_tools_dir"
16596    else
16597      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16598    fi
16599  fi
16600
16601
16602fi
16603
16604
16605
16606# Check whether --with-toolchain-path was given.
16607if test "${with_toolchain_path+set}" = set; then :
16608  withval=$with_toolchain_path;
16609  if test "x$with_toolchain_path" != x; then
16610    if test "x$TOOLCHAIN_PATH" = x; then
16611      TOOLCHAIN_PATH="$with_toolchain_path"
16612    else
16613      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16614    fi
16615  fi
16616
16617
16618fi
16619
16620
16621
16622# Check whether --with-extra-path was given.
16623if test "${with_extra_path+set}" = set; then :
16624  withval=$with_extra_path;
16625  if test "x$with_extra_path" != x; then
16626    if test "x$EXTRA_PATH" = x; then
16627      EXTRA_PATH="$with_extra_path"
16628    else
16629      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16630    fi
16631  fi
16632
16633
16634fi
16635
16636
16637  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16638    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16639    # If not, detect if Xcode is installed by running xcodebuild -version
16640    # if no Xcode installed, xcodebuild exits with 1
16641    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16642    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16643      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16644      # fall back on the stub binary in /usr/bin/xcodebuild
16645      # Extract the first word of "xcodebuild", so it can be a program name with args.
16646set dummy xcodebuild; ac_word=$2
16647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16648$as_echo_n "checking for $ac_word... " >&6; }
16649if ${ac_cv_path_XCODEBUILD+:} false; then :
16650  $as_echo_n "(cached) " >&6
16651else
16652  case $XCODEBUILD in
16653  [\\/]* | ?:[\\/]*)
16654  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16655  ;;
16656  *)
16657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16658for as_dir in $TOOLCHAIN_PATH
16659do
16660  IFS=$as_save_IFS
16661  test -z "$as_dir" && as_dir=.
16662    for ac_exec_ext in '' $ac_executable_extensions; do
16663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16664    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16666    break 2
16667  fi
16668done
16669  done
16670IFS=$as_save_IFS
16671
16672  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16673  ;;
16674esac
16675fi
16676XCODEBUILD=$ac_cv_path_XCODEBUILD
16677if test -n "$XCODEBUILD"; then
16678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16679$as_echo "$XCODEBUILD" >&6; }
16680else
16681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16682$as_echo "no" >&6; }
16683fi
16684
16685
16686    else
16687      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16688      # when only the command line tools are installed there are no SDKs, so headers
16689      # are copied into the system frameworks
16690      XCODEBUILD=
16691
16692    fi
16693
16694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16695$as_echo_n "checking for sdk name... " >&6; }
16696
16697# Check whether --with-sdk-name was given.
16698if test "${with_sdk_name+set}" = set; then :
16699  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16700
16701fi
16702
16703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16704$as_echo "$SDKNAME" >&6; }
16705
16706    # if toolchain path is specified then don't rely on system headers, they may not compile
16707    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16708    test -z "$TOOLCHAIN_PATH" && \
16709      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16710
16711    if test -z "$SYSROOT"; then
16712      if test -n "$XCODEBUILD"; then
16713        # if we don't have system headers, use default SDK name (last resort)
16714        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16715          SDKNAME=${SDKNAME:-macosx}
16716        fi
16717
16718        if test -n "$SDKNAME"; then
16719          # Call xcodebuild to determine SYSROOT
16720          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16721        fi
16722      else
16723        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16724          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
16725        fi
16726      fi
16727    else
16728      # warn user if --with-sdk-name was also set
16729      if test -n "$with_sdk_name"; then
16730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16731$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16732      fi
16733    fi
16734
16735    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16736      # If no system framework headers, then SYSROOT must be set, or we won't build
16737      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
16738    fi
16739
16740    # Perform a basic sanity test
16741    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16742      if test -z "$SYSROOT"; then
16743        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
16744      else
16745        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16746      fi
16747    fi
16748
16749    # set SDKROOT too, Xcode tools will pick it up
16750    SDKROOT=$SYSROOT
16751
16752  fi
16753
16754  # Prepend the extra path to the global path
16755
16756  if test "x$EXTRA_PATH" != x; then
16757    if test "x$PATH" = x; then
16758      PATH="$EXTRA_PATH"
16759    else
16760      PATH="$EXTRA_PATH:$PATH"
16761    fi
16762  fi
16763
16764
16765  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16766    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16767    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16768  fi
16769
16770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16771$as_echo_n "checking for sysroot... " >&6; }
16772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16773$as_echo "$SYSROOT" >&6; }
16774  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16775$as_echo_n "checking for toolchain path... " >&6; }
16776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16777$as_echo "$TOOLCHAIN_PATH" >&6; }
16778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16779$as_echo_n "checking for extra path... " >&6; }
16780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16781$as_echo "$EXTRA_PATH" >&6; }
16782
16783
16784# To properly create a configuration name, we need to have the OpenJDK target
16785# and options (variants and debug level) parsed.
16786
16787
16788
16789# Check whether --with-conf-name was given.
16790if test "${with_conf_name+set}" = set; then :
16791  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16792fi
16793
16794
16795  # Test from where we are running configure, in or outside of src root.
16796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16797$as_echo_n "checking where to store configuration... " >&6; }
16798  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16799      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16800      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16801    # We are running configure from the src root.
16802    # Create a default ./build/target-variant-debuglevel output root.
16803    if test "x${CONF_NAME}" = x; then
16804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16805$as_echo "in default location" >&6; }
16806      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16807    else
16808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16809$as_echo "in build directory with custom name" >&6; }
16810    fi
16811    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16812    $MKDIR -p "$OUTPUT_ROOT"
16813    if test ! -d "$OUTPUT_ROOT"; then
16814      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16815    fi
16816  else
16817    # We are running configure from outside of the src dir.
16818    # Then use the current directory as output dir!
16819    # If configuration is situated in normal build directory, just use the build
16820    # directory name as configuration name, otherwise use the complete path.
16821    if test "x${CONF_NAME}" = x; then
16822      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16823    fi
16824    OUTPUT_ROOT="$CURDIR"
16825    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16826$as_echo "in current directory" >&6; }
16827
16828    # WARNING: This might be a bad thing to do. You need to be sure you want to
16829    # have a configuration in this directory. Do some sanity checks!
16830
16831    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16832      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16833      # other files
16834      files_present=`$LS $OUTPUT_ROOT`
16835      # Configure has already touched config.log and confdefs.h in the current dir when this check
16836      # is performed.
16837      filtered_files=`$ECHO "$files_present" \
16838          | $SED -e 's/config.log//g' \
16839              -e 's/configure.log//g' \
16840              -e 's/confdefs.h//g' \
16841              -e 's/ //g' \
16842          | $TR -d '\n'`
16843      if test "x$filtered_files" != x; then
16844        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16845$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16846        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16847$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16848        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16849$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16850        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16851$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16852        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16853$as_echo "$as_me: seriously mess up just about everything." >&6;}
16854        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16855$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16856        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16857$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16858        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16859      fi
16860    fi
16861  fi
16862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16863$as_echo_n "checking what configuration name to use... " >&6; }
16864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16865$as_echo "$CONF_NAME" >&6; }
16866
16867
16868  # Only process if variable expands to non-empty
16869
16870  if test "x$OUTPUT_ROOT" != x; then
16871    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16872
16873  # Input might be given as Windows format, start by converting to
16874  # unix format.
16875  path="$OUTPUT_ROOT"
16876  new_path=`$CYGPATH -u "$path"`
16877
16878  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16879  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16880  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16881  # "foo.exe" is OK but "foo" is an error.
16882  #
16883  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16884  # It is also a way to make sure we got the proper file name for the real test later on.
16885  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16886  if test "x$test_shortpath" = x; then
16887    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16888$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16889    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16890  fi
16891
16892  # Call helper function which possibly converts this using DOS-style short mode.
16893  # If so, the updated path is stored in $new_path.
16894
16895  input_path="$new_path"
16896  # Check if we need to convert this using DOS-style short mode. If the path
16897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16898  # take no chances and rewrite it.
16899  # Note: m4 eats our [], so we need to use [ and ] instead.
16900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16901  if test "x$has_forbidden_chars" != x; then
16902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16903    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16904    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16905    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16906      # Going to short mode and back again did indeed matter. Since short mode is
16907      # case insensitive, let's make it lowercase to improve readability.
16908      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16909      # Now convert it back to Unix-style (cygpath)
16910      input_path=`$CYGPATH -u "$shortmode_path"`
16911      new_path="$input_path"
16912    fi
16913  fi
16914
16915  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16916  if test "x$test_cygdrive_prefix" = x; then
16917    # As a simple fix, exclude /usr/bin since it's not a real path.
16918    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16919      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16920      # a path prefixed by /cygdrive for fixpath to work.
16921      new_path="$CYGWIN_ROOT_PATH$input_path"
16922    fi
16923  fi
16924
16925
16926  if test "x$path" != "x$new_path"; then
16927    OUTPUT_ROOT="$new_path"
16928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16929$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16930  fi
16931
16932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16933
16934  path="$OUTPUT_ROOT"
16935  has_colon=`$ECHO $path | $GREP ^.:`
16936  new_path="$path"
16937  if test "x$has_colon" = x; then
16938    # Not in mixed or Windows style, start by that.
16939    new_path=`cmd //c echo $path`
16940  fi
16941
16942
16943  input_path="$new_path"
16944  # Check if we need to convert this using DOS-style short mode. If the path
16945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16946  # take no chances and rewrite it.
16947  # Note: m4 eats our [], so we need to use [ and ] instead.
16948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16949  if test "x$has_forbidden_chars" != x; then
16950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16951    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16952  fi
16953
16954
16955  windows_path="$new_path"
16956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16957    unix_path=`$CYGPATH -u "$windows_path"`
16958    new_path="$unix_path"
16959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16961    new_path="$unix_path"
16962  fi
16963
16964  if test "x$path" != "x$new_path"; then
16965    OUTPUT_ROOT="$new_path"
16966    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16967$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16968  fi
16969
16970  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16971  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16972
16973    else
16974      # We're on a unix platform. Hooray! :)
16975      path="$OUTPUT_ROOT"
16976      has_space=`$ECHO "$path" | $GREP " "`
16977      if test "x$has_space" != x; then
16978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16979$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16980        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16981      fi
16982
16983      # Use eval to expand a potential ~
16984      eval path="$path"
16985      if test ! -f "$path" && test ! -d "$path"; then
16986        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16987      fi
16988
16989      if test -d "$path"; then
16990        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16991      else
16992        dir="`$DIRNAME "$path"`"
16993        base="`$BASENAME "$path"`"
16994        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
16995      fi
16996    fi
16997  fi
16998
16999
17000  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17001  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17002
17003  SPEC=$OUTPUT_ROOT/spec.gmk
17004
17005  CONF_NAME=$CONF_NAME
17006
17007  OUTPUT_ROOT=$OUTPUT_ROOT
17008
17009
17010
17011  # The spec.gmk file contains all variables for the make system.
17012  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17013
17014  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17015  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17016
17017  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17018  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17019
17020  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17021  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17022
17023  # The compare.sh is used to compare the build output to other builds.
17024  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17025
17026  # The generated Makefile knows where the spec.gmk is and where the source is.
17027  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17028  # which will look for generated configurations
17029  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17030
17031
17032
17033# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17034
17035  for ac_prog in apt-get yum port pkgutil pkgadd
17036do
17037  # Extract the first word of "$ac_prog", so it can be a program name with args.
17038set dummy $ac_prog; ac_word=$2
17039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17040$as_echo_n "checking for $ac_word... " >&6; }
17041if ${ac_cv_prog_PKGHANDLER+:} false; then :
17042  $as_echo_n "(cached) " >&6
17043else
17044  if test -n "$PKGHANDLER"; then
17045  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17046else
17047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17048for as_dir in $PATH
17049do
17050  IFS=$as_save_IFS
17051  test -z "$as_dir" && as_dir=.
17052    for ac_exec_ext in '' $ac_executable_extensions; do
17053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17054    ac_cv_prog_PKGHANDLER="$ac_prog"
17055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17056    break 2
17057  fi
17058done
17059  done
17060IFS=$as_save_IFS
17061
17062fi
17063fi
17064PKGHANDLER=$ac_cv_prog_PKGHANDLER
17065if test -n "$PKGHANDLER"; then
17066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17067$as_echo "$PKGHANDLER" >&6; }
17068else
17069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17070$as_echo "no" >&6; }
17071fi
17072
17073
17074  test -n "$PKGHANDLER" && break
17075done
17076
17077
17078
17079# Setup tools that requires more complex handling, or that is not needed by the configure script.
17080
17081
17082
17083  # Publish this variable in the help.
17084
17085
17086  if [ -z "${MAKE+x}" ]; then
17087    # The variable is not set by user, try to locate tool using the code snippet
17088
17089    # Try our hardest to locate a correct version of GNU make
17090    for ac_prog in gmake
17091do
17092  # Extract the first word of "$ac_prog", so it can be a program name with args.
17093set dummy $ac_prog; ac_word=$2
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095$as_echo_n "checking for $ac_word... " >&6; }
17096if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17097  $as_echo_n "(cached) " >&6
17098else
17099  case $CHECK_GMAKE in
17100  [\\/]* | ?:[\\/]*)
17101  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17102  ;;
17103  *)
17104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17105for as_dir in $PATH
17106do
17107  IFS=$as_save_IFS
17108  test -z "$as_dir" && as_dir=.
17109    for ac_exec_ext in '' $ac_executable_extensions; do
17110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17111    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17113    break 2
17114  fi
17115done
17116  done
17117IFS=$as_save_IFS
17118
17119  ;;
17120esac
17121fi
17122CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17123if test -n "$CHECK_GMAKE"; then
17124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17125$as_echo "$CHECK_GMAKE" >&6; }
17126else
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17128$as_echo "no" >&6; }
17129fi
17130
17131
17132  test -n "$CHECK_GMAKE" && break
17133done
17134
17135
17136  MAKE_CANDIDATE=""$CHECK_GMAKE""
17137  DESCRIPTION="gmake in PATH"
17138
17139  # On Cygwin, we require a newer version of make than on other platforms
17140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17141    MAKE_VERSION_EXPR="-e 4\."
17142    MAKE_REQUIRED_VERSION="4.0"
17143   else
17144    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17145    MAKE_REQUIRED_VERSION="3.81"
17146  fi
17147
17148  if test "x$MAKE_CANDIDATE" != x; then
17149    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17150$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17151    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17152    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17153    if test "x$IS_GNU_MAKE" = x; then
17154      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17155$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17156    else
17157      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17158      if test "x$IS_MODERN_MAKE" = x; then
17159        { $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
17160$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;}
17161      else
17162        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17163          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17164            MAKE_EXPECTED_ENV='cygwin'
17165          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17166            MAKE_EXPECTED_ENV='msys'
17167          else
17168            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17169          fi
17170          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17171          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17172        else
17173          # Not relevant for non-Windows
17174          IS_MAKE_CORRECT_ENV=true
17175        fi
17176        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17177          { $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
17178$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;}
17179        else
17180          FOUND_MAKE=$MAKE_CANDIDATE
17181
17182  # Only process if variable expands to non-empty
17183
17184  if test "x$FOUND_MAKE" != x; then
17185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17186
17187  # First separate the path from the arguments. This will split at the first
17188  # space.
17189  complete="$FOUND_MAKE"
17190  path="${complete%% *}"
17191  tmp="$complete EOL"
17192  arguments="${tmp#* }"
17193
17194  # Input might be given as Windows format, start by converting to
17195  # unix format.
17196  new_path=`$CYGPATH -u "$path"`
17197
17198  # Now try to locate executable using which
17199  new_path=`$WHICH "$new_path" 2> /dev/null`
17200  # bat and cmd files are not always considered executable in cygwin causing which
17201  # to not find them
17202  if test "x$new_path" = x \
17203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17205    new_path=`$CYGPATH -u "$path"`
17206  fi
17207  if test "x$new_path" = x; then
17208    # Oops. Which didn't find the executable.
17209    # The splitting of arguments from the executable at a space might have been incorrect,
17210    # since paths with space are more likely in Windows. Give it another try with the whole
17211    # argument.
17212    path="$complete"
17213    arguments="EOL"
17214    new_path=`$CYGPATH -u "$path"`
17215    new_path=`$WHICH "$new_path" 2> /dev/null`
17216    # bat and cmd files are not always considered executable in cygwin causing which
17217    # to not find them
17218    if test "x$new_path" = x \
17219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17221      new_path=`$CYGPATH -u "$path"`
17222    fi
17223    if test "x$new_path" = x; then
17224      # It's still not found. Now this is an unrecoverable error.
17225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17226$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17227      has_space=`$ECHO "$complete" | $GREP " "`
17228      if test "x$has_space" != x; then
17229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17231      fi
17232      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17233    fi
17234  fi
17235
17236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17239  # "foo.exe" is OK but "foo" is an error.
17240  #
17241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17242  # It is also a way to make sure we got the proper file name for the real test later on.
17243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17244  if test "x$test_shortpath" = x; then
17245    # Short path failed, file does not exist as specified.
17246    # Try adding .exe or .cmd
17247    if test -f "${new_path}.exe"; then
17248      input_to_shortpath="${new_path}.exe"
17249    elif test -f "${new_path}.cmd"; then
17250      input_to_shortpath="${new_path}.cmd"
17251    else
17252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17257    fi
17258  else
17259    input_to_shortpath="$new_path"
17260  fi
17261
17262  # Call helper function which possibly converts this using DOS-style short mode.
17263  # If so, the updated path is stored in $new_path.
17264  new_path="$input_to_shortpath"
17265
17266  input_path="$input_to_shortpath"
17267  # Check if we need to convert this using DOS-style short mode. If the path
17268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17269  # take no chances and rewrite it.
17270  # Note: m4 eats our [], so we need to use [ and ] instead.
17271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17272  if test "x$has_forbidden_chars" != x; then
17273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17277      # Going to short mode and back again did indeed matter. Since short mode is
17278      # case insensitive, let's make it lowercase to improve readability.
17279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17280      # Now convert it back to Unix-style (cygpath)
17281      input_path=`$CYGPATH -u "$shortmode_path"`
17282      new_path="$input_path"
17283    fi
17284  fi
17285
17286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17287  if test "x$test_cygdrive_prefix" = x; then
17288    # As a simple fix, exclude /usr/bin since it's not a real path.
17289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17291      # a path prefixed by /cygdrive for fixpath to work.
17292      new_path="$CYGWIN_ROOT_PATH$input_path"
17293    fi
17294  fi
17295
17296  # remove trailing .exe if any
17297  new_path="${new_path/%.exe/}"
17298
17299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17300
17301  # First separate the path from the arguments. This will split at the first
17302  # space.
17303  complete="$FOUND_MAKE"
17304  path="${complete%% *}"
17305  tmp="$complete EOL"
17306  arguments="${tmp#* }"
17307
17308  # Input might be given as Windows format, start by converting to
17309  # unix format.
17310  new_path="$path"
17311
17312  windows_path="$new_path"
17313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17314    unix_path=`$CYGPATH -u "$windows_path"`
17315    new_path="$unix_path"
17316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17318    new_path="$unix_path"
17319  fi
17320
17321
17322  # Now try to locate executable using which
17323  new_path=`$WHICH "$new_path" 2> /dev/null`
17324
17325  if test "x$new_path" = x; then
17326    # Oops. Which didn't find the executable.
17327    # The splitting of arguments from the executable at a space might have been incorrect,
17328    # since paths with space are more likely in Windows. Give it another try with the whole
17329    # argument.
17330    path="$complete"
17331    arguments="EOL"
17332    new_path="$path"
17333
17334  windows_path="$new_path"
17335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17336    unix_path=`$CYGPATH -u "$windows_path"`
17337    new_path="$unix_path"
17338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17340    new_path="$unix_path"
17341  fi
17342
17343
17344    new_path=`$WHICH "$new_path" 2> /dev/null`
17345    # bat and cmd files are not always considered executable in MSYS causing which
17346    # to not find them
17347    if test "x$new_path" = x \
17348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17350      new_path="$path"
17351
17352  windows_path="$new_path"
17353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17354    unix_path=`$CYGPATH -u "$windows_path"`
17355    new_path="$unix_path"
17356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17358    new_path="$unix_path"
17359  fi
17360
17361    fi
17362
17363    if test "x$new_path" = x; then
17364      # It's still not found. Now this is an unrecoverable error.
17365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17366$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17367      has_space=`$ECHO "$complete" | $GREP " "`
17368      if test "x$has_space" != x; then
17369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17371      fi
17372      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17373    fi
17374  fi
17375
17376  # Now new_path has a complete unix path to the binary
17377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17378    # Keep paths in /bin as-is, but remove trailing .exe if any
17379    new_path="${new_path/%.exe/}"
17380    # Do not save /bin paths to all_fixpath_prefixes!
17381  else
17382    # Not in mixed or Windows style, start by that.
17383    new_path=`cmd //c echo $new_path`
17384
17385  input_path="$new_path"
17386  # Check if we need to convert this using DOS-style short mode. If the path
17387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17388  # take no chances and rewrite it.
17389  # Note: m4 eats our [], so we need to use [ and ] instead.
17390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17391  if test "x$has_forbidden_chars" != x; then
17392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17394  fi
17395
17396    # Output is in $new_path
17397
17398  windows_path="$new_path"
17399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17400    unix_path=`$CYGPATH -u "$windows_path"`
17401    new_path="$unix_path"
17402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17404    new_path="$unix_path"
17405  fi
17406
17407    # remove trailing .exe if any
17408    new_path="${new_path/%.exe/}"
17409
17410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17412  fi
17413
17414    else
17415      # We're on a unix platform. Hooray! :)
17416      # First separate the path from the arguments. This will split at the first
17417      # space.
17418      complete="$FOUND_MAKE"
17419      path="${complete%% *}"
17420      tmp="$complete EOL"
17421      arguments="${tmp#* }"
17422
17423      # Cannot rely on the command "which" here since it doesn't always work.
17424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17425      if test -z "$is_absolute_path"; then
17426        # Path to executable is not absolute. Find it.
17427        IFS_save="$IFS"
17428        IFS=:
17429        for p in $PATH; do
17430          if test -f "$p/$path" && test -x "$p/$path"; then
17431            new_path="$p/$path"
17432            break
17433          fi
17434        done
17435        IFS="$IFS_save"
17436      else
17437        # This is an absolute path, we can use it without further modifications.
17438        new_path="$path"
17439      fi
17440
17441      if test "x$new_path" = x; then
17442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17443$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17444        has_space=`$ECHO "$complete" | $GREP " "`
17445        if test "x$has_space" != x; then
17446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17448        fi
17449        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17450      fi
17451    fi
17452
17453    # Now join together the path and the arguments once again
17454    if test "x$arguments" != xEOL; then
17455      new_complete="$new_path ${arguments% *}"
17456    else
17457      new_complete="$new_path"
17458    fi
17459
17460    if test "x$complete" != "x$new_complete"; then
17461      FOUND_MAKE="$new_complete"
17462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17463$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17464    fi
17465  fi
17466
17467        fi
17468      fi
17469    fi
17470  fi
17471
17472
17473    if test "x$FOUND_MAKE" = x; then
17474      for ac_prog in make
17475do
17476  # Extract the first word of "$ac_prog", so it can be a program name with args.
17477set dummy $ac_prog; ac_word=$2
17478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17479$as_echo_n "checking for $ac_word... " >&6; }
17480if ${ac_cv_path_CHECK_MAKE+:} false; then :
17481  $as_echo_n "(cached) " >&6
17482else
17483  case $CHECK_MAKE in
17484  [\\/]* | ?:[\\/]*)
17485  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17486  ;;
17487  *)
17488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_exec_ext in '' $ac_executable_extensions; do
17494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17495    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17497    break 2
17498  fi
17499done
17500  done
17501IFS=$as_save_IFS
17502
17503  ;;
17504esac
17505fi
17506CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17507if test -n "$CHECK_MAKE"; then
17508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17509$as_echo "$CHECK_MAKE" >&6; }
17510else
17511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17512$as_echo "no" >&6; }
17513fi
17514
17515
17516  test -n "$CHECK_MAKE" && break
17517done
17518
17519
17520  MAKE_CANDIDATE=""$CHECK_MAKE""
17521  DESCRIPTION="make in PATH"
17522
17523  # On Cygwin, we require a newer version of make than on other platforms
17524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17525    MAKE_VERSION_EXPR="-e 4\."
17526    MAKE_REQUIRED_VERSION="4.0"
17527   else
17528    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17529    MAKE_REQUIRED_VERSION="3.81"
17530  fi
17531
17532  if test "x$MAKE_CANDIDATE" != x; then
17533    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17534$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17535    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17536    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17537    if test "x$IS_GNU_MAKE" = x; then
17538      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17539$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17540    else
17541      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17542      if test "x$IS_MODERN_MAKE" = x; then
17543        { $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
17544$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;}
17545      else
17546        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17547          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17548            MAKE_EXPECTED_ENV='cygwin'
17549          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17550            MAKE_EXPECTED_ENV='msys'
17551          else
17552            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17553          fi
17554          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17555          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17556        else
17557          # Not relevant for non-Windows
17558          IS_MAKE_CORRECT_ENV=true
17559        fi
17560        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17561          { $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
17562$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;}
17563        else
17564          FOUND_MAKE=$MAKE_CANDIDATE
17565
17566  # Only process if variable expands to non-empty
17567
17568  if test "x$FOUND_MAKE" != x; then
17569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17570
17571  # First separate the path from the arguments. This will split at the first
17572  # space.
17573  complete="$FOUND_MAKE"
17574  path="${complete%% *}"
17575  tmp="$complete EOL"
17576  arguments="${tmp#* }"
17577
17578  # Input might be given as Windows format, start by converting to
17579  # unix format.
17580  new_path=`$CYGPATH -u "$path"`
17581
17582  # Now try to locate executable using which
17583  new_path=`$WHICH "$new_path" 2> /dev/null`
17584  # bat and cmd files are not always considered executable in cygwin causing which
17585  # to not find them
17586  if test "x$new_path" = x \
17587      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17588      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17589    new_path=`$CYGPATH -u "$path"`
17590  fi
17591  if test "x$new_path" = x; then
17592    # Oops. Which didn't find the executable.
17593    # The splitting of arguments from the executable at a space might have been incorrect,
17594    # since paths with space are more likely in Windows. Give it another try with the whole
17595    # argument.
17596    path="$complete"
17597    arguments="EOL"
17598    new_path=`$CYGPATH -u "$path"`
17599    new_path=`$WHICH "$new_path" 2> /dev/null`
17600    # bat and cmd files are not always considered executable in cygwin causing which
17601    # to not find them
17602    if test "x$new_path" = x \
17603        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17604        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17605      new_path=`$CYGPATH -u "$path"`
17606    fi
17607    if test "x$new_path" = x; then
17608      # It's still not found. Now this is an unrecoverable error.
17609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17611      has_space=`$ECHO "$complete" | $GREP " "`
17612      if test "x$has_space" != x; then
17613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17615      fi
17616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17617    fi
17618  fi
17619
17620  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17621  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17622  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17623  # "foo.exe" is OK but "foo" is an error.
17624  #
17625  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17626  # It is also a way to make sure we got the proper file name for the real test later on.
17627  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17628  if test "x$test_shortpath" = x; then
17629    # Short path failed, file does not exist as specified.
17630    # Try adding .exe or .cmd
17631    if test -f "${new_path}.exe"; then
17632      input_to_shortpath="${new_path}.exe"
17633    elif test -f "${new_path}.cmd"; then
17634      input_to_shortpath="${new_path}.cmd"
17635    else
17636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17637$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17638      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17639$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17640      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17641    fi
17642  else
17643    input_to_shortpath="$new_path"
17644  fi
17645
17646  # Call helper function which possibly converts this using DOS-style short mode.
17647  # If so, the updated path is stored in $new_path.
17648  new_path="$input_to_shortpath"
17649
17650  input_path="$input_to_shortpath"
17651  # Check if we need to convert this using DOS-style short mode. If the path
17652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17653  # take no chances and rewrite it.
17654  # Note: m4 eats our [], so we need to use [ and ] instead.
17655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17656  if test "x$has_forbidden_chars" != x; then
17657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17661      # Going to short mode and back again did indeed matter. Since short mode is
17662      # case insensitive, let's make it lowercase to improve readability.
17663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17664      # Now convert it back to Unix-style (cygpath)
17665      input_path=`$CYGPATH -u "$shortmode_path"`
17666      new_path="$input_path"
17667    fi
17668  fi
17669
17670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17671  if test "x$test_cygdrive_prefix" = x; then
17672    # As a simple fix, exclude /usr/bin since it's not a real path.
17673    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17675      # a path prefixed by /cygdrive for fixpath to work.
17676      new_path="$CYGWIN_ROOT_PATH$input_path"
17677    fi
17678  fi
17679
17680  # remove trailing .exe if any
17681  new_path="${new_path/%.exe/}"
17682
17683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17684
17685  # First separate the path from the arguments. This will split at the first
17686  # space.
17687  complete="$FOUND_MAKE"
17688  path="${complete%% *}"
17689  tmp="$complete EOL"
17690  arguments="${tmp#* }"
17691
17692  # Input might be given as Windows format, start by converting to
17693  # unix format.
17694  new_path="$path"
17695
17696  windows_path="$new_path"
17697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17698    unix_path=`$CYGPATH -u "$windows_path"`
17699    new_path="$unix_path"
17700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17702    new_path="$unix_path"
17703  fi
17704
17705
17706  # Now try to locate executable using which
17707  new_path=`$WHICH "$new_path" 2> /dev/null`
17708
17709  if test "x$new_path" = x; then
17710    # Oops. Which didn't find the executable.
17711    # The splitting of arguments from the executable at a space might have been incorrect,
17712    # since paths with space are more likely in Windows. Give it another try with the whole
17713    # argument.
17714    path="$complete"
17715    arguments="EOL"
17716    new_path="$path"
17717
17718  windows_path="$new_path"
17719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17720    unix_path=`$CYGPATH -u "$windows_path"`
17721    new_path="$unix_path"
17722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17724    new_path="$unix_path"
17725  fi
17726
17727
17728    new_path=`$WHICH "$new_path" 2> /dev/null`
17729    # bat and cmd files are not always considered executable in MSYS causing which
17730    # to not find them
17731    if test "x$new_path" = x \
17732        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17733        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17734      new_path="$path"
17735
17736  windows_path="$new_path"
17737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17738    unix_path=`$CYGPATH -u "$windows_path"`
17739    new_path="$unix_path"
17740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17742    new_path="$unix_path"
17743  fi
17744
17745    fi
17746
17747    if test "x$new_path" = x; then
17748      # It's still not found. Now this is an unrecoverable error.
17749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17750$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17751      has_space=`$ECHO "$complete" | $GREP " "`
17752      if test "x$has_space" != x; then
17753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17755      fi
17756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17757    fi
17758  fi
17759
17760  # Now new_path has a complete unix path to the binary
17761  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17762    # Keep paths in /bin as-is, but remove trailing .exe if any
17763    new_path="${new_path/%.exe/}"
17764    # Do not save /bin paths to all_fixpath_prefixes!
17765  else
17766    # Not in mixed or Windows style, start by that.
17767    new_path=`cmd //c echo $new_path`
17768
17769  input_path="$new_path"
17770  # Check if we need to convert this using DOS-style short mode. If the path
17771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17772  # take no chances and rewrite it.
17773  # Note: m4 eats our [], so we need to use [ and ] instead.
17774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17775  if test "x$has_forbidden_chars" != x; then
17776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17777    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17778  fi
17779
17780    # Output is in $new_path
17781
17782  windows_path="$new_path"
17783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17784    unix_path=`$CYGPATH -u "$windows_path"`
17785    new_path="$unix_path"
17786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17788    new_path="$unix_path"
17789  fi
17790
17791    # remove trailing .exe if any
17792    new_path="${new_path/%.exe/}"
17793
17794    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17795    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17796  fi
17797
17798    else
17799      # We're on a unix platform. Hooray! :)
17800      # First separate the path from the arguments. This will split at the first
17801      # space.
17802      complete="$FOUND_MAKE"
17803      path="${complete%% *}"
17804      tmp="$complete EOL"
17805      arguments="${tmp#* }"
17806
17807      # Cannot rely on the command "which" here since it doesn't always work.
17808      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17809      if test -z "$is_absolute_path"; then
17810        # Path to executable is not absolute. Find it.
17811        IFS_save="$IFS"
17812        IFS=:
17813        for p in $PATH; do
17814          if test -f "$p/$path" && test -x "$p/$path"; then
17815            new_path="$p/$path"
17816            break
17817          fi
17818        done
17819        IFS="$IFS_save"
17820      else
17821        # This is an absolute path, we can use it without further modifications.
17822        new_path="$path"
17823      fi
17824
17825      if test "x$new_path" = x; then
17826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17827$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17828        has_space=`$ECHO "$complete" | $GREP " "`
17829        if test "x$has_space" != x; then
17830          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17831$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17832        fi
17833        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17834      fi
17835    fi
17836
17837    # Now join together the path and the arguments once again
17838    if test "x$arguments" != xEOL; then
17839      new_complete="$new_path ${arguments% *}"
17840    else
17841      new_complete="$new_path"
17842    fi
17843
17844    if test "x$complete" != "x$new_complete"; then
17845      FOUND_MAKE="$new_complete"
17846      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17847$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17848    fi
17849  fi
17850
17851        fi
17852      fi
17853    fi
17854  fi
17855
17856    fi
17857
17858    if test "x$FOUND_MAKE" = x; then
17859      if test "x$TOOLCHAIN_PATH" != x; then
17860        # We have a toolchain path, check that as well before giving up.
17861        OLD_PATH=$PATH
17862        PATH=$TOOLCHAIN_PATH:$PATH
17863        for ac_prog in gmake
17864do
17865  # Extract the first word of "$ac_prog", so it can be a program name with args.
17866set dummy $ac_prog; ac_word=$2
17867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17868$as_echo_n "checking for $ac_word... " >&6; }
17869if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17870  $as_echo_n "(cached) " >&6
17871else
17872  case $CHECK_TOOLSDIR_GMAKE in
17873  [\\/]* | ?:[\\/]*)
17874  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17875  ;;
17876  *)
17877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17878for as_dir in $PATH
17879do
17880  IFS=$as_save_IFS
17881  test -z "$as_dir" && as_dir=.
17882    for ac_exec_ext in '' $ac_executable_extensions; do
17883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17884    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17886    break 2
17887  fi
17888done
17889  done
17890IFS=$as_save_IFS
17891
17892  ;;
17893esac
17894fi
17895CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17896if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17898$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17899else
17900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17901$as_echo "no" >&6; }
17902fi
17903
17904
17905  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17906done
17907
17908
17909  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17910  DESCRIPTION="gmake in tools-dir"
17911
17912  # On Cygwin, we require a newer version of make than on other platforms
17913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17914    MAKE_VERSION_EXPR="-e 4\."
17915    MAKE_REQUIRED_VERSION="4.0"
17916   else
17917    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17918    MAKE_REQUIRED_VERSION="3.81"
17919  fi
17920
17921  if test "x$MAKE_CANDIDATE" != x; then
17922    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17923$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17924    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17925    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17926    if test "x$IS_GNU_MAKE" = x; then
17927      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17928$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17929    else
17930      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17931      if test "x$IS_MODERN_MAKE" = x; then
17932        { $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
17933$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;}
17934      else
17935        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17936          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17937            MAKE_EXPECTED_ENV='cygwin'
17938          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17939            MAKE_EXPECTED_ENV='msys'
17940          else
17941            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17942          fi
17943          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17944          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17945        else
17946          # Not relevant for non-Windows
17947          IS_MAKE_CORRECT_ENV=true
17948        fi
17949        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17950          { $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
17951$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;}
17952        else
17953          FOUND_MAKE=$MAKE_CANDIDATE
17954
17955  # Only process if variable expands to non-empty
17956
17957  if test "x$FOUND_MAKE" != x; then
17958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17959
17960  # First separate the path from the arguments. This will split at the first
17961  # space.
17962  complete="$FOUND_MAKE"
17963  path="${complete%% *}"
17964  tmp="$complete EOL"
17965  arguments="${tmp#* }"
17966
17967  # Input might be given as Windows format, start by converting to
17968  # unix format.
17969  new_path=`$CYGPATH -u "$path"`
17970
17971  # Now try to locate executable using which
17972  new_path=`$WHICH "$new_path" 2> /dev/null`
17973  # bat and cmd files are not always considered executable in cygwin causing which
17974  # to not find them
17975  if test "x$new_path" = x \
17976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17978    new_path=`$CYGPATH -u "$path"`
17979  fi
17980  if test "x$new_path" = x; then
17981    # Oops. Which didn't find the executable.
17982    # The splitting of arguments from the executable at a space might have been incorrect,
17983    # since paths with space are more likely in Windows. Give it another try with the whole
17984    # argument.
17985    path="$complete"
17986    arguments="EOL"
17987    new_path=`$CYGPATH -u "$path"`
17988    new_path=`$WHICH "$new_path" 2> /dev/null`
17989    # bat and cmd files are not always considered executable in cygwin causing which
17990    # to not find them
17991    if test "x$new_path" = x \
17992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17994      new_path=`$CYGPATH -u "$path"`
17995    fi
17996    if test "x$new_path" = x; then
17997      # It's still not found. Now this is an unrecoverable error.
17998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17999$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18000      has_space=`$ECHO "$complete" | $GREP " "`
18001      if test "x$has_space" != x; then
18002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18004      fi
18005      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18006    fi
18007  fi
18008
18009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18012  # "foo.exe" is OK but "foo" is an error.
18013  #
18014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18015  # It is also a way to make sure we got the proper file name for the real test later on.
18016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18017  if test "x$test_shortpath" = x; then
18018    # Short path failed, file does not exist as specified.
18019    # Try adding .exe or .cmd
18020    if test -f "${new_path}.exe"; then
18021      input_to_shortpath="${new_path}.exe"
18022    elif test -f "${new_path}.cmd"; then
18023      input_to_shortpath="${new_path}.cmd"
18024    else
18025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18026$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18030    fi
18031  else
18032    input_to_shortpath="$new_path"
18033  fi
18034
18035  # Call helper function which possibly converts this using DOS-style short mode.
18036  # If so, the updated path is stored in $new_path.
18037  new_path="$input_to_shortpath"
18038
18039  input_path="$input_to_shortpath"
18040  # Check if we need to convert this using DOS-style short mode. If the path
18041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18042  # take no chances and rewrite it.
18043  # Note: m4 eats our [], so we need to use [ and ] instead.
18044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18045  if test "x$has_forbidden_chars" != x; then
18046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18050      # Going to short mode and back again did indeed matter. Since short mode is
18051      # case insensitive, let's make it lowercase to improve readability.
18052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18053      # Now convert it back to Unix-style (cygpath)
18054      input_path=`$CYGPATH -u "$shortmode_path"`
18055      new_path="$input_path"
18056    fi
18057  fi
18058
18059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18060  if test "x$test_cygdrive_prefix" = x; then
18061    # As a simple fix, exclude /usr/bin since it's not a real path.
18062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18064      # a path prefixed by /cygdrive for fixpath to work.
18065      new_path="$CYGWIN_ROOT_PATH$input_path"
18066    fi
18067  fi
18068
18069  # remove trailing .exe if any
18070  new_path="${new_path/%.exe/}"
18071
18072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18073
18074  # First separate the path from the arguments. This will split at the first
18075  # space.
18076  complete="$FOUND_MAKE"
18077  path="${complete%% *}"
18078  tmp="$complete EOL"
18079  arguments="${tmp#* }"
18080
18081  # Input might be given as Windows format, start by converting to
18082  # unix format.
18083  new_path="$path"
18084
18085  windows_path="$new_path"
18086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18087    unix_path=`$CYGPATH -u "$windows_path"`
18088    new_path="$unix_path"
18089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18091    new_path="$unix_path"
18092  fi
18093
18094
18095  # Now try to locate executable using which
18096  new_path=`$WHICH "$new_path" 2> /dev/null`
18097
18098  if test "x$new_path" = x; then
18099    # Oops. Which didn't find the executable.
18100    # The splitting of arguments from the executable at a space might have been incorrect,
18101    # since paths with space are more likely in Windows. Give it another try with the whole
18102    # argument.
18103    path="$complete"
18104    arguments="EOL"
18105    new_path="$path"
18106
18107  windows_path="$new_path"
18108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18109    unix_path=`$CYGPATH -u "$windows_path"`
18110    new_path="$unix_path"
18111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18113    new_path="$unix_path"
18114  fi
18115
18116
18117    new_path=`$WHICH "$new_path" 2> /dev/null`
18118    # bat and cmd files are not always considered executable in MSYS causing which
18119    # to not find them
18120    if test "x$new_path" = x \
18121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18123      new_path="$path"
18124
18125  windows_path="$new_path"
18126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18127    unix_path=`$CYGPATH -u "$windows_path"`
18128    new_path="$unix_path"
18129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18131    new_path="$unix_path"
18132  fi
18133
18134    fi
18135
18136    if test "x$new_path" = x; then
18137      # It's still not found. Now this is an unrecoverable error.
18138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18139$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18140      has_space=`$ECHO "$complete" | $GREP " "`
18141      if test "x$has_space" != x; then
18142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18144      fi
18145      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18146    fi
18147  fi
18148
18149  # Now new_path has a complete unix path to the binary
18150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18151    # Keep paths in /bin as-is, but remove trailing .exe if any
18152    new_path="${new_path/%.exe/}"
18153    # Do not save /bin paths to all_fixpath_prefixes!
18154  else
18155    # Not in mixed or Windows style, start by that.
18156    new_path=`cmd //c echo $new_path`
18157
18158  input_path="$new_path"
18159  # Check if we need to convert this using DOS-style short mode. If the path
18160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18161  # take no chances and rewrite it.
18162  # Note: m4 eats our [], so we need to use [ and ] instead.
18163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18164  if test "x$has_forbidden_chars" != x; then
18165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18167  fi
18168
18169    # Output is in $new_path
18170
18171  windows_path="$new_path"
18172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18173    unix_path=`$CYGPATH -u "$windows_path"`
18174    new_path="$unix_path"
18175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18177    new_path="$unix_path"
18178  fi
18179
18180    # remove trailing .exe if any
18181    new_path="${new_path/%.exe/}"
18182
18183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18185  fi
18186
18187    else
18188      # We're on a unix platform. Hooray! :)
18189      # First separate the path from the arguments. This will split at the first
18190      # space.
18191      complete="$FOUND_MAKE"
18192      path="${complete%% *}"
18193      tmp="$complete EOL"
18194      arguments="${tmp#* }"
18195
18196      # Cannot rely on the command "which" here since it doesn't always work.
18197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18198      if test -z "$is_absolute_path"; then
18199        # Path to executable is not absolute. Find it.
18200        IFS_save="$IFS"
18201        IFS=:
18202        for p in $PATH; do
18203          if test -f "$p/$path" && test -x "$p/$path"; then
18204            new_path="$p/$path"
18205            break
18206          fi
18207        done
18208        IFS="$IFS_save"
18209      else
18210        # This is an absolute path, we can use it without further modifications.
18211        new_path="$path"
18212      fi
18213
18214      if test "x$new_path" = x; then
18215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18217        has_space=`$ECHO "$complete" | $GREP " "`
18218        if test "x$has_space" != x; then
18219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18221        fi
18222        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18223      fi
18224    fi
18225
18226    # Now join together the path and the arguments once again
18227    if test "x$arguments" != xEOL; then
18228      new_complete="$new_path ${arguments% *}"
18229    else
18230      new_complete="$new_path"
18231    fi
18232
18233    if test "x$complete" != "x$new_complete"; then
18234      FOUND_MAKE="$new_complete"
18235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18236$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18237    fi
18238  fi
18239
18240        fi
18241      fi
18242    fi
18243  fi
18244
18245        if test "x$FOUND_MAKE" = x; then
18246          for ac_prog in make
18247do
18248  # Extract the first word of "$ac_prog", so it can be a program name with args.
18249set dummy $ac_prog; ac_word=$2
18250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18251$as_echo_n "checking for $ac_word... " >&6; }
18252if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18253  $as_echo_n "(cached) " >&6
18254else
18255  case $CHECK_TOOLSDIR_MAKE in
18256  [\\/]* | ?:[\\/]*)
18257  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18258  ;;
18259  *)
18260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18261for as_dir in $PATH
18262do
18263  IFS=$as_save_IFS
18264  test -z "$as_dir" && as_dir=.
18265    for ac_exec_ext in '' $ac_executable_extensions; do
18266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18267    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18269    break 2
18270  fi
18271done
18272  done
18273IFS=$as_save_IFS
18274
18275  ;;
18276esac
18277fi
18278CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18279if test -n "$CHECK_TOOLSDIR_MAKE"; then
18280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18281$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18282else
18283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18284$as_echo "no" >&6; }
18285fi
18286
18287
18288  test -n "$CHECK_TOOLSDIR_MAKE" && break
18289done
18290
18291
18292  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18293  DESCRIPTION="make in tools-dir"
18294
18295  # On Cygwin, we require a newer version of make than on other platforms
18296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18297    MAKE_VERSION_EXPR="-e 4\."
18298    MAKE_REQUIRED_VERSION="4.0"
18299   else
18300    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18301    MAKE_REQUIRED_VERSION="3.81"
18302  fi
18303
18304  if test "x$MAKE_CANDIDATE" != x; then
18305    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18306$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18307    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18308    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18309    if test "x$IS_GNU_MAKE" = x; then
18310      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18311$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18312    else
18313      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18314      if test "x$IS_MODERN_MAKE" = x; then
18315        { $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
18316$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;}
18317      else
18318        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18319          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18320            MAKE_EXPECTED_ENV='cygwin'
18321          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18322            MAKE_EXPECTED_ENV='msys'
18323          else
18324            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18325          fi
18326          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18327          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18328        else
18329          # Not relevant for non-Windows
18330          IS_MAKE_CORRECT_ENV=true
18331        fi
18332        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18333          { $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
18334$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;}
18335        else
18336          FOUND_MAKE=$MAKE_CANDIDATE
18337
18338  # Only process if variable expands to non-empty
18339
18340  if test "x$FOUND_MAKE" != x; then
18341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18342
18343  # First separate the path from the arguments. This will split at the first
18344  # space.
18345  complete="$FOUND_MAKE"
18346  path="${complete%% *}"
18347  tmp="$complete EOL"
18348  arguments="${tmp#* }"
18349
18350  # Input might be given as Windows format, start by converting to
18351  # unix format.
18352  new_path=`$CYGPATH -u "$path"`
18353
18354  # Now try to locate executable using which
18355  new_path=`$WHICH "$new_path" 2> /dev/null`
18356  # bat and cmd files are not always considered executable in cygwin causing which
18357  # to not find them
18358  if test "x$new_path" = x \
18359      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18360      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18361    new_path=`$CYGPATH -u "$path"`
18362  fi
18363  if test "x$new_path" = x; then
18364    # Oops. Which didn't find the executable.
18365    # The splitting of arguments from the executable at a space might have been incorrect,
18366    # since paths with space are more likely in Windows. Give it another try with the whole
18367    # argument.
18368    path="$complete"
18369    arguments="EOL"
18370    new_path=`$CYGPATH -u "$path"`
18371    new_path=`$WHICH "$new_path" 2> /dev/null`
18372    # bat and cmd files are not always considered executable in cygwin causing which
18373    # to not find them
18374    if test "x$new_path" = x \
18375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18377      new_path=`$CYGPATH -u "$path"`
18378    fi
18379    if test "x$new_path" = x; then
18380      # It's still not found. Now this is an unrecoverable error.
18381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18382$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18383      has_space=`$ECHO "$complete" | $GREP " "`
18384      if test "x$has_space" != x; then
18385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18387      fi
18388      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18389    fi
18390  fi
18391
18392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18395  # "foo.exe" is OK but "foo" is an error.
18396  #
18397  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18398  # It is also a way to make sure we got the proper file name for the real test later on.
18399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18400  if test "x$test_shortpath" = x; then
18401    # Short path failed, file does not exist as specified.
18402    # Try adding .exe or .cmd
18403    if test -f "${new_path}.exe"; then
18404      input_to_shortpath="${new_path}.exe"
18405    elif test -f "${new_path}.cmd"; then
18406      input_to_shortpath="${new_path}.cmd"
18407    else
18408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18409$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18410      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18411$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18412      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18413    fi
18414  else
18415    input_to_shortpath="$new_path"
18416  fi
18417
18418  # Call helper function which possibly converts this using DOS-style short mode.
18419  # If so, the updated path is stored in $new_path.
18420  new_path="$input_to_shortpath"
18421
18422  input_path="$input_to_shortpath"
18423  # Check if we need to convert this using DOS-style short mode. If the path
18424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18425  # take no chances and rewrite it.
18426  # Note: m4 eats our [], so we need to use [ and ] instead.
18427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18428  if test "x$has_forbidden_chars" != x; then
18429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18430    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18431    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18432    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18433      # Going to short mode and back again did indeed matter. Since short mode is
18434      # case insensitive, let's make it lowercase to improve readability.
18435      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18436      # Now convert it back to Unix-style (cygpath)
18437      input_path=`$CYGPATH -u "$shortmode_path"`
18438      new_path="$input_path"
18439    fi
18440  fi
18441
18442  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18443  if test "x$test_cygdrive_prefix" = x; then
18444    # As a simple fix, exclude /usr/bin since it's not a real path.
18445    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18446      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18447      # a path prefixed by /cygdrive for fixpath to work.
18448      new_path="$CYGWIN_ROOT_PATH$input_path"
18449    fi
18450  fi
18451
18452  # remove trailing .exe if any
18453  new_path="${new_path/%.exe/}"
18454
18455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18456
18457  # First separate the path from the arguments. This will split at the first
18458  # space.
18459  complete="$FOUND_MAKE"
18460  path="${complete%% *}"
18461  tmp="$complete EOL"
18462  arguments="${tmp#* }"
18463
18464  # Input might be given as Windows format, start by converting to
18465  # unix format.
18466  new_path="$path"
18467
18468  windows_path="$new_path"
18469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18470    unix_path=`$CYGPATH -u "$windows_path"`
18471    new_path="$unix_path"
18472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18474    new_path="$unix_path"
18475  fi
18476
18477
18478  # Now try to locate executable using which
18479  new_path=`$WHICH "$new_path" 2> /dev/null`
18480
18481  if test "x$new_path" = x; then
18482    # Oops. Which didn't find the executable.
18483    # The splitting of arguments from the executable at a space might have been incorrect,
18484    # since paths with space are more likely in Windows. Give it another try with the whole
18485    # argument.
18486    path="$complete"
18487    arguments="EOL"
18488    new_path="$path"
18489
18490  windows_path="$new_path"
18491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18492    unix_path=`$CYGPATH -u "$windows_path"`
18493    new_path="$unix_path"
18494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18496    new_path="$unix_path"
18497  fi
18498
18499
18500    new_path=`$WHICH "$new_path" 2> /dev/null`
18501    # bat and cmd files are not always considered executable in MSYS causing which
18502    # to not find them
18503    if test "x$new_path" = x \
18504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18506      new_path="$path"
18507
18508  windows_path="$new_path"
18509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18510    unix_path=`$CYGPATH -u "$windows_path"`
18511    new_path="$unix_path"
18512  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18513    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18514    new_path="$unix_path"
18515  fi
18516
18517    fi
18518
18519    if test "x$new_path" = x; then
18520      # It's still not found. Now this is an unrecoverable error.
18521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18522$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18523      has_space=`$ECHO "$complete" | $GREP " "`
18524      if test "x$has_space" != x; then
18525        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18526$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18527      fi
18528      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18529    fi
18530  fi
18531
18532  # Now new_path has a complete unix path to the binary
18533  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18534    # Keep paths in /bin as-is, but remove trailing .exe if any
18535    new_path="${new_path/%.exe/}"
18536    # Do not save /bin paths to all_fixpath_prefixes!
18537  else
18538    # Not in mixed or Windows style, start by that.
18539    new_path=`cmd //c echo $new_path`
18540
18541  input_path="$new_path"
18542  # Check if we need to convert this using DOS-style short mode. If the path
18543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18544  # take no chances and rewrite it.
18545  # Note: m4 eats our [], so we need to use [ and ] instead.
18546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18547  if test "x$has_forbidden_chars" != x; then
18548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18550  fi
18551
18552    # Output is in $new_path
18553
18554  windows_path="$new_path"
18555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18556    unix_path=`$CYGPATH -u "$windows_path"`
18557    new_path="$unix_path"
18558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18560    new_path="$unix_path"
18561  fi
18562
18563    # remove trailing .exe if any
18564    new_path="${new_path/%.exe/}"
18565
18566    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18567    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18568  fi
18569
18570    else
18571      # We're on a unix platform. Hooray! :)
18572      # First separate the path from the arguments. This will split at the first
18573      # space.
18574      complete="$FOUND_MAKE"
18575      path="${complete%% *}"
18576      tmp="$complete EOL"
18577      arguments="${tmp#* }"
18578
18579      # Cannot rely on the command "which" here since it doesn't always work.
18580      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18581      if test -z "$is_absolute_path"; then
18582        # Path to executable is not absolute. Find it.
18583        IFS_save="$IFS"
18584        IFS=:
18585        for p in $PATH; do
18586          if test -f "$p/$path" && test -x "$p/$path"; then
18587            new_path="$p/$path"
18588            break
18589          fi
18590        done
18591        IFS="$IFS_save"
18592      else
18593        # This is an absolute path, we can use it without further modifications.
18594        new_path="$path"
18595      fi
18596
18597      if test "x$new_path" = x; then
18598        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18599$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18600        has_space=`$ECHO "$complete" | $GREP " "`
18601        if test "x$has_space" != x; then
18602          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18603$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18604        fi
18605        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18606      fi
18607    fi
18608
18609    # Now join together the path and the arguments once again
18610    if test "x$arguments" != xEOL; then
18611      new_complete="$new_path ${arguments% *}"
18612    else
18613      new_complete="$new_path"
18614    fi
18615
18616    if test "x$complete" != "x$new_complete"; then
18617      FOUND_MAKE="$new_complete"
18618      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18619$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18620    fi
18621  fi
18622
18623        fi
18624      fi
18625    fi
18626  fi
18627
18628        fi
18629        PATH=$OLD_PATH
18630      fi
18631    fi
18632
18633    if test "x$FOUND_MAKE" = x; then
18634      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
18635    fi
18636
18637  else
18638    # The variable is set, but is it from the command line or the environment?
18639
18640    # Try to remove the string !MAKE! from our list.
18641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18643      # If it failed, the variable was not from the command line. Ignore it,
18644      # but warn the user (except for BASH, which is always set by the calling BASH).
18645      if test "xMAKE" != xBASH; then
18646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18647$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18648      fi
18649      # Try to locate tool using the code snippet
18650
18651    # Try our hardest to locate a correct version of GNU make
18652    for ac_prog in gmake
18653do
18654  # Extract the first word of "$ac_prog", so it can be a program name with args.
18655set dummy $ac_prog; ac_word=$2
18656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18657$as_echo_n "checking for $ac_word... " >&6; }
18658if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18659  $as_echo_n "(cached) " >&6
18660else
18661  case $CHECK_GMAKE in
18662  [\\/]* | ?:[\\/]*)
18663  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18664  ;;
18665  *)
18666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18667for as_dir in $PATH
18668do
18669  IFS=$as_save_IFS
18670  test -z "$as_dir" && as_dir=.
18671    for ac_exec_ext in '' $ac_executable_extensions; do
18672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18673    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18675    break 2
18676  fi
18677done
18678  done
18679IFS=$as_save_IFS
18680
18681  ;;
18682esac
18683fi
18684CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18685if test -n "$CHECK_GMAKE"; then
18686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18687$as_echo "$CHECK_GMAKE" >&6; }
18688else
18689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18690$as_echo "no" >&6; }
18691fi
18692
18693
18694  test -n "$CHECK_GMAKE" && break
18695done
18696
18697
18698  MAKE_CANDIDATE=""$CHECK_GMAKE""
18699  DESCRIPTION="gmake in PATH"
18700
18701  # On Cygwin, we require a newer version of make than on other platforms
18702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18703    MAKE_VERSION_EXPR="-e 4\."
18704    MAKE_REQUIRED_VERSION="4.0"
18705   else
18706    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18707    MAKE_REQUIRED_VERSION="3.81"
18708  fi
18709
18710  if test "x$MAKE_CANDIDATE" != x; then
18711    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18712$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18713    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18714    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18715    if test "x$IS_GNU_MAKE" = x; then
18716      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18717$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18718    else
18719      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18720      if test "x$IS_MODERN_MAKE" = x; then
18721        { $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
18722$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;}
18723      else
18724        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18725          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18726            MAKE_EXPECTED_ENV='cygwin'
18727          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18728            MAKE_EXPECTED_ENV='msys'
18729          else
18730            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18731          fi
18732          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18733          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18734        else
18735          # Not relevant for non-Windows
18736          IS_MAKE_CORRECT_ENV=true
18737        fi
18738        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18739          { $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
18740$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;}
18741        else
18742          FOUND_MAKE=$MAKE_CANDIDATE
18743
18744  # Only process if variable expands to non-empty
18745
18746  if test "x$FOUND_MAKE" != x; then
18747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18748
18749  # First separate the path from the arguments. This will split at the first
18750  # space.
18751  complete="$FOUND_MAKE"
18752  path="${complete%% *}"
18753  tmp="$complete EOL"
18754  arguments="${tmp#* }"
18755
18756  # Input might be given as Windows format, start by converting to
18757  # unix format.
18758  new_path=`$CYGPATH -u "$path"`
18759
18760  # Now try to locate executable using which
18761  new_path=`$WHICH "$new_path" 2> /dev/null`
18762  # bat and cmd files are not always considered executable in cygwin causing which
18763  # to not find them
18764  if test "x$new_path" = x \
18765      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18766      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18767    new_path=`$CYGPATH -u "$path"`
18768  fi
18769  if test "x$new_path" = x; then
18770    # Oops. Which didn't find the executable.
18771    # The splitting of arguments from the executable at a space might have been incorrect,
18772    # since paths with space are more likely in Windows. Give it another try with the whole
18773    # argument.
18774    path="$complete"
18775    arguments="EOL"
18776    new_path=`$CYGPATH -u "$path"`
18777    new_path=`$WHICH "$new_path" 2> /dev/null`
18778    # bat and cmd files are not always considered executable in cygwin causing which
18779    # to not find them
18780    if test "x$new_path" = x \
18781        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18782        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18783      new_path=`$CYGPATH -u "$path"`
18784    fi
18785    if test "x$new_path" = x; then
18786      # It's still not found. Now this is an unrecoverable error.
18787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18788$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18789      has_space=`$ECHO "$complete" | $GREP " "`
18790      if test "x$has_space" != x; then
18791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18793      fi
18794      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18795    fi
18796  fi
18797
18798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18801  # "foo.exe" is OK but "foo" is an error.
18802  #
18803  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18804  # It is also a way to make sure we got the proper file name for the real test later on.
18805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18806  if test "x$test_shortpath" = x; then
18807    # Short path failed, file does not exist as specified.
18808    # Try adding .exe or .cmd
18809    if test -f "${new_path}.exe"; then
18810      input_to_shortpath="${new_path}.exe"
18811    elif test -f "${new_path}.cmd"; then
18812      input_to_shortpath="${new_path}.cmd"
18813    else
18814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18815$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18816      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18817$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18818      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18819    fi
18820  else
18821    input_to_shortpath="$new_path"
18822  fi
18823
18824  # Call helper function which possibly converts this using DOS-style short mode.
18825  # If so, the updated path is stored in $new_path.
18826  new_path="$input_to_shortpath"
18827
18828  input_path="$input_to_shortpath"
18829  # Check if we need to convert this using DOS-style short mode. If the path
18830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18831  # take no chances and rewrite it.
18832  # Note: m4 eats our [], so we need to use [ and ] instead.
18833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18834  if test "x$has_forbidden_chars" != x; then
18835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18839      # Going to short mode and back again did indeed matter. Since short mode is
18840      # case insensitive, let's make it lowercase to improve readability.
18841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18842      # Now convert it back to Unix-style (cygpath)
18843      input_path=`$CYGPATH -u "$shortmode_path"`
18844      new_path="$input_path"
18845    fi
18846  fi
18847
18848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18849  if test "x$test_cygdrive_prefix" = x; then
18850    # As a simple fix, exclude /usr/bin since it's not a real path.
18851    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18853      # a path prefixed by /cygdrive for fixpath to work.
18854      new_path="$CYGWIN_ROOT_PATH$input_path"
18855    fi
18856  fi
18857
18858  # remove trailing .exe if any
18859  new_path="${new_path/%.exe/}"
18860
18861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18862
18863  # First separate the path from the arguments. This will split at the first
18864  # space.
18865  complete="$FOUND_MAKE"
18866  path="${complete%% *}"
18867  tmp="$complete EOL"
18868  arguments="${tmp#* }"
18869
18870  # Input might be given as Windows format, start by converting to
18871  # unix format.
18872  new_path="$path"
18873
18874  windows_path="$new_path"
18875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18876    unix_path=`$CYGPATH -u "$windows_path"`
18877    new_path="$unix_path"
18878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18880    new_path="$unix_path"
18881  fi
18882
18883
18884  # Now try to locate executable using which
18885  new_path=`$WHICH "$new_path" 2> /dev/null`
18886
18887  if test "x$new_path" = x; then
18888    # Oops. Which didn't find the executable.
18889    # The splitting of arguments from the executable at a space might have been incorrect,
18890    # since paths with space are more likely in Windows. Give it another try with the whole
18891    # argument.
18892    path="$complete"
18893    arguments="EOL"
18894    new_path="$path"
18895
18896  windows_path="$new_path"
18897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18898    unix_path=`$CYGPATH -u "$windows_path"`
18899    new_path="$unix_path"
18900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18902    new_path="$unix_path"
18903  fi
18904
18905
18906    new_path=`$WHICH "$new_path" 2> /dev/null`
18907    # bat and cmd files are not always considered executable in MSYS causing which
18908    # to not find them
18909    if test "x$new_path" = x \
18910        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18911        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18912      new_path="$path"
18913
18914  windows_path="$new_path"
18915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18916    unix_path=`$CYGPATH -u "$windows_path"`
18917    new_path="$unix_path"
18918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18920    new_path="$unix_path"
18921  fi
18922
18923    fi
18924
18925    if test "x$new_path" = x; then
18926      # It's still not found. Now this is an unrecoverable error.
18927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18928$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18929      has_space=`$ECHO "$complete" | $GREP " "`
18930      if test "x$has_space" != x; then
18931        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18932$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18933      fi
18934      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18935    fi
18936  fi
18937
18938  # Now new_path has a complete unix path to the binary
18939  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18940    # Keep paths in /bin as-is, but remove trailing .exe if any
18941    new_path="${new_path/%.exe/}"
18942    # Do not save /bin paths to all_fixpath_prefixes!
18943  else
18944    # Not in mixed or Windows style, start by that.
18945    new_path=`cmd //c echo $new_path`
18946
18947  input_path="$new_path"
18948  # Check if we need to convert this using DOS-style short mode. If the path
18949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18950  # take no chances and rewrite it.
18951  # Note: m4 eats our [], so we need to use [ and ] instead.
18952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18953  if test "x$has_forbidden_chars" != x; then
18954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18956  fi
18957
18958    # Output is in $new_path
18959
18960  windows_path="$new_path"
18961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18962    unix_path=`$CYGPATH -u "$windows_path"`
18963    new_path="$unix_path"
18964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18966    new_path="$unix_path"
18967  fi
18968
18969    # remove trailing .exe if any
18970    new_path="${new_path/%.exe/}"
18971
18972    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18973    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18974  fi
18975
18976    else
18977      # We're on a unix platform. Hooray! :)
18978      # First separate the path from the arguments. This will split at the first
18979      # space.
18980      complete="$FOUND_MAKE"
18981      path="${complete%% *}"
18982      tmp="$complete EOL"
18983      arguments="${tmp#* }"
18984
18985      # Cannot rely on the command "which" here since it doesn't always work.
18986      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18987      if test -z "$is_absolute_path"; then
18988        # Path to executable is not absolute. Find it.
18989        IFS_save="$IFS"
18990        IFS=:
18991        for p in $PATH; do
18992          if test -f "$p/$path" && test -x "$p/$path"; then
18993            new_path="$p/$path"
18994            break
18995          fi
18996        done
18997        IFS="$IFS_save"
18998      else
18999        # This is an absolute path, we can use it without further modifications.
19000        new_path="$path"
19001      fi
19002
19003      if test "x$new_path" = x; then
19004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19005$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19006        has_space=`$ECHO "$complete" | $GREP " "`
19007        if test "x$has_space" != x; then
19008          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19009$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19010        fi
19011        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19012      fi
19013    fi
19014
19015    # Now join together the path and the arguments once again
19016    if test "x$arguments" != xEOL; then
19017      new_complete="$new_path ${arguments% *}"
19018    else
19019      new_complete="$new_path"
19020    fi
19021
19022    if test "x$complete" != "x$new_complete"; then
19023      FOUND_MAKE="$new_complete"
19024      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19025$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19026    fi
19027  fi
19028
19029        fi
19030      fi
19031    fi
19032  fi
19033
19034
19035    if test "x$FOUND_MAKE" = x; then
19036      for ac_prog in make
19037do
19038  # Extract the first word of "$ac_prog", so it can be a program name with args.
19039set dummy $ac_prog; ac_word=$2
19040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19041$as_echo_n "checking for $ac_word... " >&6; }
19042if ${ac_cv_path_CHECK_MAKE+:} false; then :
19043  $as_echo_n "(cached) " >&6
19044else
19045  case $CHECK_MAKE in
19046  [\\/]* | ?:[\\/]*)
19047  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19048  ;;
19049  *)
19050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19051for as_dir in $PATH
19052do
19053  IFS=$as_save_IFS
19054  test -z "$as_dir" && as_dir=.
19055    for ac_exec_ext in '' $ac_executable_extensions; do
19056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19057    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19059    break 2
19060  fi
19061done
19062  done
19063IFS=$as_save_IFS
19064
19065  ;;
19066esac
19067fi
19068CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19069if test -n "$CHECK_MAKE"; then
19070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19071$as_echo "$CHECK_MAKE" >&6; }
19072else
19073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19074$as_echo "no" >&6; }
19075fi
19076
19077
19078  test -n "$CHECK_MAKE" && break
19079done
19080
19081
19082  MAKE_CANDIDATE=""$CHECK_MAKE""
19083  DESCRIPTION="make in PATH"
19084
19085  # On Cygwin, we require a newer version of make than on other platforms
19086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19087    MAKE_VERSION_EXPR="-e 4\."
19088    MAKE_REQUIRED_VERSION="4.0"
19089   else
19090    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19091    MAKE_REQUIRED_VERSION="3.81"
19092  fi
19093
19094  if test "x$MAKE_CANDIDATE" != x; then
19095    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19096$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19097    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19098    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19099    if test "x$IS_GNU_MAKE" = x; then
19100      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19101$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19102    else
19103      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19104      if test "x$IS_MODERN_MAKE" = x; then
19105        { $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
19106$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;}
19107      else
19108        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19109          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19110            MAKE_EXPECTED_ENV='cygwin'
19111          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19112            MAKE_EXPECTED_ENV='msys'
19113          else
19114            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19115          fi
19116          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19117          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19118        else
19119          # Not relevant for non-Windows
19120          IS_MAKE_CORRECT_ENV=true
19121        fi
19122        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19123          { $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
19124$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;}
19125        else
19126          FOUND_MAKE=$MAKE_CANDIDATE
19127
19128  # Only process if variable expands to non-empty
19129
19130  if test "x$FOUND_MAKE" != x; then
19131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19132
19133  # First separate the path from the arguments. This will split at the first
19134  # space.
19135  complete="$FOUND_MAKE"
19136  path="${complete%% *}"
19137  tmp="$complete EOL"
19138  arguments="${tmp#* }"
19139
19140  # Input might be given as Windows format, start by converting to
19141  # unix format.
19142  new_path=`$CYGPATH -u "$path"`
19143
19144  # Now try to locate executable using which
19145  new_path=`$WHICH "$new_path" 2> /dev/null`
19146  # bat and cmd files are not always considered executable in cygwin causing which
19147  # to not find them
19148  if test "x$new_path" = x \
19149      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19150      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19151    new_path=`$CYGPATH -u "$path"`
19152  fi
19153  if test "x$new_path" = x; then
19154    # Oops. Which didn't find the executable.
19155    # The splitting of arguments from the executable at a space might have been incorrect,
19156    # since paths with space are more likely in Windows. Give it another try with the whole
19157    # argument.
19158    path="$complete"
19159    arguments="EOL"
19160    new_path=`$CYGPATH -u "$path"`
19161    new_path=`$WHICH "$new_path" 2> /dev/null`
19162    # bat and cmd files are not always considered executable in cygwin causing which
19163    # to not find them
19164    if test "x$new_path" = x \
19165        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19166        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19167      new_path=`$CYGPATH -u "$path"`
19168    fi
19169    if test "x$new_path" = x; then
19170      # It's still not found. Now this is an unrecoverable error.
19171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19172$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19173      has_space=`$ECHO "$complete" | $GREP " "`
19174      if test "x$has_space" != x; then
19175        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19176$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19177      fi
19178      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19179    fi
19180  fi
19181
19182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19185  # "foo.exe" is OK but "foo" is an error.
19186  #
19187  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19188  # It is also a way to make sure we got the proper file name for the real test later on.
19189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19190  if test "x$test_shortpath" = x; then
19191    # Short path failed, file does not exist as specified.
19192    # Try adding .exe or .cmd
19193    if test -f "${new_path}.exe"; then
19194      input_to_shortpath="${new_path}.exe"
19195    elif test -f "${new_path}.cmd"; then
19196      input_to_shortpath="${new_path}.cmd"
19197    else
19198      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19199$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19200      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19201$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19203    fi
19204  else
19205    input_to_shortpath="$new_path"
19206  fi
19207
19208  # Call helper function which possibly converts this using DOS-style short mode.
19209  # If so, the updated path is stored in $new_path.
19210  new_path="$input_to_shortpath"
19211
19212  input_path="$input_to_shortpath"
19213  # Check if we need to convert this using DOS-style short mode. If the path
19214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19215  # take no chances and rewrite it.
19216  # Note: m4 eats our [], so we need to use [ and ] instead.
19217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19218  if test "x$has_forbidden_chars" != x; then
19219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19223      # Going to short mode and back again did indeed matter. Since short mode is
19224      # case insensitive, let's make it lowercase to improve readability.
19225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19226      # Now convert it back to Unix-style (cygpath)
19227      input_path=`$CYGPATH -u "$shortmode_path"`
19228      new_path="$input_path"
19229    fi
19230  fi
19231
19232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19233  if test "x$test_cygdrive_prefix" = x; then
19234    # As a simple fix, exclude /usr/bin since it's not a real path.
19235    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19237      # a path prefixed by /cygdrive for fixpath to work.
19238      new_path="$CYGWIN_ROOT_PATH$input_path"
19239    fi
19240  fi
19241
19242  # remove trailing .exe if any
19243  new_path="${new_path/%.exe/}"
19244
19245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19246
19247  # First separate the path from the arguments. This will split at the first
19248  # space.
19249  complete="$FOUND_MAKE"
19250  path="${complete%% *}"
19251  tmp="$complete EOL"
19252  arguments="${tmp#* }"
19253
19254  # Input might be given as Windows format, start by converting to
19255  # unix format.
19256  new_path="$path"
19257
19258  windows_path="$new_path"
19259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19260    unix_path=`$CYGPATH -u "$windows_path"`
19261    new_path="$unix_path"
19262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19264    new_path="$unix_path"
19265  fi
19266
19267
19268  # Now try to locate executable using which
19269  new_path=`$WHICH "$new_path" 2> /dev/null`
19270
19271  if test "x$new_path" = x; then
19272    # Oops. Which didn't find the executable.
19273    # The splitting of arguments from the executable at a space might have been incorrect,
19274    # since paths with space are more likely in Windows. Give it another try with the whole
19275    # argument.
19276    path="$complete"
19277    arguments="EOL"
19278    new_path="$path"
19279
19280  windows_path="$new_path"
19281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19282    unix_path=`$CYGPATH -u "$windows_path"`
19283    new_path="$unix_path"
19284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19286    new_path="$unix_path"
19287  fi
19288
19289
19290    new_path=`$WHICH "$new_path" 2> /dev/null`
19291    # bat and cmd files are not always considered executable in MSYS causing which
19292    # to not find them
19293    if test "x$new_path" = x \
19294        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19295        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19296      new_path="$path"
19297
19298  windows_path="$new_path"
19299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19300    unix_path=`$CYGPATH -u "$windows_path"`
19301    new_path="$unix_path"
19302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19304    new_path="$unix_path"
19305  fi
19306
19307    fi
19308
19309    if test "x$new_path" = x; then
19310      # It's still not found. Now this is an unrecoverable error.
19311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19312$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19313      has_space=`$ECHO "$complete" | $GREP " "`
19314      if test "x$has_space" != x; then
19315        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19316$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19317      fi
19318      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19319    fi
19320  fi
19321
19322  # Now new_path has a complete unix path to the binary
19323  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19324    # Keep paths in /bin as-is, but remove trailing .exe if any
19325    new_path="${new_path/%.exe/}"
19326    # Do not save /bin paths to all_fixpath_prefixes!
19327  else
19328    # Not in mixed or Windows style, start by that.
19329    new_path=`cmd //c echo $new_path`
19330
19331  input_path="$new_path"
19332  # Check if we need to convert this using DOS-style short mode. If the path
19333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19334  # take no chances and rewrite it.
19335  # Note: m4 eats our [], so we need to use [ and ] instead.
19336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19337  if test "x$has_forbidden_chars" != x; then
19338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19339    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19340  fi
19341
19342    # Output is in $new_path
19343
19344  windows_path="$new_path"
19345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19346    unix_path=`$CYGPATH -u "$windows_path"`
19347    new_path="$unix_path"
19348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19350    new_path="$unix_path"
19351  fi
19352
19353    # remove trailing .exe if any
19354    new_path="${new_path/%.exe/}"
19355
19356    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19357    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19358  fi
19359
19360    else
19361      # We're on a unix platform. Hooray! :)
19362      # First separate the path from the arguments. This will split at the first
19363      # space.
19364      complete="$FOUND_MAKE"
19365      path="${complete%% *}"
19366      tmp="$complete EOL"
19367      arguments="${tmp#* }"
19368
19369      # Cannot rely on the command "which" here since it doesn't always work.
19370      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19371      if test -z "$is_absolute_path"; then
19372        # Path to executable is not absolute. Find it.
19373        IFS_save="$IFS"
19374        IFS=:
19375        for p in $PATH; do
19376          if test -f "$p/$path" && test -x "$p/$path"; then
19377            new_path="$p/$path"
19378            break
19379          fi
19380        done
19381        IFS="$IFS_save"
19382      else
19383        # This is an absolute path, we can use it without further modifications.
19384        new_path="$path"
19385      fi
19386
19387      if test "x$new_path" = x; then
19388        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19389$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19390        has_space=`$ECHO "$complete" | $GREP " "`
19391        if test "x$has_space" != x; then
19392          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19393$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19394        fi
19395        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19396      fi
19397    fi
19398
19399    # Now join together the path and the arguments once again
19400    if test "x$arguments" != xEOL; then
19401      new_complete="$new_path ${arguments% *}"
19402    else
19403      new_complete="$new_path"
19404    fi
19405
19406    if test "x$complete" != "x$new_complete"; then
19407      FOUND_MAKE="$new_complete"
19408      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19409$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19410    fi
19411  fi
19412
19413        fi
19414      fi
19415    fi
19416  fi
19417
19418    fi
19419
19420    if test "x$FOUND_MAKE" = x; then
19421      if test "x$TOOLCHAIN_PATH" != x; then
19422        # We have a toolchain path, check that as well before giving up.
19423        OLD_PATH=$PATH
19424        PATH=$TOOLCHAIN_PATH:$PATH
19425        for ac_prog in gmake
19426do
19427  # Extract the first word of "$ac_prog", so it can be a program name with args.
19428set dummy $ac_prog; ac_word=$2
19429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19430$as_echo_n "checking for $ac_word... " >&6; }
19431if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19432  $as_echo_n "(cached) " >&6
19433else
19434  case $CHECK_TOOLSDIR_GMAKE in
19435  [\\/]* | ?:[\\/]*)
19436  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19437  ;;
19438  *)
19439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19440for as_dir in $PATH
19441do
19442  IFS=$as_save_IFS
19443  test -z "$as_dir" && as_dir=.
19444    for ac_exec_ext in '' $ac_executable_extensions; do
19445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19446    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19448    break 2
19449  fi
19450done
19451  done
19452IFS=$as_save_IFS
19453
19454  ;;
19455esac
19456fi
19457CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19458if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19460$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19461else
19462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19463$as_echo "no" >&6; }
19464fi
19465
19466
19467  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19468done
19469
19470
19471  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19472  DESCRIPTION="gmake in tools-dir"
19473
19474  # On Cygwin, we require a newer version of make than on other platforms
19475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19476    MAKE_VERSION_EXPR="-e 4\."
19477    MAKE_REQUIRED_VERSION="4.0"
19478   else
19479    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19480    MAKE_REQUIRED_VERSION="3.81"
19481  fi
19482
19483  if test "x$MAKE_CANDIDATE" != x; then
19484    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19485$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19486    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19487    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19488    if test "x$IS_GNU_MAKE" = x; then
19489      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19490$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19491    else
19492      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19493      if test "x$IS_MODERN_MAKE" = x; then
19494        { $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
19495$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;}
19496      else
19497        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19498          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19499            MAKE_EXPECTED_ENV='cygwin'
19500          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19501            MAKE_EXPECTED_ENV='msys'
19502          else
19503            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19504          fi
19505          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19506          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19507        else
19508          # Not relevant for non-Windows
19509          IS_MAKE_CORRECT_ENV=true
19510        fi
19511        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19512          { $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
19513$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;}
19514        else
19515          FOUND_MAKE=$MAKE_CANDIDATE
19516
19517  # Only process if variable expands to non-empty
19518
19519  if test "x$FOUND_MAKE" != x; then
19520    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19521
19522  # First separate the path from the arguments. This will split at the first
19523  # space.
19524  complete="$FOUND_MAKE"
19525  path="${complete%% *}"
19526  tmp="$complete EOL"
19527  arguments="${tmp#* }"
19528
19529  # Input might be given as Windows format, start by converting to
19530  # unix format.
19531  new_path=`$CYGPATH -u "$path"`
19532
19533  # Now try to locate executable using which
19534  new_path=`$WHICH "$new_path" 2> /dev/null`
19535  # bat and cmd files are not always considered executable in cygwin causing which
19536  # to not find them
19537  if test "x$new_path" = x \
19538      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19539      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19540    new_path=`$CYGPATH -u "$path"`
19541  fi
19542  if test "x$new_path" = x; then
19543    # Oops. Which didn't find the executable.
19544    # The splitting of arguments from the executable at a space might have been incorrect,
19545    # since paths with space are more likely in Windows. Give it another try with the whole
19546    # argument.
19547    path="$complete"
19548    arguments="EOL"
19549    new_path=`$CYGPATH -u "$path"`
19550    new_path=`$WHICH "$new_path" 2> /dev/null`
19551    # bat and cmd files are not always considered executable in cygwin causing which
19552    # to not find them
19553    if test "x$new_path" = x \
19554        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19555        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19556      new_path=`$CYGPATH -u "$path"`
19557    fi
19558    if test "x$new_path" = x; then
19559      # It's still not found. Now this is an unrecoverable error.
19560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19561$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19562      has_space=`$ECHO "$complete" | $GREP " "`
19563      if test "x$has_space" != x; then
19564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19566      fi
19567      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19568    fi
19569  fi
19570
19571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19574  # "foo.exe" is OK but "foo" is an error.
19575  #
19576  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19577  # It is also a way to make sure we got the proper file name for the real test later on.
19578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19579  if test "x$test_shortpath" = x; then
19580    # Short path failed, file does not exist as specified.
19581    # Try adding .exe or .cmd
19582    if test -f "${new_path}.exe"; then
19583      input_to_shortpath="${new_path}.exe"
19584    elif test -f "${new_path}.cmd"; then
19585      input_to_shortpath="${new_path}.cmd"
19586    else
19587      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19588$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19589      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19590$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19591      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19592    fi
19593  else
19594    input_to_shortpath="$new_path"
19595  fi
19596
19597  # Call helper function which possibly converts this using DOS-style short mode.
19598  # If so, the updated path is stored in $new_path.
19599  new_path="$input_to_shortpath"
19600
19601  input_path="$input_to_shortpath"
19602  # Check if we need to convert this using DOS-style short mode. If the path
19603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19604  # take no chances and rewrite it.
19605  # Note: m4 eats our [], so we need to use [ and ] instead.
19606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19607  if test "x$has_forbidden_chars" != x; then
19608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19612      # Going to short mode and back again did indeed matter. Since short mode is
19613      # case insensitive, let's make it lowercase to improve readability.
19614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19615      # Now convert it back to Unix-style (cygpath)
19616      input_path=`$CYGPATH -u "$shortmode_path"`
19617      new_path="$input_path"
19618    fi
19619  fi
19620
19621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19622  if test "x$test_cygdrive_prefix" = x; then
19623    # As a simple fix, exclude /usr/bin since it's not a real path.
19624    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19626      # a path prefixed by /cygdrive for fixpath to work.
19627      new_path="$CYGWIN_ROOT_PATH$input_path"
19628    fi
19629  fi
19630
19631  # remove trailing .exe if any
19632  new_path="${new_path/%.exe/}"
19633
19634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19635
19636  # First separate the path from the arguments. This will split at the first
19637  # space.
19638  complete="$FOUND_MAKE"
19639  path="${complete%% *}"
19640  tmp="$complete EOL"
19641  arguments="${tmp#* }"
19642
19643  # Input might be given as Windows format, start by converting to
19644  # unix format.
19645  new_path="$path"
19646
19647  windows_path="$new_path"
19648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19649    unix_path=`$CYGPATH -u "$windows_path"`
19650    new_path="$unix_path"
19651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19653    new_path="$unix_path"
19654  fi
19655
19656
19657  # Now try to locate executable using which
19658  new_path=`$WHICH "$new_path" 2> /dev/null`
19659
19660  if test "x$new_path" = x; then
19661    # Oops. Which didn't find the executable.
19662    # The splitting of arguments from the executable at a space might have been incorrect,
19663    # since paths with space are more likely in Windows. Give it another try with the whole
19664    # argument.
19665    path="$complete"
19666    arguments="EOL"
19667    new_path="$path"
19668
19669  windows_path="$new_path"
19670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19671    unix_path=`$CYGPATH -u "$windows_path"`
19672    new_path="$unix_path"
19673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19675    new_path="$unix_path"
19676  fi
19677
19678
19679    new_path=`$WHICH "$new_path" 2> /dev/null`
19680    # bat and cmd files are not always considered executable in MSYS causing which
19681    # to not find them
19682    if test "x$new_path" = x \
19683        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19684        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19685      new_path="$path"
19686
19687  windows_path="$new_path"
19688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19689    unix_path=`$CYGPATH -u "$windows_path"`
19690    new_path="$unix_path"
19691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19693    new_path="$unix_path"
19694  fi
19695
19696    fi
19697
19698    if test "x$new_path" = x; then
19699      # It's still not found. Now this is an unrecoverable error.
19700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19701$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19702      has_space=`$ECHO "$complete" | $GREP " "`
19703      if test "x$has_space" != x; then
19704        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19705$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19706      fi
19707      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19708    fi
19709  fi
19710
19711  # Now new_path has a complete unix path to the binary
19712  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19713    # Keep paths in /bin as-is, but remove trailing .exe if any
19714    new_path="${new_path/%.exe/}"
19715    # Do not save /bin paths to all_fixpath_prefixes!
19716  else
19717    # Not in mixed or Windows style, start by that.
19718    new_path=`cmd //c echo $new_path`
19719
19720  input_path="$new_path"
19721  # Check if we need to convert this using DOS-style short mode. If the path
19722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19723  # take no chances and rewrite it.
19724  # Note: m4 eats our [], so we need to use [ and ] instead.
19725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19726  if test "x$has_forbidden_chars" != x; then
19727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19729  fi
19730
19731    # Output is in $new_path
19732
19733  windows_path="$new_path"
19734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19735    unix_path=`$CYGPATH -u "$windows_path"`
19736    new_path="$unix_path"
19737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19739    new_path="$unix_path"
19740  fi
19741
19742    # remove trailing .exe if any
19743    new_path="${new_path/%.exe/}"
19744
19745    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19746    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19747  fi
19748
19749    else
19750      # We're on a unix platform. Hooray! :)
19751      # First separate the path from the arguments. This will split at the first
19752      # space.
19753      complete="$FOUND_MAKE"
19754      path="${complete%% *}"
19755      tmp="$complete EOL"
19756      arguments="${tmp#* }"
19757
19758      # Cannot rely on the command "which" here since it doesn't always work.
19759      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19760      if test -z "$is_absolute_path"; then
19761        # Path to executable is not absolute. Find it.
19762        IFS_save="$IFS"
19763        IFS=:
19764        for p in $PATH; do
19765          if test -f "$p/$path" && test -x "$p/$path"; then
19766            new_path="$p/$path"
19767            break
19768          fi
19769        done
19770        IFS="$IFS_save"
19771      else
19772        # This is an absolute path, we can use it without further modifications.
19773        new_path="$path"
19774      fi
19775
19776      if test "x$new_path" = x; then
19777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19778$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19779        has_space=`$ECHO "$complete" | $GREP " "`
19780        if test "x$has_space" != x; then
19781          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19782$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19783        fi
19784        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19785      fi
19786    fi
19787
19788    # Now join together the path and the arguments once again
19789    if test "x$arguments" != xEOL; then
19790      new_complete="$new_path ${arguments% *}"
19791    else
19792      new_complete="$new_path"
19793    fi
19794
19795    if test "x$complete" != "x$new_complete"; then
19796      FOUND_MAKE="$new_complete"
19797      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19798$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19799    fi
19800  fi
19801
19802        fi
19803      fi
19804    fi
19805  fi
19806
19807        if test "x$FOUND_MAKE" = x; then
19808          for ac_prog in make
19809do
19810  # Extract the first word of "$ac_prog", so it can be a program name with args.
19811set dummy $ac_prog; ac_word=$2
19812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19813$as_echo_n "checking for $ac_word... " >&6; }
19814if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19815  $as_echo_n "(cached) " >&6
19816else
19817  case $CHECK_TOOLSDIR_MAKE in
19818  [\\/]* | ?:[\\/]*)
19819  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19820  ;;
19821  *)
19822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19823for as_dir in $PATH
19824do
19825  IFS=$as_save_IFS
19826  test -z "$as_dir" && as_dir=.
19827    for ac_exec_ext in '' $ac_executable_extensions; do
19828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19829    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19831    break 2
19832  fi
19833done
19834  done
19835IFS=$as_save_IFS
19836
19837  ;;
19838esac
19839fi
19840CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19841if test -n "$CHECK_TOOLSDIR_MAKE"; then
19842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19843$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19844else
19845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19846$as_echo "no" >&6; }
19847fi
19848
19849
19850  test -n "$CHECK_TOOLSDIR_MAKE" && break
19851done
19852
19853
19854  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19855  DESCRIPTION="make in tools-dir"
19856
19857  # On Cygwin, we require a newer version of make than on other platforms
19858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19859    MAKE_VERSION_EXPR="-e 4\."
19860    MAKE_REQUIRED_VERSION="4.0"
19861   else
19862    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19863    MAKE_REQUIRED_VERSION="3.81"
19864  fi
19865
19866  if test "x$MAKE_CANDIDATE" != x; then
19867    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19868$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19869    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19870    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19871    if test "x$IS_GNU_MAKE" = x; then
19872      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19873$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19874    else
19875      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19876      if test "x$IS_MODERN_MAKE" = x; then
19877        { $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
19878$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;}
19879      else
19880        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19881          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19882            MAKE_EXPECTED_ENV='cygwin'
19883          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19884            MAKE_EXPECTED_ENV='msys'
19885          else
19886            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19887          fi
19888          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19889          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19890        else
19891          # Not relevant for non-Windows
19892          IS_MAKE_CORRECT_ENV=true
19893        fi
19894        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19895          { $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
19896$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;}
19897        else
19898          FOUND_MAKE=$MAKE_CANDIDATE
19899
19900  # Only process if variable expands to non-empty
19901
19902  if test "x$FOUND_MAKE" != x; then
19903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19904
19905  # First separate the path from the arguments. This will split at the first
19906  # space.
19907  complete="$FOUND_MAKE"
19908  path="${complete%% *}"
19909  tmp="$complete EOL"
19910  arguments="${tmp#* }"
19911
19912  # Input might be given as Windows format, start by converting to
19913  # unix format.
19914  new_path=`$CYGPATH -u "$path"`
19915
19916  # Now try to locate executable using which
19917  new_path=`$WHICH "$new_path" 2> /dev/null`
19918  # bat and cmd files are not always considered executable in cygwin causing which
19919  # to not find them
19920  if test "x$new_path" = x \
19921      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19922      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19923    new_path=`$CYGPATH -u "$path"`
19924  fi
19925  if test "x$new_path" = x; then
19926    # Oops. Which didn't find the executable.
19927    # The splitting of arguments from the executable at a space might have been incorrect,
19928    # since paths with space are more likely in Windows. Give it another try with the whole
19929    # argument.
19930    path="$complete"
19931    arguments="EOL"
19932    new_path=`$CYGPATH -u "$path"`
19933    new_path=`$WHICH "$new_path" 2> /dev/null`
19934    # bat and cmd files are not always considered executable in cygwin causing which
19935    # to not find them
19936    if test "x$new_path" = x \
19937        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19938        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19939      new_path=`$CYGPATH -u "$path"`
19940    fi
19941    if test "x$new_path" = x; then
19942      # It's still not found. Now this is an unrecoverable error.
19943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19944$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19945      has_space=`$ECHO "$complete" | $GREP " "`
19946      if test "x$has_space" != x; then
19947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19949      fi
19950      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19951    fi
19952  fi
19953
19954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19957  # "foo.exe" is OK but "foo" is an error.
19958  #
19959  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19960  # It is also a way to make sure we got the proper file name for the real test later on.
19961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19962  if test "x$test_shortpath" = x; then
19963    # Short path failed, file does not exist as specified.
19964    # Try adding .exe or .cmd
19965    if test -f "${new_path}.exe"; then
19966      input_to_shortpath="${new_path}.exe"
19967    elif test -f "${new_path}.cmd"; then
19968      input_to_shortpath="${new_path}.cmd"
19969    else
19970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19971$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19974      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19975    fi
19976  else
19977    input_to_shortpath="$new_path"
19978  fi
19979
19980  # Call helper function which possibly converts this using DOS-style short mode.
19981  # If so, the updated path is stored in $new_path.
19982  new_path="$input_to_shortpath"
19983
19984  input_path="$input_to_shortpath"
19985  # Check if we need to convert this using DOS-style short mode. If the path
19986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19987  # take no chances and rewrite it.
19988  # Note: m4 eats our [], so we need to use [ and ] instead.
19989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19990  if test "x$has_forbidden_chars" != x; then
19991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19995      # Going to short mode and back again did indeed matter. Since short mode is
19996      # case insensitive, let's make it lowercase to improve readability.
19997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19998      # Now convert it back to Unix-style (cygpath)
19999      input_path=`$CYGPATH -u "$shortmode_path"`
20000      new_path="$input_path"
20001    fi
20002  fi
20003
20004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20005  if test "x$test_cygdrive_prefix" = x; then
20006    # As a simple fix, exclude /usr/bin since it's not a real path.
20007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20009      # a path prefixed by /cygdrive for fixpath to work.
20010      new_path="$CYGWIN_ROOT_PATH$input_path"
20011    fi
20012  fi
20013
20014  # remove trailing .exe if any
20015  new_path="${new_path/%.exe/}"
20016
20017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20018
20019  # First separate the path from the arguments. This will split at the first
20020  # space.
20021  complete="$FOUND_MAKE"
20022  path="${complete%% *}"
20023  tmp="$complete EOL"
20024  arguments="${tmp#* }"
20025
20026  # Input might be given as Windows format, start by converting to
20027  # unix format.
20028  new_path="$path"
20029
20030  windows_path="$new_path"
20031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20032    unix_path=`$CYGPATH -u "$windows_path"`
20033    new_path="$unix_path"
20034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20036    new_path="$unix_path"
20037  fi
20038
20039
20040  # Now try to locate executable using which
20041  new_path=`$WHICH "$new_path" 2> /dev/null`
20042
20043  if test "x$new_path" = x; then
20044    # Oops. Which didn't find the executable.
20045    # The splitting of arguments from the executable at a space might have been incorrect,
20046    # since paths with space are more likely in Windows. Give it another try with the whole
20047    # argument.
20048    path="$complete"
20049    arguments="EOL"
20050    new_path="$path"
20051
20052  windows_path="$new_path"
20053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20054    unix_path=`$CYGPATH -u "$windows_path"`
20055    new_path="$unix_path"
20056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20058    new_path="$unix_path"
20059  fi
20060
20061
20062    new_path=`$WHICH "$new_path" 2> /dev/null`
20063    # bat and cmd files are not always considered executable in MSYS causing which
20064    # to not find them
20065    if test "x$new_path" = x \
20066        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20067        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20068      new_path="$path"
20069
20070  windows_path="$new_path"
20071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20072    unix_path=`$CYGPATH -u "$windows_path"`
20073    new_path="$unix_path"
20074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20075    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20076    new_path="$unix_path"
20077  fi
20078
20079    fi
20080
20081    if test "x$new_path" = x; then
20082      # It's still not found. Now this is an unrecoverable error.
20083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20084$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20085      has_space=`$ECHO "$complete" | $GREP " "`
20086      if test "x$has_space" != x; then
20087        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20088$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20089      fi
20090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20091    fi
20092  fi
20093
20094  # Now new_path has a complete unix path to the binary
20095  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20096    # Keep paths in /bin as-is, but remove trailing .exe if any
20097    new_path="${new_path/%.exe/}"
20098    # Do not save /bin paths to all_fixpath_prefixes!
20099  else
20100    # Not in mixed or Windows style, start by that.
20101    new_path=`cmd //c echo $new_path`
20102
20103  input_path="$new_path"
20104  # Check if we need to convert this using DOS-style short mode. If the path
20105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20106  # take no chances and rewrite it.
20107  # Note: m4 eats our [], so we need to use [ and ] instead.
20108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20109  if test "x$has_forbidden_chars" != x; then
20110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20112  fi
20113
20114    # Output is in $new_path
20115
20116  windows_path="$new_path"
20117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20118    unix_path=`$CYGPATH -u "$windows_path"`
20119    new_path="$unix_path"
20120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20122    new_path="$unix_path"
20123  fi
20124
20125    # remove trailing .exe if any
20126    new_path="${new_path/%.exe/}"
20127
20128    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20129    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20130  fi
20131
20132    else
20133      # We're on a unix platform. Hooray! :)
20134      # First separate the path from the arguments. This will split at the first
20135      # space.
20136      complete="$FOUND_MAKE"
20137      path="${complete%% *}"
20138      tmp="$complete EOL"
20139      arguments="${tmp#* }"
20140
20141      # Cannot rely on the command "which" here since it doesn't always work.
20142      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20143      if test -z "$is_absolute_path"; then
20144        # Path to executable is not absolute. Find it.
20145        IFS_save="$IFS"
20146        IFS=:
20147        for p in $PATH; do
20148          if test -f "$p/$path" && test -x "$p/$path"; then
20149            new_path="$p/$path"
20150            break
20151          fi
20152        done
20153        IFS="$IFS_save"
20154      else
20155        # This is an absolute path, we can use it without further modifications.
20156        new_path="$path"
20157      fi
20158
20159      if test "x$new_path" = x; then
20160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20161$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20162        has_space=`$ECHO "$complete" | $GREP " "`
20163        if test "x$has_space" != x; then
20164          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20165$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20166        fi
20167        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20168      fi
20169    fi
20170
20171    # Now join together the path and the arguments once again
20172    if test "x$arguments" != xEOL; then
20173      new_complete="$new_path ${arguments% *}"
20174    else
20175      new_complete="$new_path"
20176    fi
20177
20178    if test "x$complete" != "x$new_complete"; then
20179      FOUND_MAKE="$new_complete"
20180      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20181$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20182    fi
20183  fi
20184
20185        fi
20186      fi
20187    fi
20188  fi
20189
20190        fi
20191        PATH=$OLD_PATH
20192      fi
20193    fi
20194
20195    if test "x$FOUND_MAKE" = x; then
20196      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
20197    fi
20198
20199    else
20200      # If it succeeded, then it was overridden by the user. We will use it
20201      # for the tool.
20202
20203      # First remove it from the list of overridden variables, so we can test
20204      # for unknown variables in the end.
20205      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20206
20207      # Check if we try to supply an empty value
20208      if test "x$MAKE" = x; then
20209        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20210$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20211        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20212$as_echo_n "checking for MAKE... " >&6; }
20213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20214$as_echo "disabled" >&6; }
20215      else
20216        # Check if the provided tool contains a complete path.
20217        tool_specified="$MAKE"
20218        tool_basename="${tool_specified##*/}"
20219        if test "x$tool_basename" = "x$tool_specified"; then
20220          # A command without a complete path is provided, search $PATH.
20221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20222$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20223          # Extract the first word of "$tool_basename", so it can be a program name with args.
20224set dummy $tool_basename; ac_word=$2
20225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20226$as_echo_n "checking for $ac_word... " >&6; }
20227if ${ac_cv_path_MAKE+:} false; then :
20228  $as_echo_n "(cached) " >&6
20229else
20230  case $MAKE in
20231  [\\/]* | ?:[\\/]*)
20232  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20233  ;;
20234  *)
20235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20236for as_dir in $PATH
20237do
20238  IFS=$as_save_IFS
20239  test -z "$as_dir" && as_dir=.
20240    for ac_exec_ext in '' $ac_executable_extensions; do
20241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20242    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20244    break 2
20245  fi
20246done
20247  done
20248IFS=$as_save_IFS
20249
20250  ;;
20251esac
20252fi
20253MAKE=$ac_cv_path_MAKE
20254if test -n "$MAKE"; then
20255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20256$as_echo "$MAKE" >&6; }
20257else
20258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20259$as_echo "no" >&6; }
20260fi
20261
20262
20263          if test "x$MAKE" = x; then
20264            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20265          fi
20266        else
20267          # Otherwise we believe it is a complete path. Use it as it is.
20268          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20269$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20270          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20271$as_echo_n "checking for MAKE... " >&6; }
20272          if test ! -x "$tool_specified"; then
20273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20274$as_echo "not found" >&6; }
20275            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20276          fi
20277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20278$as_echo "$tool_specified" >&6; }
20279        fi
20280      fi
20281    fi
20282
20283    # If MAKE was set by user, verify the version
20284
20285  MAKE_CANDIDATE=""$MAKE""
20286  DESCRIPTION="user supplied MAKE=$MAKE"
20287
20288  # On Cygwin, we require a newer version of make than on other platforms
20289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20290    MAKE_VERSION_EXPR="-e 4\."
20291    MAKE_REQUIRED_VERSION="4.0"
20292   else
20293    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20294    MAKE_REQUIRED_VERSION="3.81"
20295  fi
20296
20297  if test "x$MAKE_CANDIDATE" != x; then
20298    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20299$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20300    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20301    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20302    if test "x$IS_GNU_MAKE" = x; then
20303      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20304$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20305    else
20306      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20307      if test "x$IS_MODERN_MAKE" = x; then
20308        { $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
20309$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;}
20310      else
20311        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20312          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20313            MAKE_EXPECTED_ENV='cygwin'
20314          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20315            MAKE_EXPECTED_ENV='msys'
20316          else
20317            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20318          fi
20319          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20320          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20321        else
20322          # Not relevant for non-Windows
20323          IS_MAKE_CORRECT_ENV=true
20324        fi
20325        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20326          { $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
20327$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;}
20328        else
20329          FOUND_MAKE=$MAKE_CANDIDATE
20330
20331  # Only process if variable expands to non-empty
20332
20333  if test "x$FOUND_MAKE" != x; then
20334    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20335
20336  # First separate the path from the arguments. This will split at the first
20337  # space.
20338  complete="$FOUND_MAKE"
20339  path="${complete%% *}"
20340  tmp="$complete EOL"
20341  arguments="${tmp#* }"
20342
20343  # Input might be given as Windows format, start by converting to
20344  # unix format.
20345  new_path=`$CYGPATH -u "$path"`
20346
20347  # Now try to locate executable using which
20348  new_path=`$WHICH "$new_path" 2> /dev/null`
20349  # bat and cmd files are not always considered executable in cygwin causing which
20350  # to not find them
20351  if test "x$new_path" = x \
20352      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20353      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20354    new_path=`$CYGPATH -u "$path"`
20355  fi
20356  if test "x$new_path" = x; then
20357    # Oops. Which didn't find the executable.
20358    # The splitting of arguments from the executable at a space might have been incorrect,
20359    # since paths with space are more likely in Windows. Give it another try with the whole
20360    # argument.
20361    path="$complete"
20362    arguments="EOL"
20363    new_path=`$CYGPATH -u "$path"`
20364    new_path=`$WHICH "$new_path" 2> /dev/null`
20365    # bat and cmd files are not always considered executable in cygwin causing which
20366    # to not find them
20367    if test "x$new_path" = x \
20368        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20369        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20370      new_path=`$CYGPATH -u "$path"`
20371    fi
20372    if test "x$new_path" = x; then
20373      # It's still not found. Now this is an unrecoverable error.
20374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20375$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20376      has_space=`$ECHO "$complete" | $GREP " "`
20377      if test "x$has_space" != x; then
20378        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20379$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20380      fi
20381      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20382    fi
20383  fi
20384
20385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20388  # "foo.exe" is OK but "foo" is an error.
20389  #
20390  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20391  # It is also a way to make sure we got the proper file name for the real test later on.
20392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20393  if test "x$test_shortpath" = x; then
20394    # Short path failed, file does not exist as specified.
20395    # Try adding .exe or .cmd
20396    if test -f "${new_path}.exe"; then
20397      input_to_shortpath="${new_path}.exe"
20398    elif test -f "${new_path}.cmd"; then
20399      input_to_shortpath="${new_path}.cmd"
20400    else
20401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20402$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20403      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20404$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20405      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20406    fi
20407  else
20408    input_to_shortpath="$new_path"
20409  fi
20410
20411  # Call helper function which possibly converts this using DOS-style short mode.
20412  # If so, the updated path is stored in $new_path.
20413  new_path="$input_to_shortpath"
20414
20415  input_path="$input_to_shortpath"
20416  # Check if we need to convert this using DOS-style short mode. If the path
20417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20418  # take no chances and rewrite it.
20419  # Note: m4 eats our [], so we need to use [ and ] instead.
20420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20421  if test "x$has_forbidden_chars" != x; then
20422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20426      # Going to short mode and back again did indeed matter. Since short mode is
20427      # case insensitive, let's make it lowercase to improve readability.
20428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20429      # Now convert it back to Unix-style (cygpath)
20430      input_path=`$CYGPATH -u "$shortmode_path"`
20431      new_path="$input_path"
20432    fi
20433  fi
20434
20435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20436  if test "x$test_cygdrive_prefix" = x; then
20437    # As a simple fix, exclude /usr/bin since it's not a real path.
20438    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20440      # a path prefixed by /cygdrive for fixpath to work.
20441      new_path="$CYGWIN_ROOT_PATH$input_path"
20442    fi
20443  fi
20444
20445  # remove trailing .exe if any
20446  new_path="${new_path/%.exe/}"
20447
20448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20449
20450  # First separate the path from the arguments. This will split at the first
20451  # space.
20452  complete="$FOUND_MAKE"
20453  path="${complete%% *}"
20454  tmp="$complete EOL"
20455  arguments="${tmp#* }"
20456
20457  # Input might be given as Windows format, start by converting to
20458  # unix format.
20459  new_path="$path"
20460
20461  windows_path="$new_path"
20462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20463    unix_path=`$CYGPATH -u "$windows_path"`
20464    new_path="$unix_path"
20465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20467    new_path="$unix_path"
20468  fi
20469
20470
20471  # Now try to locate executable using which
20472  new_path=`$WHICH "$new_path" 2> /dev/null`
20473
20474  if test "x$new_path" = x; then
20475    # Oops. Which didn't find the executable.
20476    # The splitting of arguments from the executable at a space might have been incorrect,
20477    # since paths with space are more likely in Windows. Give it another try with the whole
20478    # argument.
20479    path="$complete"
20480    arguments="EOL"
20481    new_path="$path"
20482
20483  windows_path="$new_path"
20484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20485    unix_path=`$CYGPATH -u "$windows_path"`
20486    new_path="$unix_path"
20487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20489    new_path="$unix_path"
20490  fi
20491
20492
20493    new_path=`$WHICH "$new_path" 2> /dev/null`
20494    # bat and cmd files are not always considered executable in MSYS causing which
20495    # to not find them
20496    if test "x$new_path" = x \
20497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20499      new_path="$path"
20500
20501  windows_path="$new_path"
20502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20503    unix_path=`$CYGPATH -u "$windows_path"`
20504    new_path="$unix_path"
20505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20507    new_path="$unix_path"
20508  fi
20509
20510    fi
20511
20512    if test "x$new_path" = x; then
20513      # It's still not found. Now this is an unrecoverable error.
20514      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20515$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20516      has_space=`$ECHO "$complete" | $GREP " "`
20517      if test "x$has_space" != x; then
20518        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20519$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20520      fi
20521      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20522    fi
20523  fi
20524
20525  # Now new_path has a complete unix path to the binary
20526  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20527    # Keep paths in /bin as-is, but remove trailing .exe if any
20528    new_path="${new_path/%.exe/}"
20529    # Do not save /bin paths to all_fixpath_prefixes!
20530  else
20531    # Not in mixed or Windows style, start by that.
20532    new_path=`cmd //c echo $new_path`
20533
20534  input_path="$new_path"
20535  # Check if we need to convert this using DOS-style short mode. If the path
20536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20537  # take no chances and rewrite it.
20538  # Note: m4 eats our [], so we need to use [ and ] instead.
20539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20540  if test "x$has_forbidden_chars" != x; then
20541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20542    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20543  fi
20544
20545    # Output is in $new_path
20546
20547  windows_path="$new_path"
20548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20549    unix_path=`$CYGPATH -u "$windows_path"`
20550    new_path="$unix_path"
20551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20553    new_path="$unix_path"
20554  fi
20555
20556    # remove trailing .exe if any
20557    new_path="${new_path/%.exe/}"
20558
20559    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20560    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20561  fi
20562
20563    else
20564      # We're on a unix platform. Hooray! :)
20565      # First separate the path from the arguments. This will split at the first
20566      # space.
20567      complete="$FOUND_MAKE"
20568      path="${complete%% *}"
20569      tmp="$complete EOL"
20570      arguments="${tmp#* }"
20571
20572      # Cannot rely on the command "which" here since it doesn't always work.
20573      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20574      if test -z "$is_absolute_path"; then
20575        # Path to executable is not absolute. Find it.
20576        IFS_save="$IFS"
20577        IFS=:
20578        for p in $PATH; do
20579          if test -f "$p/$path" && test -x "$p/$path"; then
20580            new_path="$p/$path"
20581            break
20582          fi
20583        done
20584        IFS="$IFS_save"
20585      else
20586        # This is an absolute path, we can use it without further modifications.
20587        new_path="$path"
20588      fi
20589
20590      if test "x$new_path" = x; then
20591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20593        has_space=`$ECHO "$complete" | $GREP " "`
20594        if test "x$has_space" != x; then
20595          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20596$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20597        fi
20598        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20599      fi
20600    fi
20601
20602    # Now join together the path and the arguments once again
20603    if test "x$arguments" != xEOL; then
20604      new_complete="$new_path ${arguments% *}"
20605    else
20606      new_complete="$new_path"
20607    fi
20608
20609    if test "x$complete" != "x$new_complete"; then
20610      FOUND_MAKE="$new_complete"
20611      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20612$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20613    fi
20614  fi
20615
20616        fi
20617      fi
20618    fi
20619  fi
20620
20621    if test "x$FOUND_MAKE" = x; then
20622      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20623    fi
20624
20625  fi
20626
20627
20628  MAKE=$FOUND_MAKE
20629
20630  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20631$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20632
20633
20634  # Check if make supports the output sync option and if so, setup using it.
20635  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20636$as_echo_n "checking if make --output-sync is supported... " >&6; }
20637  if $MAKE --version -O > /dev/null 2>&1; then
20638    OUTPUT_SYNC_SUPPORTED=true
20639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20640$as_echo "yes" >&6; }
20641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20642$as_echo_n "checking for output-sync value... " >&6; }
20643
20644# Check whether --with-output-sync was given.
20645if test "${with_output_sync+set}" = set; then :
20646  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20647fi
20648
20649    if test "x$OUTPUT_SYNC" = "x"; then
20650      OUTPUT_SYNC=none
20651    fi
20652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20653$as_echo "$OUTPUT_SYNC" >&6; }
20654    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20655      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20656    fi
20657  else
20658    OUTPUT_SYNC_SUPPORTED=false
20659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20660$as_echo "no" >&6; }
20661  fi
20662
20663
20664
20665
20666
20667
20668  # Test if find supports -delete
20669  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20670$as_echo_n "checking if find supports -delete... " >&6; }
20671  FIND_DELETE="-delete"
20672
20673  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20674
20675  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20676
20677  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20678  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20679    # No, it does not.
20680    rm $DELETEDIR/TestIfFindSupportsDelete
20681    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20682      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20683      FIND_DELETE="-print | xargs rm"
20684    else
20685      FIND_DELETE="-exec rm \{\} \+"
20686    fi
20687    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20688$as_echo "no" >&6; }
20689  else
20690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20691$as_echo "yes" >&6; }
20692  fi
20693  rmdir $DELETEDIR
20694
20695
20696
20697  # These tools might not be installed by default,
20698  # need hint on how to install them.
20699
20700
20701
20702  # Publish this variable in the help.
20703
20704
20705  if [ -z "${UNZIP+x}" ]; then
20706    # The variable is not set by user, try to locate tool using the code snippet
20707    for ac_prog in unzip
20708do
20709  # Extract the first word of "$ac_prog", so it can be a program name with args.
20710set dummy $ac_prog; ac_word=$2
20711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20712$as_echo_n "checking for $ac_word... " >&6; }
20713if ${ac_cv_path_UNZIP+:} false; then :
20714  $as_echo_n "(cached) " >&6
20715else
20716  case $UNZIP in
20717  [\\/]* | ?:[\\/]*)
20718  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20719  ;;
20720  *)
20721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20722for as_dir in $PATH
20723do
20724  IFS=$as_save_IFS
20725  test -z "$as_dir" && as_dir=.
20726    for ac_exec_ext in '' $ac_executable_extensions; do
20727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20728    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20730    break 2
20731  fi
20732done
20733  done
20734IFS=$as_save_IFS
20735
20736  ;;
20737esac
20738fi
20739UNZIP=$ac_cv_path_UNZIP
20740if test -n "$UNZIP"; then
20741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20742$as_echo "$UNZIP" >&6; }
20743else
20744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20745$as_echo "no" >&6; }
20746fi
20747
20748
20749  test -n "$UNZIP" && break
20750done
20751
20752  else
20753    # The variable is set, but is it from the command line or the environment?
20754
20755    # Try to remove the string !UNZIP! from our list.
20756    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20757    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20758      # If it failed, the variable was not from the command line. Ignore it,
20759      # but warn the user (except for BASH, which is always set by the calling BASH).
20760      if test "xUNZIP" != xBASH; then
20761        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20762$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20763      fi
20764      # Try to locate tool using the code snippet
20765      for ac_prog in unzip
20766do
20767  # Extract the first word of "$ac_prog", so it can be a program name with args.
20768set dummy $ac_prog; ac_word=$2
20769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20770$as_echo_n "checking for $ac_word... " >&6; }
20771if ${ac_cv_path_UNZIP+:} false; then :
20772  $as_echo_n "(cached) " >&6
20773else
20774  case $UNZIP in
20775  [\\/]* | ?:[\\/]*)
20776  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20777  ;;
20778  *)
20779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20780for as_dir in $PATH
20781do
20782  IFS=$as_save_IFS
20783  test -z "$as_dir" && as_dir=.
20784    for ac_exec_ext in '' $ac_executable_extensions; do
20785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20786    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20788    break 2
20789  fi
20790done
20791  done
20792IFS=$as_save_IFS
20793
20794  ;;
20795esac
20796fi
20797UNZIP=$ac_cv_path_UNZIP
20798if test -n "$UNZIP"; then
20799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20800$as_echo "$UNZIP" >&6; }
20801else
20802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20803$as_echo "no" >&6; }
20804fi
20805
20806
20807  test -n "$UNZIP" && break
20808done
20809
20810    else
20811      # If it succeeded, then it was overridden by the user. We will use it
20812      # for the tool.
20813
20814      # First remove it from the list of overridden variables, so we can test
20815      # for unknown variables in the end.
20816      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20817
20818      # Check if we try to supply an empty value
20819      if test "x$UNZIP" = x; then
20820        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20821$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20823$as_echo_n "checking for UNZIP... " >&6; }
20824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20825$as_echo "disabled" >&6; }
20826      else
20827        # Check if the provided tool contains a complete path.
20828        tool_specified="$UNZIP"
20829        tool_basename="${tool_specified##*/}"
20830        if test "x$tool_basename" = "x$tool_specified"; then
20831          # A command without a complete path is provided, search $PATH.
20832          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20833$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20834          # Extract the first word of "$tool_basename", so it can be a program name with args.
20835set dummy $tool_basename; ac_word=$2
20836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20837$as_echo_n "checking for $ac_word... " >&6; }
20838if ${ac_cv_path_UNZIP+:} false; then :
20839  $as_echo_n "(cached) " >&6
20840else
20841  case $UNZIP in
20842  [\\/]* | ?:[\\/]*)
20843  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20844  ;;
20845  *)
20846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20847for as_dir in $PATH
20848do
20849  IFS=$as_save_IFS
20850  test -z "$as_dir" && as_dir=.
20851    for ac_exec_ext in '' $ac_executable_extensions; do
20852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20853    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20855    break 2
20856  fi
20857done
20858  done
20859IFS=$as_save_IFS
20860
20861  ;;
20862esac
20863fi
20864UNZIP=$ac_cv_path_UNZIP
20865if test -n "$UNZIP"; then
20866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20867$as_echo "$UNZIP" >&6; }
20868else
20869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20870$as_echo "no" >&6; }
20871fi
20872
20873
20874          if test "x$UNZIP" = x; then
20875            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20876          fi
20877        else
20878          # Otherwise we believe it is a complete path. Use it as it is.
20879          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20880$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20881          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20882$as_echo_n "checking for UNZIP... " >&6; }
20883          if test ! -x "$tool_specified"; then
20884            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20885$as_echo "not found" >&6; }
20886            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20887          fi
20888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20889$as_echo "$tool_specified" >&6; }
20890        fi
20891      fi
20892    fi
20893
20894  fi
20895
20896
20897
20898  if test "x$UNZIP" = x; then
20899    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20900  fi
20901
20902
20903
20904
20905
20906  # Publish this variable in the help.
20907
20908
20909  if [ -z "${ZIP+x}" ]; then
20910    # The variable is not set by user, try to locate tool using the code snippet
20911    for ac_prog in zip
20912do
20913  # Extract the first word of "$ac_prog", so it can be a program name with args.
20914set dummy $ac_prog; ac_word=$2
20915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20916$as_echo_n "checking for $ac_word... " >&6; }
20917if ${ac_cv_path_ZIP+:} false; then :
20918  $as_echo_n "(cached) " >&6
20919else
20920  case $ZIP in
20921  [\\/]* | ?:[\\/]*)
20922  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20923  ;;
20924  *)
20925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20926for as_dir in $PATH
20927do
20928  IFS=$as_save_IFS
20929  test -z "$as_dir" && as_dir=.
20930    for ac_exec_ext in '' $ac_executable_extensions; do
20931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20932    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20934    break 2
20935  fi
20936done
20937  done
20938IFS=$as_save_IFS
20939
20940  ;;
20941esac
20942fi
20943ZIP=$ac_cv_path_ZIP
20944if test -n "$ZIP"; then
20945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20946$as_echo "$ZIP" >&6; }
20947else
20948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20949$as_echo "no" >&6; }
20950fi
20951
20952
20953  test -n "$ZIP" && break
20954done
20955
20956  else
20957    # The variable is set, but is it from the command line or the environment?
20958
20959    # Try to remove the string !ZIP! from our list.
20960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20962      # If it failed, the variable was not from the command line. Ignore it,
20963      # but warn the user (except for BASH, which is always set by the calling BASH).
20964      if test "xZIP" != xBASH; then
20965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20966$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20967      fi
20968      # Try to locate tool using the code snippet
20969      for ac_prog in zip
20970do
20971  # Extract the first word of "$ac_prog", so it can be a program name with args.
20972set dummy $ac_prog; ac_word=$2
20973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20974$as_echo_n "checking for $ac_word... " >&6; }
20975if ${ac_cv_path_ZIP+:} false; then :
20976  $as_echo_n "(cached) " >&6
20977else
20978  case $ZIP in
20979  [\\/]* | ?:[\\/]*)
20980  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20981  ;;
20982  *)
20983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20984for as_dir in $PATH
20985do
20986  IFS=$as_save_IFS
20987  test -z "$as_dir" && as_dir=.
20988    for ac_exec_ext in '' $ac_executable_extensions; do
20989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20990    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20992    break 2
20993  fi
20994done
20995  done
20996IFS=$as_save_IFS
20997
20998  ;;
20999esac
21000fi
21001ZIP=$ac_cv_path_ZIP
21002if test -n "$ZIP"; then
21003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21004$as_echo "$ZIP" >&6; }
21005else
21006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21007$as_echo "no" >&6; }
21008fi
21009
21010
21011  test -n "$ZIP" && break
21012done
21013
21014    else
21015      # If it succeeded, then it was overridden by the user. We will use it
21016      # for the tool.
21017
21018      # First remove it from the list of overridden variables, so we can test
21019      # for unknown variables in the end.
21020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21021
21022      # Check if we try to supply an empty value
21023      if test "x$ZIP" = x; then
21024        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21025$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21026        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21027$as_echo_n "checking for ZIP... " >&6; }
21028        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21029$as_echo "disabled" >&6; }
21030      else
21031        # Check if the provided tool contains a complete path.
21032        tool_specified="$ZIP"
21033        tool_basename="${tool_specified##*/}"
21034        if test "x$tool_basename" = "x$tool_specified"; then
21035          # A command without a complete path is provided, search $PATH.
21036          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21037$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21038          # Extract the first word of "$tool_basename", so it can be a program name with args.
21039set dummy $tool_basename; ac_word=$2
21040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21041$as_echo_n "checking for $ac_word... " >&6; }
21042if ${ac_cv_path_ZIP+:} false; then :
21043  $as_echo_n "(cached) " >&6
21044else
21045  case $ZIP in
21046  [\\/]* | ?:[\\/]*)
21047  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21048  ;;
21049  *)
21050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21051for as_dir in $PATH
21052do
21053  IFS=$as_save_IFS
21054  test -z "$as_dir" && as_dir=.
21055    for ac_exec_ext in '' $ac_executable_extensions; do
21056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21057    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21059    break 2
21060  fi
21061done
21062  done
21063IFS=$as_save_IFS
21064
21065  ;;
21066esac
21067fi
21068ZIP=$ac_cv_path_ZIP
21069if test -n "$ZIP"; then
21070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21071$as_echo "$ZIP" >&6; }
21072else
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21074$as_echo "no" >&6; }
21075fi
21076
21077
21078          if test "x$ZIP" = x; then
21079            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21080          fi
21081        else
21082          # Otherwise we believe it is a complete path. Use it as it is.
21083          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21084$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21085          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21086$as_echo_n "checking for ZIP... " >&6; }
21087          if test ! -x "$tool_specified"; then
21088            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21089$as_echo "not found" >&6; }
21090            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21091          fi
21092          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21093$as_echo "$tool_specified" >&6; }
21094        fi
21095      fi
21096    fi
21097
21098  fi
21099
21100
21101
21102  if test "x$ZIP" = x; then
21103    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21104  fi
21105
21106
21107
21108  # Non-required basic tools
21109
21110
21111
21112  # Publish this variable in the help.
21113
21114
21115  if [ -z "${LDD+x}" ]; then
21116    # The variable is not set by user, try to locate tool using the code snippet
21117    for ac_prog in ldd
21118do
21119  # Extract the first word of "$ac_prog", so it can be a program name with args.
21120set dummy $ac_prog; ac_word=$2
21121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21122$as_echo_n "checking for $ac_word... " >&6; }
21123if ${ac_cv_path_LDD+:} false; then :
21124  $as_echo_n "(cached) " >&6
21125else
21126  case $LDD in
21127  [\\/]* | ?:[\\/]*)
21128  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21129  ;;
21130  *)
21131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21132for as_dir in $PATH
21133do
21134  IFS=$as_save_IFS
21135  test -z "$as_dir" && as_dir=.
21136    for ac_exec_ext in '' $ac_executable_extensions; do
21137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21138    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21140    break 2
21141  fi
21142done
21143  done
21144IFS=$as_save_IFS
21145
21146  ;;
21147esac
21148fi
21149LDD=$ac_cv_path_LDD
21150if test -n "$LDD"; then
21151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21152$as_echo "$LDD" >&6; }
21153else
21154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21155$as_echo "no" >&6; }
21156fi
21157
21158
21159  test -n "$LDD" && break
21160done
21161
21162  else
21163    # The variable is set, but is it from the command line or the environment?
21164
21165    # Try to remove the string !LDD! from our list.
21166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21168      # If it failed, the variable was not from the command line. Ignore it,
21169      # but warn the user (except for BASH, which is always set by the calling BASH).
21170      if test "xLDD" != xBASH; then
21171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21172$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21173      fi
21174      # Try to locate tool using the code snippet
21175      for ac_prog in ldd
21176do
21177  # Extract the first word of "$ac_prog", so it can be a program name with args.
21178set dummy $ac_prog; ac_word=$2
21179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21180$as_echo_n "checking for $ac_word... " >&6; }
21181if ${ac_cv_path_LDD+:} false; then :
21182  $as_echo_n "(cached) " >&6
21183else
21184  case $LDD in
21185  [\\/]* | ?:[\\/]*)
21186  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21187  ;;
21188  *)
21189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21190for as_dir in $PATH
21191do
21192  IFS=$as_save_IFS
21193  test -z "$as_dir" && as_dir=.
21194    for ac_exec_ext in '' $ac_executable_extensions; do
21195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21196    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21198    break 2
21199  fi
21200done
21201  done
21202IFS=$as_save_IFS
21203
21204  ;;
21205esac
21206fi
21207LDD=$ac_cv_path_LDD
21208if test -n "$LDD"; then
21209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21210$as_echo "$LDD" >&6; }
21211else
21212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21213$as_echo "no" >&6; }
21214fi
21215
21216
21217  test -n "$LDD" && break
21218done
21219
21220    else
21221      # If it succeeded, then it was overridden by the user. We will use it
21222      # for the tool.
21223
21224      # First remove it from the list of overridden variables, so we can test
21225      # for unknown variables in the end.
21226      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21227
21228      # Check if we try to supply an empty value
21229      if test "x$LDD" = x; then
21230        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21231$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21233$as_echo_n "checking for LDD... " >&6; }
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21235$as_echo "disabled" >&6; }
21236      else
21237        # Check if the provided tool contains a complete path.
21238        tool_specified="$LDD"
21239        tool_basename="${tool_specified##*/}"
21240        if test "x$tool_basename" = "x$tool_specified"; then
21241          # A command without a complete path is provided, search $PATH.
21242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21243$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21244          # Extract the first word of "$tool_basename", so it can be a program name with args.
21245set dummy $tool_basename; ac_word=$2
21246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21247$as_echo_n "checking for $ac_word... " >&6; }
21248if ${ac_cv_path_LDD+:} false; then :
21249  $as_echo_n "(cached) " >&6
21250else
21251  case $LDD in
21252  [\\/]* | ?:[\\/]*)
21253  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21254  ;;
21255  *)
21256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21257for as_dir in $PATH
21258do
21259  IFS=$as_save_IFS
21260  test -z "$as_dir" && as_dir=.
21261    for ac_exec_ext in '' $ac_executable_extensions; do
21262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21263    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21265    break 2
21266  fi
21267done
21268  done
21269IFS=$as_save_IFS
21270
21271  ;;
21272esac
21273fi
21274LDD=$ac_cv_path_LDD
21275if test -n "$LDD"; then
21276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21277$as_echo "$LDD" >&6; }
21278else
21279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21280$as_echo "no" >&6; }
21281fi
21282
21283
21284          if test "x$LDD" = x; then
21285            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21286          fi
21287        else
21288          # Otherwise we believe it is a complete path. Use it as it is.
21289          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21290$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21291          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21292$as_echo_n "checking for LDD... " >&6; }
21293          if test ! -x "$tool_specified"; then
21294            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21295$as_echo "not found" >&6; }
21296            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21297          fi
21298          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21299$as_echo "$tool_specified" >&6; }
21300        fi
21301      fi
21302    fi
21303
21304  fi
21305
21306
21307  if test "x$LDD" = "x"; then
21308    # List shared lib dependencies is used for
21309    # debug output and checking for forbidden dependencies.
21310    # We can build without it.
21311    LDD="true"
21312  fi
21313
21314
21315  # Publish this variable in the help.
21316
21317
21318  if [ -z "${OTOOL+x}" ]; then
21319    # The variable is not set by user, try to locate tool using the code snippet
21320    for ac_prog in otool
21321do
21322  # Extract the first word of "$ac_prog", so it can be a program name with args.
21323set dummy $ac_prog; ac_word=$2
21324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21325$as_echo_n "checking for $ac_word... " >&6; }
21326if ${ac_cv_path_OTOOL+:} false; then :
21327  $as_echo_n "(cached) " >&6
21328else
21329  case $OTOOL in
21330  [\\/]* | ?:[\\/]*)
21331  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21332  ;;
21333  *)
21334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21335for as_dir in $PATH
21336do
21337  IFS=$as_save_IFS
21338  test -z "$as_dir" && as_dir=.
21339    for ac_exec_ext in '' $ac_executable_extensions; do
21340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21341    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21343    break 2
21344  fi
21345done
21346  done
21347IFS=$as_save_IFS
21348
21349  ;;
21350esac
21351fi
21352OTOOL=$ac_cv_path_OTOOL
21353if test -n "$OTOOL"; then
21354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21355$as_echo "$OTOOL" >&6; }
21356else
21357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21358$as_echo "no" >&6; }
21359fi
21360
21361
21362  test -n "$OTOOL" && break
21363done
21364
21365  else
21366    # The variable is set, but is it from the command line or the environment?
21367
21368    # Try to remove the string !OTOOL! from our list.
21369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21371      # If it failed, the variable was not from the command line. Ignore it,
21372      # but warn the user (except for BASH, which is always set by the calling BASH).
21373      if test "xOTOOL" != xBASH; then
21374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21375$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21376      fi
21377      # Try to locate tool using the code snippet
21378      for ac_prog in otool
21379do
21380  # Extract the first word of "$ac_prog", so it can be a program name with args.
21381set dummy $ac_prog; ac_word=$2
21382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21383$as_echo_n "checking for $ac_word... " >&6; }
21384if ${ac_cv_path_OTOOL+:} false; then :
21385  $as_echo_n "(cached) " >&6
21386else
21387  case $OTOOL in
21388  [\\/]* | ?:[\\/]*)
21389  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21390  ;;
21391  *)
21392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21393for as_dir in $PATH
21394do
21395  IFS=$as_save_IFS
21396  test -z "$as_dir" && as_dir=.
21397    for ac_exec_ext in '' $ac_executable_extensions; do
21398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21399    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21401    break 2
21402  fi
21403done
21404  done
21405IFS=$as_save_IFS
21406
21407  ;;
21408esac
21409fi
21410OTOOL=$ac_cv_path_OTOOL
21411if test -n "$OTOOL"; then
21412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21413$as_echo "$OTOOL" >&6; }
21414else
21415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21416$as_echo "no" >&6; }
21417fi
21418
21419
21420  test -n "$OTOOL" && break
21421done
21422
21423    else
21424      # If it succeeded, then it was overridden by the user. We will use it
21425      # for the tool.
21426
21427      # First remove it from the list of overridden variables, so we can test
21428      # for unknown variables in the end.
21429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21430
21431      # Check if we try to supply an empty value
21432      if test "x$OTOOL" = x; then
21433        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21434$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21435        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21436$as_echo_n "checking for OTOOL... " >&6; }
21437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21438$as_echo "disabled" >&6; }
21439      else
21440        # Check if the provided tool contains a complete path.
21441        tool_specified="$OTOOL"
21442        tool_basename="${tool_specified##*/}"
21443        if test "x$tool_basename" = "x$tool_specified"; then
21444          # A command without a complete path is provided, search $PATH.
21445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21446$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21447          # Extract the first word of "$tool_basename", so it can be a program name with args.
21448set dummy $tool_basename; ac_word=$2
21449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21450$as_echo_n "checking for $ac_word... " >&6; }
21451if ${ac_cv_path_OTOOL+:} false; then :
21452  $as_echo_n "(cached) " >&6
21453else
21454  case $OTOOL in
21455  [\\/]* | ?:[\\/]*)
21456  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21457  ;;
21458  *)
21459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460for as_dir in $PATH
21461do
21462  IFS=$as_save_IFS
21463  test -z "$as_dir" && as_dir=.
21464    for ac_exec_ext in '' $ac_executable_extensions; do
21465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21466    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21468    break 2
21469  fi
21470done
21471  done
21472IFS=$as_save_IFS
21473
21474  ;;
21475esac
21476fi
21477OTOOL=$ac_cv_path_OTOOL
21478if test -n "$OTOOL"; then
21479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21480$as_echo "$OTOOL" >&6; }
21481else
21482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21483$as_echo "no" >&6; }
21484fi
21485
21486
21487          if test "x$OTOOL" = x; then
21488            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21489          fi
21490        else
21491          # Otherwise we believe it is a complete path. Use it as it is.
21492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21493$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21494          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21495$as_echo_n "checking for OTOOL... " >&6; }
21496          if test ! -x "$tool_specified"; then
21497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21498$as_echo "not found" >&6; }
21499            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21500          fi
21501          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21502$as_echo "$tool_specified" >&6; }
21503        fi
21504      fi
21505    fi
21506
21507  fi
21508
21509
21510  if test "x$OTOOL" = "x"; then
21511    OTOOL="true"
21512  fi
21513
21514
21515  # Publish this variable in the help.
21516
21517
21518  if [ -z "${READELF+x}" ]; then
21519    # The variable is not set by user, try to locate tool using the code snippet
21520    for ac_prog in greadelf readelf
21521do
21522  # Extract the first word of "$ac_prog", so it can be a program name with args.
21523set dummy $ac_prog; ac_word=$2
21524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21525$as_echo_n "checking for $ac_word... " >&6; }
21526if ${ac_cv_path_READELF+:} false; then :
21527  $as_echo_n "(cached) " >&6
21528else
21529  case $READELF in
21530  [\\/]* | ?:[\\/]*)
21531  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21532  ;;
21533  *)
21534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21535for as_dir in $PATH
21536do
21537  IFS=$as_save_IFS
21538  test -z "$as_dir" && as_dir=.
21539    for ac_exec_ext in '' $ac_executable_extensions; do
21540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21541    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21543    break 2
21544  fi
21545done
21546  done
21547IFS=$as_save_IFS
21548
21549  ;;
21550esac
21551fi
21552READELF=$ac_cv_path_READELF
21553if test -n "$READELF"; then
21554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21555$as_echo "$READELF" >&6; }
21556else
21557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21558$as_echo "no" >&6; }
21559fi
21560
21561
21562  test -n "$READELF" && break
21563done
21564
21565  else
21566    # The variable is set, but is it from the command line or the environment?
21567
21568    # Try to remove the string !READELF! from our list.
21569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21571      # If it failed, the variable was not from the command line. Ignore it,
21572      # but warn the user (except for BASH, which is always set by the calling BASH).
21573      if test "xREADELF" != xBASH; then
21574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21575$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21576      fi
21577      # Try to locate tool using the code snippet
21578      for ac_prog in greadelf readelf
21579do
21580  # Extract the first word of "$ac_prog", so it can be a program name with args.
21581set dummy $ac_prog; ac_word=$2
21582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21583$as_echo_n "checking for $ac_word... " >&6; }
21584if ${ac_cv_path_READELF+:} false; then :
21585  $as_echo_n "(cached) " >&6
21586else
21587  case $READELF in
21588  [\\/]* | ?:[\\/]*)
21589  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21590  ;;
21591  *)
21592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21593for as_dir in $PATH
21594do
21595  IFS=$as_save_IFS
21596  test -z "$as_dir" && as_dir=.
21597    for ac_exec_ext in '' $ac_executable_extensions; do
21598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21599    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21601    break 2
21602  fi
21603done
21604  done
21605IFS=$as_save_IFS
21606
21607  ;;
21608esac
21609fi
21610READELF=$ac_cv_path_READELF
21611if test -n "$READELF"; then
21612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21613$as_echo "$READELF" >&6; }
21614else
21615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21616$as_echo "no" >&6; }
21617fi
21618
21619
21620  test -n "$READELF" && break
21621done
21622
21623    else
21624      # If it succeeded, then it was overridden by the user. We will use it
21625      # for the tool.
21626
21627      # First remove it from the list of overridden variables, so we can test
21628      # for unknown variables in the end.
21629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21630
21631      # Check if we try to supply an empty value
21632      if test "x$READELF" = x; then
21633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21634$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21636$as_echo_n "checking for READELF... " >&6; }
21637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21638$as_echo "disabled" >&6; }
21639      else
21640        # Check if the provided tool contains a complete path.
21641        tool_specified="$READELF"
21642        tool_basename="${tool_specified##*/}"
21643        if test "x$tool_basename" = "x$tool_specified"; then
21644          # A command without a complete path is provided, search $PATH.
21645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21646$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21647          # Extract the first word of "$tool_basename", so it can be a program name with args.
21648set dummy $tool_basename; ac_word=$2
21649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21650$as_echo_n "checking for $ac_word... " >&6; }
21651if ${ac_cv_path_READELF+:} false; then :
21652  $as_echo_n "(cached) " >&6
21653else
21654  case $READELF in
21655  [\\/]* | ?:[\\/]*)
21656  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21657  ;;
21658  *)
21659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21660for as_dir in $PATH
21661do
21662  IFS=$as_save_IFS
21663  test -z "$as_dir" && as_dir=.
21664    for ac_exec_ext in '' $ac_executable_extensions; do
21665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21666    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21668    break 2
21669  fi
21670done
21671  done
21672IFS=$as_save_IFS
21673
21674  ;;
21675esac
21676fi
21677READELF=$ac_cv_path_READELF
21678if test -n "$READELF"; then
21679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21680$as_echo "$READELF" >&6; }
21681else
21682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21683$as_echo "no" >&6; }
21684fi
21685
21686
21687          if test "x$READELF" = x; then
21688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21689          fi
21690        else
21691          # Otherwise we believe it is a complete path. Use it as it is.
21692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21693$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21695$as_echo_n "checking for READELF... " >&6; }
21696          if test ! -x "$tool_specified"; then
21697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21698$as_echo "not found" >&6; }
21699            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21700          fi
21701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21702$as_echo "$tool_specified" >&6; }
21703        fi
21704      fi
21705    fi
21706
21707  fi
21708
21709
21710
21711
21712  # Publish this variable in the help.
21713
21714
21715  if [ -z "${HG+x}" ]; then
21716    # The variable is not set by user, try to locate tool using the code snippet
21717    for ac_prog in hg
21718do
21719  # Extract the first word of "$ac_prog", so it can be a program name with args.
21720set dummy $ac_prog; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_HG+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $HG in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749HG=$ac_cv_path_HG
21750if test -n "$HG"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21752$as_echo "$HG" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759  test -n "$HG" && break
21760done
21761
21762  else
21763    # The variable is set, but is it from the command line or the environment?
21764
21765    # Try to remove the string !HG! from our list.
21766    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21767    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21768      # If it failed, the variable was not from the command line. Ignore it,
21769      # but warn the user (except for BASH, which is always set by the calling BASH).
21770      if test "xHG" != xBASH; then
21771        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21772$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21773      fi
21774      # Try to locate tool using the code snippet
21775      for ac_prog in hg
21776do
21777  # Extract the first word of "$ac_prog", so it can be a program name with args.
21778set dummy $ac_prog; ac_word=$2
21779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21780$as_echo_n "checking for $ac_word... " >&6; }
21781if ${ac_cv_path_HG+:} false; then :
21782  $as_echo_n "(cached) " >&6
21783else
21784  case $HG in
21785  [\\/]* | ?:[\\/]*)
21786  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21787  ;;
21788  *)
21789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21790for as_dir in $PATH
21791do
21792  IFS=$as_save_IFS
21793  test -z "$as_dir" && as_dir=.
21794    for ac_exec_ext in '' $ac_executable_extensions; do
21795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21796    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21798    break 2
21799  fi
21800done
21801  done
21802IFS=$as_save_IFS
21803
21804  ;;
21805esac
21806fi
21807HG=$ac_cv_path_HG
21808if test -n "$HG"; then
21809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21810$as_echo "$HG" >&6; }
21811else
21812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21813$as_echo "no" >&6; }
21814fi
21815
21816
21817  test -n "$HG" && break
21818done
21819
21820    else
21821      # If it succeeded, then it was overridden by the user. We will use it
21822      # for the tool.
21823
21824      # First remove it from the list of overridden variables, so we can test
21825      # for unknown variables in the end.
21826      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21827
21828      # Check if we try to supply an empty value
21829      if test "x$HG" = x; then
21830        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21831$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21832        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21833$as_echo_n "checking for HG... " >&6; }
21834        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21835$as_echo "disabled" >&6; }
21836      else
21837        # Check if the provided tool contains a complete path.
21838        tool_specified="$HG"
21839        tool_basename="${tool_specified##*/}"
21840        if test "x$tool_basename" = "x$tool_specified"; then
21841          # A command without a complete path is provided, search $PATH.
21842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21843$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21844          # Extract the first word of "$tool_basename", so it can be a program name with args.
21845set dummy $tool_basename; ac_word=$2
21846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21847$as_echo_n "checking for $ac_word... " >&6; }
21848if ${ac_cv_path_HG+:} false; then :
21849  $as_echo_n "(cached) " >&6
21850else
21851  case $HG in
21852  [\\/]* | ?:[\\/]*)
21853  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21854  ;;
21855  *)
21856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21857for as_dir in $PATH
21858do
21859  IFS=$as_save_IFS
21860  test -z "$as_dir" && as_dir=.
21861    for ac_exec_ext in '' $ac_executable_extensions; do
21862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21863    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21865    break 2
21866  fi
21867done
21868  done
21869IFS=$as_save_IFS
21870
21871  ;;
21872esac
21873fi
21874HG=$ac_cv_path_HG
21875if test -n "$HG"; then
21876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21877$as_echo "$HG" >&6; }
21878else
21879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21880$as_echo "no" >&6; }
21881fi
21882
21883
21884          if test "x$HG" = x; then
21885            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21886          fi
21887        else
21888          # Otherwise we believe it is a complete path. Use it as it is.
21889          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21890$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21891          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21892$as_echo_n "checking for HG... " >&6; }
21893          if test ! -x "$tool_specified"; then
21894            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21895$as_echo "not found" >&6; }
21896            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21897          fi
21898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21899$as_echo "$tool_specified" >&6; }
21900        fi
21901      fi
21902    fi
21903
21904  fi
21905
21906
21907
21908
21909  # Publish this variable in the help.
21910
21911
21912  if [ -z "${STAT+x}" ]; then
21913    # The variable is not set by user, try to locate tool using the code snippet
21914    for ac_prog in stat
21915do
21916  # Extract the first word of "$ac_prog", so it can be a program name with args.
21917set dummy $ac_prog; ac_word=$2
21918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21919$as_echo_n "checking for $ac_word... " >&6; }
21920if ${ac_cv_path_STAT+:} false; then :
21921  $as_echo_n "(cached) " >&6
21922else
21923  case $STAT in
21924  [\\/]* | ?:[\\/]*)
21925  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21926  ;;
21927  *)
21928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21929for as_dir in $PATH
21930do
21931  IFS=$as_save_IFS
21932  test -z "$as_dir" && as_dir=.
21933    for ac_exec_ext in '' $ac_executable_extensions; do
21934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21935    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21937    break 2
21938  fi
21939done
21940  done
21941IFS=$as_save_IFS
21942
21943  ;;
21944esac
21945fi
21946STAT=$ac_cv_path_STAT
21947if test -n "$STAT"; then
21948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21949$as_echo "$STAT" >&6; }
21950else
21951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21952$as_echo "no" >&6; }
21953fi
21954
21955
21956  test -n "$STAT" && break
21957done
21958
21959  else
21960    # The variable is set, but is it from the command line or the environment?
21961
21962    # Try to remove the string !STAT! from our list.
21963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21965      # If it failed, the variable was not from the command line. Ignore it,
21966      # but warn the user (except for BASH, which is always set by the calling BASH).
21967      if test "xSTAT" != xBASH; then
21968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21969$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21970      fi
21971      # Try to locate tool using the code snippet
21972      for ac_prog in stat
21973do
21974  # Extract the first word of "$ac_prog", so it can be a program name with args.
21975set dummy $ac_prog; ac_word=$2
21976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21977$as_echo_n "checking for $ac_word... " >&6; }
21978if ${ac_cv_path_STAT+:} false; then :
21979  $as_echo_n "(cached) " >&6
21980else
21981  case $STAT in
21982  [\\/]* | ?:[\\/]*)
21983  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21984  ;;
21985  *)
21986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21987for as_dir in $PATH
21988do
21989  IFS=$as_save_IFS
21990  test -z "$as_dir" && as_dir=.
21991    for ac_exec_ext in '' $ac_executable_extensions; do
21992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21993    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21995    break 2
21996  fi
21997done
21998  done
21999IFS=$as_save_IFS
22000
22001  ;;
22002esac
22003fi
22004STAT=$ac_cv_path_STAT
22005if test -n "$STAT"; then
22006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22007$as_echo "$STAT" >&6; }
22008else
22009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22010$as_echo "no" >&6; }
22011fi
22012
22013
22014  test -n "$STAT" && break
22015done
22016
22017    else
22018      # If it succeeded, then it was overridden by the user. We will use it
22019      # for the tool.
22020
22021      # First remove it from the list of overridden variables, so we can test
22022      # for unknown variables in the end.
22023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22024
22025      # Check if we try to supply an empty value
22026      if test "x$STAT" = x; then
22027        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22028$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22030$as_echo_n "checking for STAT... " >&6; }
22031        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22032$as_echo "disabled" >&6; }
22033      else
22034        # Check if the provided tool contains a complete path.
22035        tool_specified="$STAT"
22036        tool_basename="${tool_specified##*/}"
22037        if test "x$tool_basename" = "x$tool_specified"; then
22038          # A command without a complete path is provided, search $PATH.
22039          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22040$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22041          # Extract the first word of "$tool_basename", so it can be a program name with args.
22042set dummy $tool_basename; ac_word=$2
22043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22044$as_echo_n "checking for $ac_word... " >&6; }
22045if ${ac_cv_path_STAT+:} false; then :
22046  $as_echo_n "(cached) " >&6
22047else
22048  case $STAT in
22049  [\\/]* | ?:[\\/]*)
22050  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22051  ;;
22052  *)
22053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22054for as_dir in $PATH
22055do
22056  IFS=$as_save_IFS
22057  test -z "$as_dir" && as_dir=.
22058    for ac_exec_ext in '' $ac_executable_extensions; do
22059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22060    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22062    break 2
22063  fi
22064done
22065  done
22066IFS=$as_save_IFS
22067
22068  ;;
22069esac
22070fi
22071STAT=$ac_cv_path_STAT
22072if test -n "$STAT"; then
22073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22074$as_echo "$STAT" >&6; }
22075else
22076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22077$as_echo "no" >&6; }
22078fi
22079
22080
22081          if test "x$STAT" = x; then
22082            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22083          fi
22084        else
22085          # Otherwise we believe it is a complete path. Use it as it is.
22086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22087$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22088          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22089$as_echo_n "checking for STAT... " >&6; }
22090          if test ! -x "$tool_specified"; then
22091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22092$as_echo "not found" >&6; }
22093            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22094          fi
22095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22096$as_echo "$tool_specified" >&6; }
22097        fi
22098      fi
22099    fi
22100
22101  fi
22102
22103
22104
22105
22106  # Publish this variable in the help.
22107
22108
22109  if [ -z "${TIME+x}" ]; then
22110    # The variable is not set by user, try to locate tool using the code snippet
22111    for ac_prog in time
22112do
22113  # Extract the first word of "$ac_prog", so it can be a program name with args.
22114set dummy $ac_prog; ac_word=$2
22115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22116$as_echo_n "checking for $ac_word... " >&6; }
22117if ${ac_cv_path_TIME+:} false; then :
22118  $as_echo_n "(cached) " >&6
22119else
22120  case $TIME in
22121  [\\/]* | ?:[\\/]*)
22122  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22123  ;;
22124  *)
22125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22126for as_dir in $PATH
22127do
22128  IFS=$as_save_IFS
22129  test -z "$as_dir" && as_dir=.
22130    for ac_exec_ext in '' $ac_executable_extensions; do
22131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22132    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22134    break 2
22135  fi
22136done
22137  done
22138IFS=$as_save_IFS
22139
22140  ;;
22141esac
22142fi
22143TIME=$ac_cv_path_TIME
22144if test -n "$TIME"; then
22145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22146$as_echo "$TIME" >&6; }
22147else
22148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22149$as_echo "no" >&6; }
22150fi
22151
22152
22153  test -n "$TIME" && break
22154done
22155
22156  else
22157    # The variable is set, but is it from the command line or the environment?
22158
22159    # Try to remove the string !TIME! from our list.
22160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22162      # If it failed, the variable was not from the command line. Ignore it,
22163      # but warn the user (except for BASH, which is always set by the calling BASH).
22164      if test "xTIME" != xBASH; then
22165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22166$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22167      fi
22168      # Try to locate tool using the code snippet
22169      for ac_prog in time
22170do
22171  # Extract the first word of "$ac_prog", so it can be a program name with args.
22172set dummy $ac_prog; ac_word=$2
22173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22174$as_echo_n "checking for $ac_word... " >&6; }
22175if ${ac_cv_path_TIME+:} false; then :
22176  $as_echo_n "(cached) " >&6
22177else
22178  case $TIME in
22179  [\\/]* | ?:[\\/]*)
22180  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22181  ;;
22182  *)
22183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22184for as_dir in $PATH
22185do
22186  IFS=$as_save_IFS
22187  test -z "$as_dir" && as_dir=.
22188    for ac_exec_ext in '' $ac_executable_extensions; do
22189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22190    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22192    break 2
22193  fi
22194done
22195  done
22196IFS=$as_save_IFS
22197
22198  ;;
22199esac
22200fi
22201TIME=$ac_cv_path_TIME
22202if test -n "$TIME"; then
22203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22204$as_echo "$TIME" >&6; }
22205else
22206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22207$as_echo "no" >&6; }
22208fi
22209
22210
22211  test -n "$TIME" && break
22212done
22213
22214    else
22215      # If it succeeded, then it was overridden by the user. We will use it
22216      # for the tool.
22217
22218      # First remove it from the list of overridden variables, so we can test
22219      # for unknown variables in the end.
22220      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22221
22222      # Check if we try to supply an empty value
22223      if test "x$TIME" = x; then
22224        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22225$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22227$as_echo_n "checking for TIME... " >&6; }
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22229$as_echo "disabled" >&6; }
22230      else
22231        # Check if the provided tool contains a complete path.
22232        tool_specified="$TIME"
22233        tool_basename="${tool_specified##*/}"
22234        if test "x$tool_basename" = "x$tool_specified"; then
22235          # A command without a complete path is provided, search $PATH.
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22237$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22238          # Extract the first word of "$tool_basename", so it can be a program name with args.
22239set dummy $tool_basename; ac_word=$2
22240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22241$as_echo_n "checking for $ac_word... " >&6; }
22242if ${ac_cv_path_TIME+:} false; then :
22243  $as_echo_n "(cached) " >&6
22244else
22245  case $TIME in
22246  [\\/]* | ?:[\\/]*)
22247  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22248  ;;
22249  *)
22250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22251for as_dir in $PATH
22252do
22253  IFS=$as_save_IFS
22254  test -z "$as_dir" && as_dir=.
22255    for ac_exec_ext in '' $ac_executable_extensions; do
22256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22257    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22259    break 2
22260  fi
22261done
22262  done
22263IFS=$as_save_IFS
22264
22265  ;;
22266esac
22267fi
22268TIME=$ac_cv_path_TIME
22269if test -n "$TIME"; then
22270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22271$as_echo "$TIME" >&6; }
22272else
22273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22274$as_echo "no" >&6; }
22275fi
22276
22277
22278          if test "x$TIME" = x; then
22279            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22280          fi
22281        else
22282          # Otherwise we believe it is a complete path. Use it as it is.
22283          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22284$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22285          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22286$as_echo_n "checking for TIME... " >&6; }
22287          if test ! -x "$tool_specified"; then
22288            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22289$as_echo "not found" >&6; }
22290            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22291          fi
22292          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22293$as_echo "$tool_specified" >&6; }
22294        fi
22295      fi
22296    fi
22297
22298  fi
22299
22300
22301
22302
22303  # Publish this variable in the help.
22304
22305
22306  if [ -z "${DTRACE+x}" ]; then
22307    # The variable is not set by user, try to locate tool using the code snippet
22308    for ac_prog in dtrace
22309do
22310  # Extract the first word of "$ac_prog", so it can be a program name with args.
22311set dummy $ac_prog; ac_word=$2
22312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22313$as_echo_n "checking for $ac_word... " >&6; }
22314if ${ac_cv_path_DTRACE+:} false; then :
22315  $as_echo_n "(cached) " >&6
22316else
22317  case $DTRACE in
22318  [\\/]* | ?:[\\/]*)
22319  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22320  ;;
22321  *)
22322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22323for as_dir in $PATH
22324do
22325  IFS=$as_save_IFS
22326  test -z "$as_dir" && as_dir=.
22327    for ac_exec_ext in '' $ac_executable_extensions; do
22328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22329    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22331    break 2
22332  fi
22333done
22334  done
22335IFS=$as_save_IFS
22336
22337  ;;
22338esac
22339fi
22340DTRACE=$ac_cv_path_DTRACE
22341if test -n "$DTRACE"; then
22342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22343$as_echo "$DTRACE" >&6; }
22344else
22345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22346$as_echo "no" >&6; }
22347fi
22348
22349
22350  test -n "$DTRACE" && break
22351done
22352
22353  else
22354    # The variable is set, but is it from the command line or the environment?
22355
22356    # Try to remove the string !DTRACE! from our list.
22357    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22358    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22359      # If it failed, the variable was not from the command line. Ignore it,
22360      # but warn the user (except for BASH, which is always set by the calling BASH).
22361      if test "xDTRACE" != xBASH; then
22362        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22363$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22364      fi
22365      # Try to locate tool using the code snippet
22366      for ac_prog in dtrace
22367do
22368  # Extract the first word of "$ac_prog", so it can be a program name with args.
22369set dummy $ac_prog; ac_word=$2
22370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22371$as_echo_n "checking for $ac_word... " >&6; }
22372if ${ac_cv_path_DTRACE+:} false; then :
22373  $as_echo_n "(cached) " >&6
22374else
22375  case $DTRACE in
22376  [\\/]* | ?:[\\/]*)
22377  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22378  ;;
22379  *)
22380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22381for as_dir in $PATH
22382do
22383  IFS=$as_save_IFS
22384  test -z "$as_dir" && as_dir=.
22385    for ac_exec_ext in '' $ac_executable_extensions; do
22386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22387    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22389    break 2
22390  fi
22391done
22392  done
22393IFS=$as_save_IFS
22394
22395  ;;
22396esac
22397fi
22398DTRACE=$ac_cv_path_DTRACE
22399if test -n "$DTRACE"; then
22400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22401$as_echo "$DTRACE" >&6; }
22402else
22403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22404$as_echo "no" >&6; }
22405fi
22406
22407
22408  test -n "$DTRACE" && break
22409done
22410
22411    else
22412      # If it succeeded, then it was overridden by the user. We will use it
22413      # for the tool.
22414
22415      # First remove it from the list of overridden variables, so we can test
22416      # for unknown variables in the end.
22417      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22418
22419      # Check if we try to supply an empty value
22420      if test "x$DTRACE" = x; then
22421        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22422$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22423        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22424$as_echo_n "checking for DTRACE... " >&6; }
22425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22426$as_echo "disabled" >&6; }
22427      else
22428        # Check if the provided tool contains a complete path.
22429        tool_specified="$DTRACE"
22430        tool_basename="${tool_specified##*/}"
22431        if test "x$tool_basename" = "x$tool_specified"; then
22432          # A command without a complete path is provided, search $PATH.
22433          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22434$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22435          # Extract the first word of "$tool_basename", so it can be a program name with args.
22436set dummy $tool_basename; ac_word=$2
22437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22438$as_echo_n "checking for $ac_word... " >&6; }
22439if ${ac_cv_path_DTRACE+:} false; then :
22440  $as_echo_n "(cached) " >&6
22441else
22442  case $DTRACE in
22443  [\\/]* | ?:[\\/]*)
22444  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22445  ;;
22446  *)
22447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22448for as_dir in $PATH
22449do
22450  IFS=$as_save_IFS
22451  test -z "$as_dir" && as_dir=.
22452    for ac_exec_ext in '' $ac_executable_extensions; do
22453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22454    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22456    break 2
22457  fi
22458done
22459  done
22460IFS=$as_save_IFS
22461
22462  ;;
22463esac
22464fi
22465DTRACE=$ac_cv_path_DTRACE
22466if test -n "$DTRACE"; then
22467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22468$as_echo "$DTRACE" >&6; }
22469else
22470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22471$as_echo "no" >&6; }
22472fi
22473
22474
22475          if test "x$DTRACE" = x; then
22476            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22477          fi
22478        else
22479          # Otherwise we believe it is a complete path. Use it as it is.
22480          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22481$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22482          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22483$as_echo_n "checking for DTRACE... " >&6; }
22484          if test ! -x "$tool_specified"; then
22485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22486$as_echo "not found" >&6; }
22487            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22488          fi
22489          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22490$as_echo "$tool_specified" >&6; }
22491        fi
22492      fi
22493    fi
22494
22495  fi
22496
22497
22498
22499
22500  # Publish this variable in the help.
22501
22502
22503  if [ -z "${PATCH+x}" ]; then
22504    # The variable is not set by user, try to locate tool using the code snippet
22505    for ac_prog in gpatch patch
22506do
22507  # Extract the first word of "$ac_prog", so it can be a program name with args.
22508set dummy $ac_prog; ac_word=$2
22509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22510$as_echo_n "checking for $ac_word... " >&6; }
22511if ${ac_cv_path_PATCH+:} false; then :
22512  $as_echo_n "(cached) " >&6
22513else
22514  case $PATCH in
22515  [\\/]* | ?:[\\/]*)
22516  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22517  ;;
22518  *)
22519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22520for as_dir in $PATH
22521do
22522  IFS=$as_save_IFS
22523  test -z "$as_dir" && as_dir=.
22524    for ac_exec_ext in '' $ac_executable_extensions; do
22525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22526    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22528    break 2
22529  fi
22530done
22531  done
22532IFS=$as_save_IFS
22533
22534  ;;
22535esac
22536fi
22537PATCH=$ac_cv_path_PATCH
22538if test -n "$PATCH"; then
22539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22540$as_echo "$PATCH" >&6; }
22541else
22542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22543$as_echo "no" >&6; }
22544fi
22545
22546
22547  test -n "$PATCH" && break
22548done
22549
22550  else
22551    # The variable is set, but is it from the command line or the environment?
22552
22553    # Try to remove the string !PATCH! from our list.
22554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22556      # If it failed, the variable was not from the command line. Ignore it,
22557      # but warn the user (except for BASH, which is always set by the calling BASH).
22558      if test "xPATCH" != xBASH; then
22559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22560$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22561      fi
22562      # Try to locate tool using the code snippet
22563      for ac_prog in gpatch patch
22564do
22565  # Extract the first word of "$ac_prog", so it can be a program name with args.
22566set dummy $ac_prog; ac_word=$2
22567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22568$as_echo_n "checking for $ac_word... " >&6; }
22569if ${ac_cv_path_PATCH+:} false; then :
22570  $as_echo_n "(cached) " >&6
22571else
22572  case $PATCH in
22573  [\\/]* | ?:[\\/]*)
22574  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22575  ;;
22576  *)
22577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22578for as_dir in $PATH
22579do
22580  IFS=$as_save_IFS
22581  test -z "$as_dir" && as_dir=.
22582    for ac_exec_ext in '' $ac_executable_extensions; do
22583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22584    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22586    break 2
22587  fi
22588done
22589  done
22590IFS=$as_save_IFS
22591
22592  ;;
22593esac
22594fi
22595PATCH=$ac_cv_path_PATCH
22596if test -n "$PATCH"; then
22597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22598$as_echo "$PATCH" >&6; }
22599else
22600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22601$as_echo "no" >&6; }
22602fi
22603
22604
22605  test -n "$PATCH" && break
22606done
22607
22608    else
22609      # If it succeeded, then it was overridden by the user. We will use it
22610      # for the tool.
22611
22612      # First remove it from the list of overridden variables, so we can test
22613      # for unknown variables in the end.
22614      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22615
22616      # Check if we try to supply an empty value
22617      if test "x$PATCH" = x; then
22618        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22619$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22621$as_echo_n "checking for PATCH... " >&6; }
22622        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22623$as_echo "disabled" >&6; }
22624      else
22625        # Check if the provided tool contains a complete path.
22626        tool_specified="$PATCH"
22627        tool_basename="${tool_specified##*/}"
22628        if test "x$tool_basename" = "x$tool_specified"; then
22629          # A command without a complete path is provided, search $PATH.
22630          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22631$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22632          # Extract the first word of "$tool_basename", so it can be a program name with args.
22633set dummy $tool_basename; ac_word=$2
22634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22635$as_echo_n "checking for $ac_word... " >&6; }
22636if ${ac_cv_path_PATCH+:} false; then :
22637  $as_echo_n "(cached) " >&6
22638else
22639  case $PATCH in
22640  [\\/]* | ?:[\\/]*)
22641  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22642  ;;
22643  *)
22644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22645for as_dir in $PATH
22646do
22647  IFS=$as_save_IFS
22648  test -z "$as_dir" && as_dir=.
22649    for ac_exec_ext in '' $ac_executable_extensions; do
22650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22651    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22653    break 2
22654  fi
22655done
22656  done
22657IFS=$as_save_IFS
22658
22659  ;;
22660esac
22661fi
22662PATCH=$ac_cv_path_PATCH
22663if test -n "$PATCH"; then
22664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22665$as_echo "$PATCH" >&6; }
22666else
22667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22668$as_echo "no" >&6; }
22669fi
22670
22671
22672          if test "x$PATCH" = x; then
22673            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22674          fi
22675        else
22676          # Otherwise we believe it is a complete path. Use it as it is.
22677          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22678$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22679          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22680$as_echo_n "checking for PATCH... " >&6; }
22681          if test ! -x "$tool_specified"; then
22682            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22683$as_echo "not found" >&6; }
22684            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22685          fi
22686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22687$as_echo "$tool_specified" >&6; }
22688        fi
22689      fi
22690    fi
22691
22692  fi
22693
22694
22695  # Check if it's GNU time
22696  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22697  if test "x$IS_GNU_TIME" != x; then
22698    IS_GNU_TIME=yes
22699  else
22700    IS_GNU_TIME=no
22701  fi
22702
22703
22704  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22705
22706
22707
22708  # Publish this variable in the help.
22709
22710
22711  if [ -z "${DSYMUTIL+x}" ]; then
22712    # The variable is not set by user, try to locate tool using the code snippet
22713    for ac_prog in dsymutil
22714do
22715  # Extract the first word of "$ac_prog", so it can be a program name with args.
22716set dummy $ac_prog; ac_word=$2
22717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22718$as_echo_n "checking for $ac_word... " >&6; }
22719if ${ac_cv_path_DSYMUTIL+:} false; then :
22720  $as_echo_n "(cached) " >&6
22721else
22722  case $DSYMUTIL in
22723  [\\/]* | ?:[\\/]*)
22724  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22725  ;;
22726  *)
22727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22728for as_dir in $PATH
22729do
22730  IFS=$as_save_IFS
22731  test -z "$as_dir" && as_dir=.
22732    for ac_exec_ext in '' $ac_executable_extensions; do
22733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22734    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22736    break 2
22737  fi
22738done
22739  done
22740IFS=$as_save_IFS
22741
22742  ;;
22743esac
22744fi
22745DSYMUTIL=$ac_cv_path_DSYMUTIL
22746if test -n "$DSYMUTIL"; then
22747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22748$as_echo "$DSYMUTIL" >&6; }
22749else
22750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22751$as_echo "no" >&6; }
22752fi
22753
22754
22755  test -n "$DSYMUTIL" && break
22756done
22757
22758  else
22759    # The variable is set, but is it from the command line or the environment?
22760
22761    # Try to remove the string !DSYMUTIL! from our list.
22762    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22763    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22764      # If it failed, the variable was not from the command line. Ignore it,
22765      # but warn the user (except for BASH, which is always set by the calling BASH).
22766      if test "xDSYMUTIL" != xBASH; then
22767        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22768$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22769      fi
22770      # Try to locate tool using the code snippet
22771      for ac_prog in dsymutil
22772do
22773  # Extract the first word of "$ac_prog", so it can be a program name with args.
22774set dummy $ac_prog; ac_word=$2
22775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22776$as_echo_n "checking for $ac_word... " >&6; }
22777if ${ac_cv_path_DSYMUTIL+:} false; then :
22778  $as_echo_n "(cached) " >&6
22779else
22780  case $DSYMUTIL in
22781  [\\/]* | ?:[\\/]*)
22782  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22783  ;;
22784  *)
22785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22786for as_dir in $PATH
22787do
22788  IFS=$as_save_IFS
22789  test -z "$as_dir" && as_dir=.
22790    for ac_exec_ext in '' $ac_executable_extensions; do
22791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22792    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22794    break 2
22795  fi
22796done
22797  done
22798IFS=$as_save_IFS
22799
22800  ;;
22801esac
22802fi
22803DSYMUTIL=$ac_cv_path_DSYMUTIL
22804if test -n "$DSYMUTIL"; then
22805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22806$as_echo "$DSYMUTIL" >&6; }
22807else
22808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22809$as_echo "no" >&6; }
22810fi
22811
22812
22813  test -n "$DSYMUTIL" && break
22814done
22815
22816    else
22817      # If it succeeded, then it was overridden by the user. We will use it
22818      # for the tool.
22819
22820      # First remove it from the list of overridden variables, so we can test
22821      # for unknown variables in the end.
22822      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22823
22824      # Check if we try to supply an empty value
22825      if test "x$DSYMUTIL" = x; then
22826        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22827$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22829$as_echo_n "checking for DSYMUTIL... " >&6; }
22830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22831$as_echo "disabled" >&6; }
22832      else
22833        # Check if the provided tool contains a complete path.
22834        tool_specified="$DSYMUTIL"
22835        tool_basename="${tool_specified##*/}"
22836        if test "x$tool_basename" = "x$tool_specified"; then
22837          # A command without a complete path is provided, search $PATH.
22838          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22839$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22840          # Extract the first word of "$tool_basename", so it can be a program name with args.
22841set dummy $tool_basename; ac_word=$2
22842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22843$as_echo_n "checking for $ac_word... " >&6; }
22844if ${ac_cv_path_DSYMUTIL+:} false; then :
22845  $as_echo_n "(cached) " >&6
22846else
22847  case $DSYMUTIL in
22848  [\\/]* | ?:[\\/]*)
22849  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22850  ;;
22851  *)
22852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22853for as_dir in $PATH
22854do
22855  IFS=$as_save_IFS
22856  test -z "$as_dir" && as_dir=.
22857    for ac_exec_ext in '' $ac_executable_extensions; do
22858  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22859    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22860    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22861    break 2
22862  fi
22863done
22864  done
22865IFS=$as_save_IFS
22866
22867  ;;
22868esac
22869fi
22870DSYMUTIL=$ac_cv_path_DSYMUTIL
22871if test -n "$DSYMUTIL"; then
22872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22873$as_echo "$DSYMUTIL" >&6; }
22874else
22875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22876$as_echo "no" >&6; }
22877fi
22878
22879
22880          if test "x$DSYMUTIL" = x; then
22881            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22882          fi
22883        else
22884          # Otherwise we believe it is a complete path. Use it as it is.
22885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22886$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22887          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22888$as_echo_n "checking for DSYMUTIL... " >&6; }
22889          if test ! -x "$tool_specified"; then
22890            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22891$as_echo "not found" >&6; }
22892            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22893          fi
22894          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22895$as_echo "$tool_specified" >&6; }
22896        fi
22897      fi
22898    fi
22899
22900  fi
22901
22902
22903
22904  if test "x$DSYMUTIL" = x; then
22905    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22906  fi
22907
22908
22909
22910
22911
22912  # Publish this variable in the help.
22913
22914
22915  if [ -z "${XATTR+x}" ]; then
22916    # The variable is not set by user, try to locate tool using the code snippet
22917    for ac_prog in xattr
22918do
22919  # Extract the first word of "$ac_prog", so it can be a program name with args.
22920set dummy $ac_prog; ac_word=$2
22921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22922$as_echo_n "checking for $ac_word... " >&6; }
22923if ${ac_cv_path_XATTR+:} false; then :
22924  $as_echo_n "(cached) " >&6
22925else
22926  case $XATTR in
22927  [\\/]* | ?:[\\/]*)
22928  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22929  ;;
22930  *)
22931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22932for as_dir in $PATH
22933do
22934  IFS=$as_save_IFS
22935  test -z "$as_dir" && as_dir=.
22936    for ac_exec_ext in '' $ac_executable_extensions; do
22937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22938    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22940    break 2
22941  fi
22942done
22943  done
22944IFS=$as_save_IFS
22945
22946  ;;
22947esac
22948fi
22949XATTR=$ac_cv_path_XATTR
22950if test -n "$XATTR"; then
22951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22952$as_echo "$XATTR" >&6; }
22953else
22954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22955$as_echo "no" >&6; }
22956fi
22957
22958
22959  test -n "$XATTR" && break
22960done
22961
22962  else
22963    # The variable is set, but is it from the command line or the environment?
22964
22965    # Try to remove the string !XATTR! from our list.
22966    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22967    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22968      # If it failed, the variable was not from the command line. Ignore it,
22969      # but warn the user (except for BASH, which is always set by the calling BASH).
22970      if test "xXATTR" != xBASH; then
22971        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22972$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22973      fi
22974      # Try to locate tool using the code snippet
22975      for ac_prog in xattr
22976do
22977  # Extract the first word of "$ac_prog", so it can be a program name with args.
22978set dummy $ac_prog; ac_word=$2
22979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22980$as_echo_n "checking for $ac_word... " >&6; }
22981if ${ac_cv_path_XATTR+:} false; then :
22982  $as_echo_n "(cached) " >&6
22983else
22984  case $XATTR in
22985  [\\/]* | ?:[\\/]*)
22986  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22987  ;;
22988  *)
22989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22990for as_dir in $PATH
22991do
22992  IFS=$as_save_IFS
22993  test -z "$as_dir" && as_dir=.
22994    for ac_exec_ext in '' $ac_executable_extensions; do
22995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22996    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22998    break 2
22999  fi
23000done
23001  done
23002IFS=$as_save_IFS
23003
23004  ;;
23005esac
23006fi
23007XATTR=$ac_cv_path_XATTR
23008if test -n "$XATTR"; then
23009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23010$as_echo "$XATTR" >&6; }
23011else
23012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23013$as_echo "no" >&6; }
23014fi
23015
23016
23017  test -n "$XATTR" && break
23018done
23019
23020    else
23021      # If it succeeded, then it was overridden by the user. We will use it
23022      # for the tool.
23023
23024      # First remove it from the list of overridden variables, so we can test
23025      # for unknown variables in the end.
23026      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23027
23028      # Check if we try to supply an empty value
23029      if test "x$XATTR" = x; then
23030        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23031$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23032        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23033$as_echo_n "checking for XATTR... " >&6; }
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23035$as_echo "disabled" >&6; }
23036      else
23037        # Check if the provided tool contains a complete path.
23038        tool_specified="$XATTR"
23039        tool_basename="${tool_specified##*/}"
23040        if test "x$tool_basename" = "x$tool_specified"; then
23041          # A command without a complete path is provided, search $PATH.
23042          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23043$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23044          # Extract the first word of "$tool_basename", so it can be a program name with args.
23045set dummy $tool_basename; ac_word=$2
23046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23047$as_echo_n "checking for $ac_word... " >&6; }
23048if ${ac_cv_path_XATTR+:} false; then :
23049  $as_echo_n "(cached) " >&6
23050else
23051  case $XATTR in
23052  [\\/]* | ?:[\\/]*)
23053  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23054  ;;
23055  *)
23056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23057for as_dir in $PATH
23058do
23059  IFS=$as_save_IFS
23060  test -z "$as_dir" && as_dir=.
23061    for ac_exec_ext in '' $ac_executable_extensions; do
23062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23063    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23065    break 2
23066  fi
23067done
23068  done
23069IFS=$as_save_IFS
23070
23071  ;;
23072esac
23073fi
23074XATTR=$ac_cv_path_XATTR
23075if test -n "$XATTR"; then
23076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23077$as_echo "$XATTR" >&6; }
23078else
23079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23080$as_echo "no" >&6; }
23081fi
23082
23083
23084          if test "x$XATTR" = x; then
23085            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23086          fi
23087        else
23088          # Otherwise we believe it is a complete path. Use it as it is.
23089          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23090$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23091          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23092$as_echo_n "checking for XATTR... " >&6; }
23093          if test ! -x "$tool_specified"; then
23094            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23095$as_echo "not found" >&6; }
23096            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23097          fi
23098          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23099$as_echo "$tool_specified" >&6; }
23100        fi
23101      fi
23102    fi
23103
23104  fi
23105
23106
23107
23108  if test "x$XATTR" = x; then
23109    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23110  fi
23111
23112
23113
23114
23115  # Publish this variable in the help.
23116
23117
23118  if [ -z "${CODESIGN+x}" ]; then
23119    # The variable is not set by user, try to locate tool using the code snippet
23120    for ac_prog in codesign
23121do
23122  # Extract the first word of "$ac_prog", so it can be a program name with args.
23123set dummy $ac_prog; ac_word=$2
23124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23125$as_echo_n "checking for $ac_word... " >&6; }
23126if ${ac_cv_path_CODESIGN+:} false; then :
23127  $as_echo_n "(cached) " >&6
23128else
23129  case $CODESIGN in
23130  [\\/]* | ?:[\\/]*)
23131  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23132  ;;
23133  *)
23134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23135for as_dir in $PATH
23136do
23137  IFS=$as_save_IFS
23138  test -z "$as_dir" && as_dir=.
23139    for ac_exec_ext in '' $ac_executable_extensions; do
23140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23141    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23143    break 2
23144  fi
23145done
23146  done
23147IFS=$as_save_IFS
23148
23149  ;;
23150esac
23151fi
23152CODESIGN=$ac_cv_path_CODESIGN
23153if test -n "$CODESIGN"; then
23154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23155$as_echo "$CODESIGN" >&6; }
23156else
23157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23158$as_echo "no" >&6; }
23159fi
23160
23161
23162  test -n "$CODESIGN" && break
23163done
23164
23165  else
23166    # The variable is set, but is it from the command line or the environment?
23167
23168    # Try to remove the string !CODESIGN! from our list.
23169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23171      # If it failed, the variable was not from the command line. Ignore it,
23172      # but warn the user (except for BASH, which is always set by the calling BASH).
23173      if test "xCODESIGN" != xBASH; then
23174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23175$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23176      fi
23177      # Try to locate tool using the code snippet
23178      for ac_prog in codesign
23179do
23180  # Extract the first word of "$ac_prog", so it can be a program name with args.
23181set dummy $ac_prog; ac_word=$2
23182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23183$as_echo_n "checking for $ac_word... " >&6; }
23184if ${ac_cv_path_CODESIGN+:} false; then :
23185  $as_echo_n "(cached) " >&6
23186else
23187  case $CODESIGN in
23188  [\\/]* | ?:[\\/]*)
23189  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23190  ;;
23191  *)
23192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23193for as_dir in $PATH
23194do
23195  IFS=$as_save_IFS
23196  test -z "$as_dir" && as_dir=.
23197    for ac_exec_ext in '' $ac_executable_extensions; do
23198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23199    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23201    break 2
23202  fi
23203done
23204  done
23205IFS=$as_save_IFS
23206
23207  ;;
23208esac
23209fi
23210CODESIGN=$ac_cv_path_CODESIGN
23211if test -n "$CODESIGN"; then
23212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23213$as_echo "$CODESIGN" >&6; }
23214else
23215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23216$as_echo "no" >&6; }
23217fi
23218
23219
23220  test -n "$CODESIGN" && break
23221done
23222
23223    else
23224      # If it succeeded, then it was overridden by the user. We will use it
23225      # for the tool.
23226
23227      # First remove it from the list of overridden variables, so we can test
23228      # for unknown variables in the end.
23229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23230
23231      # Check if we try to supply an empty value
23232      if test "x$CODESIGN" = x; then
23233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23234$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23236$as_echo_n "checking for CODESIGN... " >&6; }
23237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23238$as_echo "disabled" >&6; }
23239      else
23240        # Check if the provided tool contains a complete path.
23241        tool_specified="$CODESIGN"
23242        tool_basename="${tool_specified##*/}"
23243        if test "x$tool_basename" = "x$tool_specified"; then
23244          # A command without a complete path is provided, search $PATH.
23245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23246$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23247          # Extract the first word of "$tool_basename", so it can be a program name with args.
23248set dummy $tool_basename; ac_word=$2
23249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23250$as_echo_n "checking for $ac_word... " >&6; }
23251if ${ac_cv_path_CODESIGN+:} false; then :
23252  $as_echo_n "(cached) " >&6
23253else
23254  case $CODESIGN in
23255  [\\/]* | ?:[\\/]*)
23256  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23257  ;;
23258  *)
23259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23260for as_dir in $PATH
23261do
23262  IFS=$as_save_IFS
23263  test -z "$as_dir" && as_dir=.
23264    for ac_exec_ext in '' $ac_executable_extensions; do
23265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23266    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23268    break 2
23269  fi
23270done
23271  done
23272IFS=$as_save_IFS
23273
23274  ;;
23275esac
23276fi
23277CODESIGN=$ac_cv_path_CODESIGN
23278if test -n "$CODESIGN"; then
23279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23280$as_echo "$CODESIGN" >&6; }
23281else
23282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23283$as_echo "no" >&6; }
23284fi
23285
23286
23287          if test "x$CODESIGN" = x; then
23288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23289          fi
23290        else
23291          # Otherwise we believe it is a complete path. Use it as it is.
23292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23293$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23295$as_echo_n "checking for CODESIGN... " >&6; }
23296          if test ! -x "$tool_specified"; then
23297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23298$as_echo "not found" >&6; }
23299            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23300          fi
23301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23302$as_echo "$tool_specified" >&6; }
23303        fi
23304      fi
23305    fi
23306
23307  fi
23308
23309
23310    if test "x$CODESIGN" != "x"; then
23311      # Verify that the openjdk_codesign certificate is present
23312      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23313$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23314      rm -f codesign-testfile
23315      touch codesign-testfile
23316      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23317      rm -f codesign-testfile
23318      if test "x$CODESIGN" = x; then
23319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23320$as_echo "no" >&6; }
23321      else
23322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23323$as_echo "yes" >&6; }
23324      fi
23325    fi
23326
23327
23328
23329  # Publish this variable in the help.
23330
23331
23332  if [ -z "${SETFILE+x}" ]; then
23333    # The variable is not set by user, try to locate tool using the code snippet
23334    for ac_prog in SetFile
23335do
23336  # Extract the first word of "$ac_prog", so it can be a program name with args.
23337set dummy $ac_prog; ac_word=$2
23338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23339$as_echo_n "checking for $ac_word... " >&6; }
23340if ${ac_cv_path_SETFILE+:} false; then :
23341  $as_echo_n "(cached) " >&6
23342else
23343  case $SETFILE in
23344  [\\/]* | ?:[\\/]*)
23345  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23346  ;;
23347  *)
23348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23349for as_dir in $PATH
23350do
23351  IFS=$as_save_IFS
23352  test -z "$as_dir" && as_dir=.
23353    for ac_exec_ext in '' $ac_executable_extensions; do
23354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23355    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23357    break 2
23358  fi
23359done
23360  done
23361IFS=$as_save_IFS
23362
23363  ;;
23364esac
23365fi
23366SETFILE=$ac_cv_path_SETFILE
23367if test -n "$SETFILE"; then
23368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23369$as_echo "$SETFILE" >&6; }
23370else
23371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23372$as_echo "no" >&6; }
23373fi
23374
23375
23376  test -n "$SETFILE" && break
23377done
23378
23379  else
23380    # The variable is set, but is it from the command line or the environment?
23381
23382    # Try to remove the string !SETFILE! from our list.
23383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23385      # If it failed, the variable was not from the command line. Ignore it,
23386      # but warn the user (except for BASH, which is always set by the calling BASH).
23387      if test "xSETFILE" != xBASH; then
23388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23389$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23390      fi
23391      # Try to locate tool using the code snippet
23392      for ac_prog in SetFile
23393do
23394  # Extract the first word of "$ac_prog", so it can be a program name with args.
23395set dummy $ac_prog; ac_word=$2
23396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23397$as_echo_n "checking for $ac_word... " >&6; }
23398if ${ac_cv_path_SETFILE+:} false; then :
23399  $as_echo_n "(cached) " >&6
23400else
23401  case $SETFILE in
23402  [\\/]* | ?:[\\/]*)
23403  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23404  ;;
23405  *)
23406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23407for as_dir in $PATH
23408do
23409  IFS=$as_save_IFS
23410  test -z "$as_dir" && as_dir=.
23411    for ac_exec_ext in '' $ac_executable_extensions; do
23412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23413    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23415    break 2
23416  fi
23417done
23418  done
23419IFS=$as_save_IFS
23420
23421  ;;
23422esac
23423fi
23424SETFILE=$ac_cv_path_SETFILE
23425if test -n "$SETFILE"; then
23426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23427$as_echo "$SETFILE" >&6; }
23428else
23429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23430$as_echo "no" >&6; }
23431fi
23432
23433
23434  test -n "$SETFILE" && break
23435done
23436
23437    else
23438      # If it succeeded, then it was overridden by the user. We will use it
23439      # for the tool.
23440
23441      # First remove it from the list of overridden variables, so we can test
23442      # for unknown variables in the end.
23443      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23444
23445      # Check if we try to supply an empty value
23446      if test "x$SETFILE" = x; then
23447        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23448$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23450$as_echo_n "checking for SETFILE... " >&6; }
23451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23452$as_echo "disabled" >&6; }
23453      else
23454        # Check if the provided tool contains a complete path.
23455        tool_specified="$SETFILE"
23456        tool_basename="${tool_specified##*/}"
23457        if test "x$tool_basename" = "x$tool_specified"; then
23458          # A command without a complete path is provided, search $PATH.
23459          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23460$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23461          # Extract the first word of "$tool_basename", so it can be a program name with args.
23462set dummy $tool_basename; ac_word=$2
23463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23464$as_echo_n "checking for $ac_word... " >&6; }
23465if ${ac_cv_path_SETFILE+:} false; then :
23466  $as_echo_n "(cached) " >&6
23467else
23468  case $SETFILE in
23469  [\\/]* | ?:[\\/]*)
23470  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23471  ;;
23472  *)
23473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23474for as_dir in $PATH
23475do
23476  IFS=$as_save_IFS
23477  test -z "$as_dir" && as_dir=.
23478    for ac_exec_ext in '' $ac_executable_extensions; do
23479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23480    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23482    break 2
23483  fi
23484done
23485  done
23486IFS=$as_save_IFS
23487
23488  ;;
23489esac
23490fi
23491SETFILE=$ac_cv_path_SETFILE
23492if test -n "$SETFILE"; then
23493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23494$as_echo "$SETFILE" >&6; }
23495else
23496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23497$as_echo "no" >&6; }
23498fi
23499
23500
23501          if test "x$SETFILE" = x; then
23502            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23503          fi
23504        else
23505          # Otherwise we believe it is a complete path. Use it as it is.
23506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23507$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23508          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23509$as_echo_n "checking for SETFILE... " >&6; }
23510          if test ! -x "$tool_specified"; then
23511            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23512$as_echo "not found" >&6; }
23513            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23514          fi
23515          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23516$as_echo "$tool_specified" >&6; }
23517        fi
23518      fi
23519    fi
23520
23521  fi
23522
23523
23524
23525  if test "x$SETFILE" = x; then
23526    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23527  fi
23528
23529
23530  fi
23531
23532
23533  # Test if bash supports pipefail.
23534  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23535$as_echo_n "checking if bash supports pipefail... " >&6; }
23536  if ${BASH} -c 'set -o pipefail'; then
23537    BASH_ARGS="$BASH_ARGS -o pipefail"
23538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23539$as_echo "yes" >&6; }
23540  else
23541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23542$as_echo "no" >&6; }
23543  fi
23544
23545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23546$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23547  if ${BASH} -e -c 'true'; then
23548    BASH_ARGS="$BASH_ARGS -e"
23549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23550$as_echo "yes" >&6; }
23551  else
23552    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23553$as_echo "no" >&6; }
23554  fi
23555
23556
23557
23558
23559# Check if pkg-config is available.
23560
23561
23562if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23563	if test -n "$ac_tool_prefix"; then
23564  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23565set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23567$as_echo_n "checking for $ac_word... " >&6; }
23568if ${ac_cv_path_PKG_CONFIG+:} false; then :
23569  $as_echo_n "(cached) " >&6
23570else
23571  case $PKG_CONFIG in
23572  [\\/]* | ?:[\\/]*)
23573  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23574  ;;
23575  *)
23576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23577for as_dir in $PATH
23578do
23579  IFS=$as_save_IFS
23580  test -z "$as_dir" && as_dir=.
23581    for ac_exec_ext in '' $ac_executable_extensions; do
23582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23583    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23585    break 2
23586  fi
23587done
23588  done
23589IFS=$as_save_IFS
23590
23591  ;;
23592esac
23593fi
23594PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23595if test -n "$PKG_CONFIG"; then
23596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23597$as_echo "$PKG_CONFIG" >&6; }
23598else
23599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23600$as_echo "no" >&6; }
23601fi
23602
23603
23604fi
23605if test -z "$ac_cv_path_PKG_CONFIG"; then
23606  ac_pt_PKG_CONFIG=$PKG_CONFIG
23607  # Extract the first word of "pkg-config", so it can be a program name with args.
23608set dummy pkg-config; ac_word=$2
23609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23610$as_echo_n "checking for $ac_word... " >&6; }
23611if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23612  $as_echo_n "(cached) " >&6
23613else
23614  case $ac_pt_PKG_CONFIG in
23615  [\\/]* | ?:[\\/]*)
23616  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23617  ;;
23618  *)
23619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23620for as_dir in $PATH
23621do
23622  IFS=$as_save_IFS
23623  test -z "$as_dir" && as_dir=.
23624    for ac_exec_ext in '' $ac_executable_extensions; do
23625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23626    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23628    break 2
23629  fi
23630done
23631  done
23632IFS=$as_save_IFS
23633
23634  ;;
23635esac
23636fi
23637ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23638if test -n "$ac_pt_PKG_CONFIG"; then
23639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23640$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23641else
23642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23643$as_echo "no" >&6; }
23644fi
23645
23646  if test "x$ac_pt_PKG_CONFIG" = x; then
23647    PKG_CONFIG=""
23648  else
23649    case $cross_compiling:$ac_tool_warned in
23650yes:)
23651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23653ac_tool_warned=yes ;;
23654esac
23655    PKG_CONFIG=$ac_pt_PKG_CONFIG
23656  fi
23657else
23658  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23659fi
23660
23661fi
23662if test -n "$PKG_CONFIG"; then
23663	_pkg_min_version=0.9.0
23664	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23665$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23666	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23667		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23668$as_echo "yes" >&6; }
23669	else
23670		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23671$as_echo "no" >&6; }
23672		PKG_CONFIG=""
23673	fi
23674
23675fi
23676
23677# After basic tools have been setup, we can check build os specific details.
23678
23679  ###############################################################################
23680
23681  # Note that this is the build platform OS version!
23682
23683  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23684  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23685  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23686  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23687
23688
23689
23690
23691
23692# Misc basic settings
23693
23694
23695# Check whether --with-default-make-target was given.
23696if test "${with_default_make_target+set}" = set; then :
23697  withval=$with_default_make_target;
23698fi
23699
23700  if test "x$with_default_make_target" = "x" \
23701      || test "x$with_default_make_target" = "xyes"; then
23702    DEFAULT_MAKE_TARGET="exploded-image"
23703  elif test "x$with_default_make_target" = "xno"; then
23704    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23705  else
23706    DEFAULT_MAKE_TARGET="$with_default_make_target"
23707  fi
23708
23709
23710
23711
23712###############################################################################
23713#
23714# Determine OpenJDK variants, options and version numbers.
23715#
23716###############################################################################
23717
23718# We need build & target for this.
23719
23720  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23721  # We always build headless support.
23722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23723$as_echo_n "checking headful support... " >&6; }
23724  # Check whether --enable-headful was given.
23725if test "${enable_headful+set}" = set; then :
23726  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23727else
23728  SUPPORT_HEADFUL=yes
23729fi
23730
23731
23732  SUPPORT_HEADLESS=yes
23733  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23734
23735  if test "x$SUPPORT_HEADFUL" = xyes; then
23736    # We are building both headful and headless.
23737    headful_msg="include support for both headful and headless"
23738  fi
23739
23740  if test "x$SUPPORT_HEADFUL" = xno; then
23741    # Thus we are building headless only.
23742    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23743    headful_msg="headless only"
23744  fi
23745
23746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23747$as_echo "$headful_msg" >&6; }
23748
23749
23750
23751
23752
23753  # Choose cacerts source file
23754
23755# Check whether --with-cacerts-file was given.
23756if test "${with_cacerts_file+set}" = set; then :
23757  withval=$with_cacerts_file;
23758fi
23759
23760  if test "x$with_cacerts_file" != x; then
23761    CACERTS_FILE=$with_cacerts_file
23762  fi
23763
23764
23765  # Enable or disable unlimited crypto
23766  # Check whether --enable-unlimited-crypto was given.
23767if test "${enable_unlimited_crypto+set}" = set; then :
23768  enableval=$enable_unlimited_crypto;
23769else
23770  enable_unlimited_crypto=no
23771fi
23772
23773  if test "x$enable_unlimited_crypto" = "xyes"; then
23774    UNLIMITED_CRYPTO=true
23775  else
23776    UNLIMITED_CRYPTO=false
23777  fi
23778
23779
23780  # Should we build the serviceability agent (SA)?
23781  INCLUDE_SA=true
23782  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23783    INCLUDE_SA=false
23784  fi
23785  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23786    INCLUDE_SA=false
23787  fi
23788  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23789    INCLUDE_SA=false
23790  fi
23791
23792
23793  # Compress jars
23794  COMPRESS_JARS=false
23795
23796
23797
23798  # Setup default copyright year. Mostly overridden when building close to a new year.
23799
23800# Check whether --with-copyright-year was given.
23801if test "${with_copyright_year+set}" = set; then :
23802  withval=$with_copyright_year;
23803fi
23804
23805  if test "x$with_copyright_year" = xyes; then
23806    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23807  elif test "x$with_copyright_year" != x; then
23808    COPYRIGHT_YEAR="$with_copyright_year"
23809  else
23810    COPYRIGHT_YEAR=`date +'%Y'`
23811  fi
23812
23813
23814
23815  # Check whether --enable-keep-packaged-modules was given.
23816if test "${enable_keep_packaged_modules+set}" = set; then :
23817  enableval=$enable_keep_packaged_modules;
23818fi
23819
23820
23821  if test "x$enable_keep_packaged_modules" = "xyes"; then
23822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23823$as_echo_n "checking if packaged modules are kept... " >&6; }
23824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23825$as_echo "yes" >&6; }
23826    JLINK_KEEP_PACKAGED_MODULES=true
23827  elif test "x$enable_keep_packaged_modules" = "xno"; then
23828    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23829$as_echo_n "checking if packaged modules are kept... " >&6; }
23830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23831$as_echo "no" >&6; }
23832    JLINK_KEEP_PACKAGED_MODULES=false
23833  elif test "x$enable_keep_packaged_modules" = "x"; then
23834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23835$as_echo "yes (default)" >&6; }
23836    JLINK_KEEP_PACKAGED_MODULES=true
23837  else
23838    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23839  fi
23840
23841
23842
23843
23844  # Warn user that old version arguments are deprecated.
23845
23846
23847# Check whether --with-milestone was given.
23848if test "${with_milestone+set}" = set; then :
23849  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23850$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23851fi
23852
23853
23854
23855
23856# Check whether --with-update-version was given.
23857if test "${with_update_version+set}" = set; then :
23858  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23859$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23860fi
23861
23862
23863
23864
23865# Check whether --with-user-release-suffix was given.
23866if test "${with_user_release_suffix+set}" = set; then :
23867  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
23868$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23869fi
23870
23871
23872
23873
23874# Check whether --with-build-number was given.
23875if test "${with_build_number+set}" = set; then :
23876  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23877$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23878fi
23879
23880
23881
23882  # Source the version numbers file
23883  . $AUTOCONF_DIR/version-numbers
23884
23885  # Some non-version number information is set in that file
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895  # Override version from arguments
23896
23897  # If --with-version-string is set, process it first. It is possible to
23898  # override parts with more specific flags, since these are processed later.
23899
23900# Check whether --with-version-string was given.
23901if test "${with_version_string+set}" = set; then :
23902  withval=$with_version_string;
23903fi
23904
23905  if test "x$with_version_string" = xyes; then
23906    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23907  elif test "x$with_version_string" != x; then
23908    # Additional [] needed to keep m4 from mangling shell constructs.
23909    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23910      VERSION_MAJOR=${BASH_REMATCH[1]}
23911      VERSION_MINOR=${BASH_REMATCH[3]}
23912      VERSION_SECURITY=${BASH_REMATCH[5]}
23913      VERSION_PATCH=${BASH_REMATCH[7]}
23914      VERSION_PRE=${BASH_REMATCH[9]}
23915      version_plus_separator=${BASH_REMATCH[11]}
23916      VERSION_BUILD=${BASH_REMATCH[12]}
23917      VERSION_OPT=${BASH_REMATCH[14]}
23918      # Unspecified numerical fields are interpreted as 0.
23919      if test "x$VERSION_MINOR" = x; then
23920        VERSION_MINOR=0
23921      fi
23922      if test "x$VERSION_SECURITY" = x; then
23923        VERSION_SECURITY=0
23924      fi
23925      if test "x$VERSION_PATCH" = x; then
23926        VERSION_PATCH=0
23927      fi
23928      if test "x$version_plus_separator" != x \
23929          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23930        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23931      fi
23932      # Stop the version part process from setting default values.
23933      # We still allow them to explicitely override though.
23934      NO_DEFAULT_VERSION_PARTS=true
23935    else
23936      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23937    fi
23938  fi
23939
23940
23941# Check whether --with-version-pre was given.
23942if test "${with_version_pre+set}" = set; then :
23943  withval=$with_version_pre; with_version_pre_present=true
23944else
23945  with_version_pre_present=false
23946fi
23947
23948
23949  if test "x$with_version_pre_present" = xtrue; then
23950    if test "x$with_version_pre" = xyes; then
23951      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23952    elif test "x$with_version_pre" = xno; then
23953      # Interpret --without-* as empty string instead of the literal "no"
23954      VERSION_PRE=
23955    else
23956      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23957       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23958      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23960$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23961      fi
23962    fi
23963  else
23964    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23965      # Default is to use "internal" as pre
23966      VERSION_PRE="internal"
23967    fi
23968  fi
23969
23970
23971# Check whether --with-version-opt was given.
23972if test "${with_version_opt+set}" = set; then :
23973  withval=$with_version_opt; with_version_opt_present=true
23974else
23975  with_version_opt_present=false
23976fi
23977
23978
23979  if test "x$with_version_opt_present" = xtrue; then
23980    if test "x$with_version_opt" = xyes; then
23981      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23982    elif test "x$with_version_opt" = xno; then
23983      # Interpret --without-* as empty string instead of the literal "no"
23984      VERSION_OPT=
23985    else
23986      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23987       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23988      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23990$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23991      fi
23992    fi
23993  else
23994    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23995      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
23996      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
23997      # Outer [ ] to quote m4.
23998       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
23999      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24000    fi
24001  fi
24002
24003
24004# Check whether --with-version-build was given.
24005if test "${with_version_build+set}" = set; then :
24006  withval=$with_version_build; with_version_build_present=true
24007else
24008  with_version_build_present=false
24009fi
24010
24011
24012  if test "x$with_version_build_present" = xtrue; then
24013    if test "x$with_version_build" = xyes; then
24014      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24015    elif test "x$with_version_build" = xno; then
24016      # Interpret --without-* as empty string instead of the literal "no"
24017      VERSION_BUILD=
24018    elif test "x$with_version_build" = x; then
24019      VERSION_BUILD=
24020    else
24021
24022  # Additional [] needed to keep m4 from mangling shell constructs.
24023  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24024    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24025  fi
24026  # Extract the version number without leading zeros.
24027  cleaned_value=${BASH_REMATCH[1]}
24028  if test "x$cleaned_value" = x; then
24029    # Special case for zero
24030    cleaned_value=${BASH_REMATCH[2]}
24031  fi
24032
24033  if test $cleaned_value -gt 255; then
24034    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24035  fi
24036  if test "x$cleaned_value" != "x$with_version_build"; then
24037    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24038$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24039  fi
24040  VERSION_BUILD=$cleaned_value
24041
24042    fi
24043  else
24044    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24045      # Default is to not have a build number.
24046      VERSION_BUILD=""
24047      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24048      VERSION_BUILD=0
24049    fi
24050  fi
24051
24052
24053# Check whether --with-version-major was given.
24054if test "${with_version_major+set}" = set; then :
24055  withval=$with_version_major; with_version_major_present=true
24056else
24057  with_version_major_present=false
24058fi
24059
24060
24061  if test "x$with_version_major_present" = xtrue; then
24062    if test "x$with_version_major" = xyes; then
24063      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24064    else
24065
24066  # Additional [] needed to keep m4 from mangling shell constructs.
24067  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24068    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24069  fi
24070  # Extract the version number without leading zeros.
24071  cleaned_value=${BASH_REMATCH[1]}
24072  if test "x$cleaned_value" = x; then
24073    # Special case for zero
24074    cleaned_value=${BASH_REMATCH[2]}
24075  fi
24076
24077  if test $cleaned_value -gt 255; then
24078    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24079  fi
24080  if test "x$cleaned_value" != "x$with_version_major"; then
24081    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24082$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24083  fi
24084  VERSION_MAJOR=$cleaned_value
24085
24086    fi
24087  else
24088    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24089      # Default is to get value from version-numbers
24090      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24091    fi
24092  fi
24093
24094
24095# Check whether --with-version-minor was given.
24096if test "${with_version_minor+set}" = set; then :
24097  withval=$with_version_minor; with_version_minor_present=true
24098else
24099  with_version_minor_present=false
24100fi
24101
24102
24103  if test "x$with_version_minor_present" = xtrue; then
24104    if test "x$with_version_minor" = xyes; then
24105      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24106    elif test "x$with_version_minor" = xno; then
24107      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24108      VERSION_MINOR=0
24109    elif test "x$with_version_minor" = x; then
24110      VERSION_MINOR=0
24111    else
24112
24113  # Additional [] needed to keep m4 from mangling shell constructs.
24114  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24115    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24116  fi
24117  # Extract the version number without leading zeros.
24118  cleaned_value=${BASH_REMATCH[1]}
24119  if test "x$cleaned_value" = x; then
24120    # Special case for zero
24121    cleaned_value=${BASH_REMATCH[2]}
24122  fi
24123
24124  if test $cleaned_value -gt 255; then
24125    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24126  fi
24127  if test "x$cleaned_value" != "x$with_version_minor"; then
24128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24129$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24130  fi
24131  VERSION_MINOR=$cleaned_value
24132
24133    fi
24134  else
24135    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24136      # Default is 0, if unspecified
24137      VERSION_MINOR=0
24138    fi
24139  fi
24140
24141
24142# Check whether --with-version-security was given.
24143if test "${with_version_security+set}" = set; then :
24144  withval=$with_version_security; with_version_security_present=true
24145else
24146  with_version_security_present=false
24147fi
24148
24149
24150  if test "x$with_version_security_present" = xtrue; then
24151    if test "x$with_version_security" = xyes; then
24152      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24153    elif test "x$with_version_security" = xno; then
24154      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24155      VERSION_SECURITY=0
24156    elif test "x$with_version_security" = x; then
24157      VERSION_SECURITY=0
24158    else
24159
24160  # Additional [] needed to keep m4 from mangling shell constructs.
24161  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24162    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24163  fi
24164  # Extract the version number without leading zeros.
24165  cleaned_value=${BASH_REMATCH[1]}
24166  if test "x$cleaned_value" = x; then
24167    # Special case for zero
24168    cleaned_value=${BASH_REMATCH[2]}
24169  fi
24170
24171  if test $cleaned_value -gt 255; then
24172    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24173  fi
24174  if test "x$cleaned_value" != "x$with_version_security"; then
24175    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24176$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24177  fi
24178  VERSION_SECURITY=$cleaned_value
24179
24180    fi
24181  else
24182    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24183      # Default is 0, if unspecified
24184      VERSION_SECURITY=0
24185    fi
24186  fi
24187
24188
24189# Check whether --with-version-patch was given.
24190if test "${with_version_patch+set}" = set; then :
24191  withval=$with_version_patch; with_version_patch_present=true
24192else
24193  with_version_patch_present=false
24194fi
24195
24196
24197  if test "x$with_version_patch_present" = xtrue; then
24198    if test "x$with_version_patch" = xyes; then
24199      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24200    elif test "x$with_version_patch" = xno; then
24201      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24202      VERSION_PATCH=0
24203    elif test "x$with_version_patch" = x; then
24204      VERSION_PATCH=0
24205    else
24206
24207  # Additional [] needed to keep m4 from mangling shell constructs.
24208  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24209    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24210  fi
24211  # Extract the version number without leading zeros.
24212  cleaned_value=${BASH_REMATCH[1]}
24213  if test "x$cleaned_value" = x; then
24214    # Special case for zero
24215    cleaned_value=${BASH_REMATCH[2]}
24216  fi
24217
24218  if test $cleaned_value -gt 255; then
24219    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24220  fi
24221  if test "x$cleaned_value" != "x$with_version_patch"; then
24222    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24223$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24224  fi
24225  VERSION_PATCH=$cleaned_value
24226
24227    fi
24228  else
24229    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24230      # Default is 0, if unspecified
24231      VERSION_PATCH=0
24232    fi
24233  fi
24234
24235  # Calculate derived version properties
24236
24237  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24238  if test "x$VERSION_PRE" = x; then
24239    VERSION_IS_GA=true
24240  else
24241    VERSION_IS_GA=false
24242  fi
24243
24244  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24245  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24246
24247  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24248  # Strip trailing zeroes from stripped_version_number
24249  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24250  VERSION_NUMBER=$stripped_version_number
24251
24252  # The complete version string, with additional build information
24253  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24254    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24255  else
24256    # If either build or opt is set, we need a + separator
24257    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24258  fi
24259
24260  # The short version string, just VERSION_NUMBER and PRE, if present.
24261  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24262
24263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24264$as_echo_n "checking for version string... " >&6; }
24265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24266$as_echo "$VERSION_STRING" >&6; }
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282###############################################################################
24283#
24284# Setup BootJDK, used to bootstrap the build.
24285#
24286###############################################################################
24287
24288
24289  BOOT_JDK_FOUND=no
24290
24291# Check whether --with-boot-jdk was given.
24292if test "${with_boot_jdk+set}" = set; then :
24293  withval=$with_boot_jdk;
24294fi
24295
24296
24297  # We look for the Boot JDK through various means, going from more certain to
24298  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24299  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24300  # must check if this is indeed valid; otherwise we'll continue looking.
24301
24302  # Test: Is bootjdk explicitely set by command line arguments?
24303
24304  if test "x$BOOT_JDK_FOUND" = xno; then
24305    # Now execute the test
24306
24307  if test "x$with_boot_jdk" != x; then
24308    BOOT_JDK=$with_boot_jdk
24309    BOOT_JDK_FOUND=maybe
24310    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24311$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24312  fi
24313
24314
24315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24317      # Do we have a bin/java?
24318      if test ! -x "$BOOT_JDK/bin/java"; then
24319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24321        BOOT_JDK_FOUND=no
24322      else
24323        # Do we have a bin/javac?
24324        if test ! -x "$BOOT_JDK/bin/javac"; then
24325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24329          BOOT_JDK_FOUND=no
24330        else
24331          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24332          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24333
24334          # Extra M4 quote needed to protect [] in grep expression.
24335          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24336          if test "x$FOUND_CORRECT_VERSION" = x; then
24337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24339            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24340$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24341            BOOT_JDK_FOUND=no
24342          else
24343            # We're done! :-)
24344            BOOT_JDK_FOUND=yes
24345
24346  # Only process if variable expands to non-empty
24347
24348  if test "x$BOOT_JDK" != x; then
24349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24350
24351  # Input might be given as Windows format, start by converting to
24352  # unix format.
24353  path="$BOOT_JDK"
24354  new_path=`$CYGPATH -u "$path"`
24355
24356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24359  # "foo.exe" is OK but "foo" is an error.
24360  #
24361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24362  # It is also a way to make sure we got the proper file name for the real test later on.
24363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24364  if test "x$test_shortpath" = x; then
24365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24367    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24368  fi
24369
24370  # Call helper function which possibly converts this using DOS-style short mode.
24371  # If so, the updated path is stored in $new_path.
24372
24373  input_path="$new_path"
24374  # Check if we need to convert this using DOS-style short mode. If the path
24375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24376  # take no chances and rewrite it.
24377  # Note: m4 eats our [], so we need to use [ and ] instead.
24378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24379  if test "x$has_forbidden_chars" != x; then
24380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24384      # Going to short mode and back again did indeed matter. Since short mode is
24385      # case insensitive, let's make it lowercase to improve readability.
24386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24387      # Now convert it back to Unix-style (cygpath)
24388      input_path=`$CYGPATH -u "$shortmode_path"`
24389      new_path="$input_path"
24390    fi
24391  fi
24392
24393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24394  if test "x$test_cygdrive_prefix" = x; then
24395    # As a simple fix, exclude /usr/bin since it's not a real path.
24396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24398      # a path prefixed by /cygdrive for fixpath to work.
24399      new_path="$CYGWIN_ROOT_PATH$input_path"
24400    fi
24401  fi
24402
24403
24404  if test "x$path" != "x$new_path"; then
24405    BOOT_JDK="$new_path"
24406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24407$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24408  fi
24409
24410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24411
24412  path="$BOOT_JDK"
24413  has_colon=`$ECHO $path | $GREP ^.:`
24414  new_path="$path"
24415  if test "x$has_colon" = x; then
24416    # Not in mixed or Windows style, start by that.
24417    new_path=`cmd //c echo $path`
24418  fi
24419
24420
24421  input_path="$new_path"
24422  # Check if we need to convert this using DOS-style short mode. If the path
24423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24424  # take no chances and rewrite it.
24425  # Note: m4 eats our [], so we need to use [ and ] instead.
24426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24427  if test "x$has_forbidden_chars" != x; then
24428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24430  fi
24431
24432
24433  windows_path="$new_path"
24434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24435    unix_path=`$CYGPATH -u "$windows_path"`
24436    new_path="$unix_path"
24437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24439    new_path="$unix_path"
24440  fi
24441
24442  if test "x$path" != "x$new_path"; then
24443    BOOT_JDK="$new_path"
24444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24445$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24446  fi
24447
24448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24450
24451    else
24452      # We're on a unix platform. Hooray! :)
24453      path="$BOOT_JDK"
24454      has_space=`$ECHO "$path" | $GREP " "`
24455      if test "x$has_space" != x; then
24456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24457$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24459      fi
24460
24461      # Use eval to expand a potential ~
24462      eval path="$path"
24463      if test ! -f "$path" && test ! -d "$path"; then
24464        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24465      fi
24466
24467      if test -d "$path"; then
24468        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24469      else
24470        dir="`$DIRNAME "$path"`"
24471        base="`$BASENAME "$path"`"
24472        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24473      fi
24474    fi
24475  fi
24476
24477            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24478$as_echo_n "checking for Boot JDK... " >&6; }
24479            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24480$as_echo "$BOOT_JDK" >&6; }
24481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24482$as_echo_n "checking Boot JDK version... " >&6; }
24483            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24485$as_echo "$BOOT_JDK_VERSION" >&6; }
24486          fi # end check jdk version
24487        fi # end check javac
24488      fi # end check java
24489    fi # end check boot jdk found
24490  fi
24491
24492  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24493    # Having specified an argument which is incorrect will produce an instant failure;
24494    # we should not go on looking
24495    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24496  fi
24497
24498  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24499
24500  if test "x$BOOT_JDK_FOUND" = xno; then
24501    # Now execute the test
24502
24503  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24504    # First check at user selected default
24505
24506  if test "x$BOOT_JDK_FOUND" = xno; then
24507    # Now execute the test
24508
24509  if test -x /usr/libexec/java_home; then
24510    BOOT_JDK=`/usr/libexec/java_home `
24511    BOOT_JDK_FOUND=maybe
24512    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24513$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24514  fi
24515
24516
24517    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24518    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24519      # Do we have a bin/java?
24520      if test ! -x "$BOOT_JDK/bin/java"; then
24521        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24522$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24523        BOOT_JDK_FOUND=no
24524      else
24525        # Do we have a bin/javac?
24526        if test ! -x "$BOOT_JDK/bin/javac"; then
24527          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24528$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24529          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24530$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24531          BOOT_JDK_FOUND=no
24532        else
24533          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24534          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24535
24536          # Extra M4 quote needed to protect [] in grep expression.
24537          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24538          if test "x$FOUND_CORRECT_VERSION" = x; then
24539            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24540$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24541            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24542$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24543            BOOT_JDK_FOUND=no
24544          else
24545            # We're done! :-)
24546            BOOT_JDK_FOUND=yes
24547
24548  # Only process if variable expands to non-empty
24549
24550  if test "x$BOOT_JDK" != x; then
24551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24552
24553  # Input might be given as Windows format, start by converting to
24554  # unix format.
24555  path="$BOOT_JDK"
24556  new_path=`$CYGPATH -u "$path"`
24557
24558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24561  # "foo.exe" is OK but "foo" is an error.
24562  #
24563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24564  # It is also a way to make sure we got the proper file name for the real test later on.
24565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24566  if test "x$test_shortpath" = x; then
24567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24568$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24569    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24570  fi
24571
24572  # Call helper function which possibly converts this using DOS-style short mode.
24573  # If so, the updated path is stored in $new_path.
24574
24575  input_path="$new_path"
24576  # Check if we need to convert this using DOS-style short mode. If the path
24577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24578  # take no chances and rewrite it.
24579  # Note: m4 eats our [], so we need to use [ and ] instead.
24580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24581  if test "x$has_forbidden_chars" != x; then
24582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24586      # Going to short mode and back again did indeed matter. Since short mode is
24587      # case insensitive, let's make it lowercase to improve readability.
24588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24589      # Now convert it back to Unix-style (cygpath)
24590      input_path=`$CYGPATH -u "$shortmode_path"`
24591      new_path="$input_path"
24592    fi
24593  fi
24594
24595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24596  if test "x$test_cygdrive_prefix" = x; then
24597    # As a simple fix, exclude /usr/bin since it's not a real path.
24598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24600      # a path prefixed by /cygdrive for fixpath to work.
24601      new_path="$CYGWIN_ROOT_PATH$input_path"
24602    fi
24603  fi
24604
24605
24606  if test "x$path" != "x$new_path"; then
24607    BOOT_JDK="$new_path"
24608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24609$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24610  fi
24611
24612    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24613
24614  path="$BOOT_JDK"
24615  has_colon=`$ECHO $path | $GREP ^.:`
24616  new_path="$path"
24617  if test "x$has_colon" = x; then
24618    # Not in mixed or Windows style, start by that.
24619    new_path=`cmd //c echo $path`
24620  fi
24621
24622
24623  input_path="$new_path"
24624  # Check if we need to convert this using DOS-style short mode. If the path
24625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24626  # take no chances and rewrite it.
24627  # Note: m4 eats our [], so we need to use [ and ] instead.
24628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24629  if test "x$has_forbidden_chars" != x; then
24630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24632  fi
24633
24634
24635  windows_path="$new_path"
24636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24637    unix_path=`$CYGPATH -u "$windows_path"`
24638    new_path="$unix_path"
24639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24641    new_path="$unix_path"
24642  fi
24643
24644  if test "x$path" != "x$new_path"; then
24645    BOOT_JDK="$new_path"
24646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24647$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24648  fi
24649
24650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24652
24653    else
24654      # We're on a unix platform. Hooray! :)
24655      path="$BOOT_JDK"
24656      has_space=`$ECHO "$path" | $GREP " "`
24657      if test "x$has_space" != x; then
24658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24659$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24660        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24661      fi
24662
24663      # Use eval to expand a potential ~
24664      eval path="$path"
24665      if test ! -f "$path" && test ! -d "$path"; then
24666        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24667      fi
24668
24669      if test -d "$path"; then
24670        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24671      else
24672        dir="`$DIRNAME "$path"`"
24673        base="`$BASENAME "$path"`"
24674        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24675      fi
24676    fi
24677  fi
24678
24679            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24680$as_echo_n "checking for Boot JDK... " >&6; }
24681            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24682$as_echo "$BOOT_JDK" >&6; }
24683            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24684$as_echo_n "checking Boot JDK version... " >&6; }
24685            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24687$as_echo "$BOOT_JDK_VERSION" >&6; }
24688          fi # end check jdk version
24689        fi # end check javac
24690      fi # end check java
24691    fi # end check boot jdk found
24692  fi
24693
24694    # If that did not work out (e.g. too old), try explicit versions instead
24695
24696  if test "x$BOOT_JDK_FOUND" = xno; then
24697    # Now execute the test
24698
24699  if test -x /usr/libexec/java_home; then
24700    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24701    BOOT_JDK_FOUND=maybe
24702    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24703$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24704  fi
24705
24706
24707    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24708    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24709      # Do we have a bin/java?
24710      if test ! -x "$BOOT_JDK/bin/java"; then
24711        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24712$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24713        BOOT_JDK_FOUND=no
24714      else
24715        # Do we have a bin/javac?
24716        if test ! -x "$BOOT_JDK/bin/javac"; then
24717          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24719          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24720$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24721          BOOT_JDK_FOUND=no
24722        else
24723          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24724          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24725
24726          # Extra M4 quote needed to protect [] in grep expression.
24727          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24728          if test "x$FOUND_CORRECT_VERSION" = x; then
24729            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24731            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24732$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24733            BOOT_JDK_FOUND=no
24734          else
24735            # We're done! :-)
24736            BOOT_JDK_FOUND=yes
24737
24738  # Only process if variable expands to non-empty
24739
24740  if test "x$BOOT_JDK" != x; then
24741    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24742
24743  # Input might be given as Windows format, start by converting to
24744  # unix format.
24745  path="$BOOT_JDK"
24746  new_path=`$CYGPATH -u "$path"`
24747
24748  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24749  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24750  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24751  # "foo.exe" is OK but "foo" is an error.
24752  #
24753  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24754  # It is also a way to make sure we got the proper file name for the real test later on.
24755  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24756  if test "x$test_shortpath" = x; then
24757    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24758$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24759    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24760  fi
24761
24762  # Call helper function which possibly converts this using DOS-style short mode.
24763  # If so, the updated path is stored in $new_path.
24764
24765  input_path="$new_path"
24766  # Check if we need to convert this using DOS-style short mode. If the path
24767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24768  # take no chances and rewrite it.
24769  # Note: m4 eats our [], so we need to use [ and ] instead.
24770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24771  if test "x$has_forbidden_chars" != x; then
24772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24776      # Going to short mode and back again did indeed matter. Since short mode is
24777      # case insensitive, let's make it lowercase to improve readability.
24778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24779      # Now convert it back to Unix-style (cygpath)
24780      input_path=`$CYGPATH -u "$shortmode_path"`
24781      new_path="$input_path"
24782    fi
24783  fi
24784
24785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24786  if test "x$test_cygdrive_prefix" = x; then
24787    # As a simple fix, exclude /usr/bin since it's not a real path.
24788    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24790      # a path prefixed by /cygdrive for fixpath to work.
24791      new_path="$CYGWIN_ROOT_PATH$input_path"
24792    fi
24793  fi
24794
24795
24796  if test "x$path" != "x$new_path"; then
24797    BOOT_JDK="$new_path"
24798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24799$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24800  fi
24801
24802    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24803
24804  path="$BOOT_JDK"
24805  has_colon=`$ECHO $path | $GREP ^.:`
24806  new_path="$path"
24807  if test "x$has_colon" = x; then
24808    # Not in mixed or Windows style, start by that.
24809    new_path=`cmd //c echo $path`
24810  fi
24811
24812
24813  input_path="$new_path"
24814  # Check if we need to convert this using DOS-style short mode. If the path
24815  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24816  # take no chances and rewrite it.
24817  # Note: m4 eats our [], so we need to use [ and ] instead.
24818  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24819  if test "x$has_forbidden_chars" != x; then
24820    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24821    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24822  fi
24823
24824
24825  windows_path="$new_path"
24826  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24827    unix_path=`$CYGPATH -u "$windows_path"`
24828    new_path="$unix_path"
24829  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24830    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24831    new_path="$unix_path"
24832  fi
24833
24834  if test "x$path" != "x$new_path"; then
24835    BOOT_JDK="$new_path"
24836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24838  fi
24839
24840  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24841  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24842
24843    else
24844      # We're on a unix platform. Hooray! :)
24845      path="$BOOT_JDK"
24846      has_space=`$ECHO "$path" | $GREP " "`
24847      if test "x$has_space" != x; then
24848        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24849$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24850        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24851      fi
24852
24853      # Use eval to expand a potential ~
24854      eval path="$path"
24855      if test ! -f "$path" && test ! -d "$path"; then
24856        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24857      fi
24858
24859      if test -d "$path"; then
24860        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24861      else
24862        dir="`$DIRNAME "$path"`"
24863        base="`$BASENAME "$path"`"
24864        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24865      fi
24866    fi
24867  fi
24868
24869            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24870$as_echo_n "checking for Boot JDK... " >&6; }
24871            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24872$as_echo "$BOOT_JDK" >&6; }
24873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24874$as_echo_n "checking Boot JDK version... " >&6; }
24875            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24877$as_echo "$BOOT_JDK_VERSION" >&6; }
24878          fi # end check jdk version
24879        fi # end check javac
24880      fi # end check java
24881    fi # end check boot jdk found
24882  fi
24883
24884
24885  if test "x$BOOT_JDK_FOUND" = xno; then
24886    # Now execute the test
24887
24888  if test -x /usr/libexec/java_home; then
24889    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24890    BOOT_JDK_FOUND=maybe
24891    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24892$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24893  fi
24894
24895
24896    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24897    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24898      # Do we have a bin/java?
24899      if test ! -x "$BOOT_JDK/bin/java"; then
24900        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24902        BOOT_JDK_FOUND=no
24903      else
24904        # Do we have a bin/javac?
24905        if test ! -x "$BOOT_JDK/bin/javac"; then
24906          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24907$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24908          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24909$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24910          BOOT_JDK_FOUND=no
24911        else
24912          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24913          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24914
24915          # Extra M4 quote needed to protect [] in grep expression.
24916          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24917          if test "x$FOUND_CORRECT_VERSION" = x; then
24918            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24919$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24920            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24921$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24922            BOOT_JDK_FOUND=no
24923          else
24924            # We're done! :-)
24925            BOOT_JDK_FOUND=yes
24926
24927  # Only process if variable expands to non-empty
24928
24929  if test "x$BOOT_JDK" != x; then
24930    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931
24932  # Input might be given as Windows format, start by converting to
24933  # unix format.
24934  path="$BOOT_JDK"
24935  new_path=`$CYGPATH -u "$path"`
24936
24937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24940  # "foo.exe" is OK but "foo" is an error.
24941  #
24942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24943  # It is also a way to make sure we got the proper file name for the real test later on.
24944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24945  if test "x$test_shortpath" = x; then
24946    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24947$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24948    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24949  fi
24950
24951  # Call helper function which possibly converts this using DOS-style short mode.
24952  # If so, the updated path is stored in $new_path.
24953
24954  input_path="$new_path"
24955  # Check if we need to convert this using DOS-style short mode. If the path
24956  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24957  # take no chances and rewrite it.
24958  # Note: m4 eats our [], so we need to use [ and ] instead.
24959  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24960  if test "x$has_forbidden_chars" != x; then
24961    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24962    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24963    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24964    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24965      # Going to short mode and back again did indeed matter. Since short mode is
24966      # case insensitive, let's make it lowercase to improve readability.
24967      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24968      # Now convert it back to Unix-style (cygpath)
24969      input_path=`$CYGPATH -u "$shortmode_path"`
24970      new_path="$input_path"
24971    fi
24972  fi
24973
24974  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24975  if test "x$test_cygdrive_prefix" = x; then
24976    # As a simple fix, exclude /usr/bin since it's not a real path.
24977    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24978      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24979      # a path prefixed by /cygdrive for fixpath to work.
24980      new_path="$CYGWIN_ROOT_PATH$input_path"
24981    fi
24982  fi
24983
24984
24985  if test "x$path" != "x$new_path"; then
24986    BOOT_JDK="$new_path"
24987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24989  fi
24990
24991    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24992
24993  path="$BOOT_JDK"
24994  has_colon=`$ECHO $path | $GREP ^.:`
24995  new_path="$path"
24996  if test "x$has_colon" = x; then
24997    # Not in mixed or Windows style, start by that.
24998    new_path=`cmd //c echo $path`
24999  fi
25000
25001
25002  input_path="$new_path"
25003  # Check if we need to convert this using DOS-style short mode. If the path
25004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25005  # take no chances and rewrite it.
25006  # Note: m4 eats our [], so we need to use [ and ] instead.
25007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25008  if test "x$has_forbidden_chars" != x; then
25009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25011  fi
25012
25013
25014  windows_path="$new_path"
25015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25016    unix_path=`$CYGPATH -u "$windows_path"`
25017    new_path="$unix_path"
25018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25020    new_path="$unix_path"
25021  fi
25022
25023  if test "x$path" != "x$new_path"; then
25024    BOOT_JDK="$new_path"
25025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25026$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25027  fi
25028
25029  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25030  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25031
25032    else
25033      # We're on a unix platform. Hooray! :)
25034      path="$BOOT_JDK"
25035      has_space=`$ECHO "$path" | $GREP " "`
25036      if test "x$has_space" != x; then
25037        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25038$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25039        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25040      fi
25041
25042      # Use eval to expand a potential ~
25043      eval path="$path"
25044      if test ! -f "$path" && test ! -d "$path"; then
25045        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25046      fi
25047
25048      if test -d "$path"; then
25049        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25050      else
25051        dir="`$DIRNAME "$path"`"
25052        base="`$BASENAME "$path"`"
25053        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25054      fi
25055    fi
25056  fi
25057
25058            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25059$as_echo_n "checking for Boot JDK... " >&6; }
25060            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25061$as_echo "$BOOT_JDK" >&6; }
25062            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25063$as_echo_n "checking Boot JDK version... " >&6; }
25064            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25066$as_echo "$BOOT_JDK_VERSION" >&6; }
25067          fi # end check jdk version
25068        fi # end check javac
25069      fi # end check java
25070    fi # end check boot jdk found
25071  fi
25072
25073
25074  if test "x$BOOT_JDK_FOUND" = xno; then
25075    # Now execute the test
25076
25077  if test -x /usr/libexec/java_home; then
25078    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25079    BOOT_JDK_FOUND=maybe
25080    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25081$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25082  fi
25083
25084
25085    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25086    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25087      # Do we have a bin/java?
25088      if test ! -x "$BOOT_JDK/bin/java"; then
25089        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25091        BOOT_JDK_FOUND=no
25092      else
25093        # Do we have a bin/javac?
25094        if test ! -x "$BOOT_JDK/bin/javac"; then
25095          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25097          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25098$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25099          BOOT_JDK_FOUND=no
25100        else
25101          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25102          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25103
25104          # Extra M4 quote needed to protect [] in grep expression.
25105          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25106          if test "x$FOUND_CORRECT_VERSION" = x; then
25107            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25109            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25110$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25111            BOOT_JDK_FOUND=no
25112          else
25113            # We're done! :-)
25114            BOOT_JDK_FOUND=yes
25115
25116  # Only process if variable expands to non-empty
25117
25118  if test "x$BOOT_JDK" != x; then
25119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25120
25121  # Input might be given as Windows format, start by converting to
25122  # unix format.
25123  path="$BOOT_JDK"
25124  new_path=`$CYGPATH -u "$path"`
25125
25126  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25127  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25128  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25129  # "foo.exe" is OK but "foo" is an error.
25130  #
25131  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25132  # It is also a way to make sure we got the proper file name for the real test later on.
25133  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25134  if test "x$test_shortpath" = x; then
25135    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25136$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25137    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25138  fi
25139
25140  # Call helper function which possibly converts this using DOS-style short mode.
25141  # If so, the updated path is stored in $new_path.
25142
25143  input_path="$new_path"
25144  # Check if we need to convert this using DOS-style short mode. If the path
25145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25146  # take no chances and rewrite it.
25147  # Note: m4 eats our [], so we need to use [ and ] instead.
25148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25149  if test "x$has_forbidden_chars" != x; then
25150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25154      # Going to short mode and back again did indeed matter. Since short mode is
25155      # case insensitive, let's make it lowercase to improve readability.
25156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25157      # Now convert it back to Unix-style (cygpath)
25158      input_path=`$CYGPATH -u "$shortmode_path"`
25159      new_path="$input_path"
25160    fi
25161  fi
25162
25163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25164  if test "x$test_cygdrive_prefix" = x; then
25165    # As a simple fix, exclude /usr/bin since it's not a real path.
25166    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25168      # a path prefixed by /cygdrive for fixpath to work.
25169      new_path="$CYGWIN_ROOT_PATH$input_path"
25170    fi
25171  fi
25172
25173
25174  if test "x$path" != "x$new_path"; then
25175    BOOT_JDK="$new_path"
25176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25177$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25178  fi
25179
25180    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25181
25182  path="$BOOT_JDK"
25183  has_colon=`$ECHO $path | $GREP ^.:`
25184  new_path="$path"
25185  if test "x$has_colon" = x; then
25186    # Not in mixed or Windows style, start by that.
25187    new_path=`cmd //c echo $path`
25188  fi
25189
25190
25191  input_path="$new_path"
25192  # Check if we need to convert this using DOS-style short mode. If the path
25193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25194  # take no chances and rewrite it.
25195  # Note: m4 eats our [], so we need to use [ and ] instead.
25196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25197  if test "x$has_forbidden_chars" != x; then
25198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25199    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25200  fi
25201
25202
25203  windows_path="$new_path"
25204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25205    unix_path=`$CYGPATH -u "$windows_path"`
25206    new_path="$unix_path"
25207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25209    new_path="$unix_path"
25210  fi
25211
25212  if test "x$path" != "x$new_path"; then
25213    BOOT_JDK="$new_path"
25214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25215$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25216  fi
25217
25218  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25219  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25220
25221    else
25222      # We're on a unix platform. Hooray! :)
25223      path="$BOOT_JDK"
25224      has_space=`$ECHO "$path" | $GREP " "`
25225      if test "x$has_space" != x; then
25226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25227$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25228        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25229      fi
25230
25231      # Use eval to expand a potential ~
25232      eval path="$path"
25233      if test ! -f "$path" && test ! -d "$path"; then
25234        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25235      fi
25236
25237      if test -d "$path"; then
25238        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25239      else
25240        dir="`$DIRNAME "$path"`"
25241        base="`$BASENAME "$path"`"
25242        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25243      fi
25244    fi
25245  fi
25246
25247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25248$as_echo_n "checking for Boot JDK... " >&6; }
25249            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25250$as_echo "$BOOT_JDK" >&6; }
25251            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25252$as_echo_n "checking Boot JDK version... " >&6; }
25253            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25255$as_echo "$BOOT_JDK_VERSION" >&6; }
25256          fi # end check jdk version
25257        fi # end check javac
25258      fi # end check java
25259    fi # end check boot jdk found
25260  fi
25261
25262  fi
25263
25264
25265    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25266    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25267      # Do we have a bin/java?
25268      if test ! -x "$BOOT_JDK/bin/java"; then
25269        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25271        BOOT_JDK_FOUND=no
25272      else
25273        # Do we have a bin/javac?
25274        if test ! -x "$BOOT_JDK/bin/javac"; then
25275          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25277          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25278$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25279          BOOT_JDK_FOUND=no
25280        else
25281          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25282          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25283
25284          # Extra M4 quote needed to protect [] in grep expression.
25285          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25286          if test "x$FOUND_CORRECT_VERSION" = x; then
25287            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25289            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25290$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25291            BOOT_JDK_FOUND=no
25292          else
25293            # We're done! :-)
25294            BOOT_JDK_FOUND=yes
25295
25296  # Only process if variable expands to non-empty
25297
25298  if test "x$BOOT_JDK" != x; then
25299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25300
25301  # Input might be given as Windows format, start by converting to
25302  # unix format.
25303  path="$BOOT_JDK"
25304  new_path=`$CYGPATH -u "$path"`
25305
25306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25309  # "foo.exe" is OK but "foo" is an error.
25310  #
25311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25312  # It is also a way to make sure we got the proper file name for the real test later on.
25313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25314  if test "x$test_shortpath" = x; then
25315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25316$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25317    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25318  fi
25319
25320  # Call helper function which possibly converts this using DOS-style short mode.
25321  # If so, the updated path is stored in $new_path.
25322
25323  input_path="$new_path"
25324  # Check if we need to convert this using DOS-style short mode. If the path
25325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25326  # take no chances and rewrite it.
25327  # Note: m4 eats our [], so we need to use [ and ] instead.
25328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25329  if test "x$has_forbidden_chars" != x; then
25330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25334      # Going to short mode and back again did indeed matter. Since short mode is
25335      # case insensitive, let's make it lowercase to improve readability.
25336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25337      # Now convert it back to Unix-style (cygpath)
25338      input_path=`$CYGPATH -u "$shortmode_path"`
25339      new_path="$input_path"
25340    fi
25341  fi
25342
25343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25344  if test "x$test_cygdrive_prefix" = x; then
25345    # As a simple fix, exclude /usr/bin since it's not a real path.
25346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25348      # a path prefixed by /cygdrive for fixpath to work.
25349      new_path="$CYGWIN_ROOT_PATH$input_path"
25350    fi
25351  fi
25352
25353
25354  if test "x$path" != "x$new_path"; then
25355    BOOT_JDK="$new_path"
25356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25358  fi
25359
25360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25361
25362  path="$BOOT_JDK"
25363  has_colon=`$ECHO $path | $GREP ^.:`
25364  new_path="$path"
25365  if test "x$has_colon" = x; then
25366    # Not in mixed or Windows style, start by that.
25367    new_path=`cmd //c echo $path`
25368  fi
25369
25370
25371  input_path="$new_path"
25372  # Check if we need to convert this using DOS-style short mode. If the path
25373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25374  # take no chances and rewrite it.
25375  # Note: m4 eats our [], so we need to use [ and ] instead.
25376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25377  if test "x$has_forbidden_chars" != x; then
25378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25380  fi
25381
25382
25383  windows_path="$new_path"
25384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25385    unix_path=`$CYGPATH -u "$windows_path"`
25386    new_path="$unix_path"
25387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25389    new_path="$unix_path"
25390  fi
25391
25392  if test "x$path" != "x$new_path"; then
25393    BOOT_JDK="$new_path"
25394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25396  fi
25397
25398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25400
25401    else
25402      # We're on a unix platform. Hooray! :)
25403      path="$BOOT_JDK"
25404      has_space=`$ECHO "$path" | $GREP " "`
25405      if test "x$has_space" != x; then
25406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25407$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25409      fi
25410
25411      # Use eval to expand a potential ~
25412      eval path="$path"
25413      if test ! -f "$path" && test ! -d "$path"; then
25414        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25415      fi
25416
25417      if test -d "$path"; then
25418        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25419      else
25420        dir="`$DIRNAME "$path"`"
25421        base="`$BASENAME "$path"`"
25422        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25423      fi
25424    fi
25425  fi
25426
25427            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25428$as_echo_n "checking for Boot JDK... " >&6; }
25429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25430$as_echo "$BOOT_JDK" >&6; }
25431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25432$as_echo_n "checking Boot JDK version... " >&6; }
25433            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25435$as_echo "$BOOT_JDK_VERSION" >&6; }
25436          fi # end check jdk version
25437        fi # end check javac
25438      fi # end check java
25439    fi # end check boot jdk found
25440  fi
25441
25442
25443  # Test: Is $JAVA_HOME set?
25444
25445  if test "x$BOOT_JDK_FOUND" = xno; then
25446    # Now execute the test
25447
25448  if test "x$JAVA_HOME" != x; then
25449    JAVA_HOME_PROCESSED="$JAVA_HOME"
25450
25451  # Only process if variable expands to non-empty
25452
25453  if test "x$JAVA_HOME_PROCESSED" != x; then
25454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25455
25456  # Input might be given as Windows format, start by converting to
25457  # unix format.
25458  path="$JAVA_HOME_PROCESSED"
25459  new_path=`$CYGPATH -u "$path"`
25460
25461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25464  # "foo.exe" is OK but "foo" is an error.
25465  #
25466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25467  # It is also a way to make sure we got the proper file name for the real test later on.
25468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25469  if test "x$test_shortpath" = x; then
25470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25471$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25472    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25473  fi
25474
25475  # Call helper function which possibly converts this using DOS-style short mode.
25476  # If so, the updated path is stored in $new_path.
25477
25478  input_path="$new_path"
25479  # Check if we need to convert this using DOS-style short mode. If the path
25480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25481  # take no chances and rewrite it.
25482  # Note: m4 eats our [], so we need to use [ and ] instead.
25483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25484  if test "x$has_forbidden_chars" != x; then
25485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25489      # Going to short mode and back again did indeed matter. Since short mode is
25490      # case insensitive, let's make it lowercase to improve readability.
25491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25492      # Now convert it back to Unix-style (cygpath)
25493      input_path=`$CYGPATH -u "$shortmode_path"`
25494      new_path="$input_path"
25495    fi
25496  fi
25497
25498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25499  if test "x$test_cygdrive_prefix" = x; then
25500    # As a simple fix, exclude /usr/bin since it's not a real path.
25501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25503      # a path prefixed by /cygdrive for fixpath to work.
25504      new_path="$CYGWIN_ROOT_PATH$input_path"
25505    fi
25506  fi
25507
25508
25509  if test "x$path" != "x$new_path"; then
25510    JAVA_HOME_PROCESSED="$new_path"
25511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25512$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25513  fi
25514
25515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25516
25517  path="$JAVA_HOME_PROCESSED"
25518  has_colon=`$ECHO $path | $GREP ^.:`
25519  new_path="$path"
25520  if test "x$has_colon" = x; then
25521    # Not in mixed or Windows style, start by that.
25522    new_path=`cmd //c echo $path`
25523  fi
25524
25525
25526  input_path="$new_path"
25527  # Check if we need to convert this using DOS-style short mode. If the path
25528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25529  # take no chances and rewrite it.
25530  # Note: m4 eats our [], so we need to use [ and ] instead.
25531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25532  if test "x$has_forbidden_chars" != x; then
25533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25535  fi
25536
25537
25538  windows_path="$new_path"
25539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25540    unix_path=`$CYGPATH -u "$windows_path"`
25541    new_path="$unix_path"
25542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25544    new_path="$unix_path"
25545  fi
25546
25547  if test "x$path" != "x$new_path"; then
25548    JAVA_HOME_PROCESSED="$new_path"
25549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25550$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25551  fi
25552
25553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25555
25556    else
25557      # We're on a unix platform. Hooray! :)
25558      path="$JAVA_HOME_PROCESSED"
25559      has_space=`$ECHO "$path" | $GREP " "`
25560      if test "x$has_space" != x; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25562$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25563        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25564      fi
25565
25566      # Use eval to expand a potential ~
25567      eval path="$path"
25568      if test ! -f "$path" && test ! -d "$path"; then
25569        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25570      fi
25571
25572      if test -d "$path"; then
25573        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25574      else
25575        dir="`$DIRNAME "$path"`"
25576        base="`$BASENAME "$path"`"
25577        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25578      fi
25579    fi
25580  fi
25581
25582    if test ! -d "$JAVA_HOME_PROCESSED"; then
25583      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25584$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25585    else
25586      # Aha, the user has set a JAVA_HOME
25587      # let us use that as the Boot JDK.
25588      BOOT_JDK="$JAVA_HOME_PROCESSED"
25589      BOOT_JDK_FOUND=maybe
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25591$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25592    fi
25593  fi
25594
25595
25596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25598      # Do we have a bin/java?
25599      if test ! -x "$BOOT_JDK/bin/java"; then
25600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25602        BOOT_JDK_FOUND=no
25603      else
25604        # Do we have a bin/javac?
25605        if test ! -x "$BOOT_JDK/bin/javac"; then
25606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25610          BOOT_JDK_FOUND=no
25611        else
25612          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25613          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25614
25615          # Extra M4 quote needed to protect [] in grep expression.
25616          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25617          if test "x$FOUND_CORRECT_VERSION" = x; then
25618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25620            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25621$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25622            BOOT_JDK_FOUND=no
25623          else
25624            # We're done! :-)
25625            BOOT_JDK_FOUND=yes
25626
25627  # Only process if variable expands to non-empty
25628
25629  if test "x$BOOT_JDK" != x; then
25630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25631
25632  # Input might be given as Windows format, start by converting to
25633  # unix format.
25634  path="$BOOT_JDK"
25635  new_path=`$CYGPATH -u "$path"`
25636
25637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25640  # "foo.exe" is OK but "foo" is an error.
25641  #
25642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25643  # It is also a way to make sure we got the proper file name for the real test later on.
25644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25645  if test "x$test_shortpath" = x; then
25646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25648    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25649  fi
25650
25651  # Call helper function which possibly converts this using DOS-style short mode.
25652  # If so, the updated path is stored in $new_path.
25653
25654  input_path="$new_path"
25655  # Check if we need to convert this using DOS-style short mode. If the path
25656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25657  # take no chances and rewrite it.
25658  # Note: m4 eats our [], so we need to use [ and ] instead.
25659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25660  if test "x$has_forbidden_chars" != x; then
25661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25665      # Going to short mode and back again did indeed matter. Since short mode is
25666      # case insensitive, let's make it lowercase to improve readability.
25667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25668      # Now convert it back to Unix-style (cygpath)
25669      input_path=`$CYGPATH -u "$shortmode_path"`
25670      new_path="$input_path"
25671    fi
25672  fi
25673
25674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25675  if test "x$test_cygdrive_prefix" = x; then
25676    # As a simple fix, exclude /usr/bin since it's not a real path.
25677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25679      # a path prefixed by /cygdrive for fixpath to work.
25680      new_path="$CYGWIN_ROOT_PATH$input_path"
25681    fi
25682  fi
25683
25684
25685  if test "x$path" != "x$new_path"; then
25686    BOOT_JDK="$new_path"
25687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25689  fi
25690
25691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25692
25693  path="$BOOT_JDK"
25694  has_colon=`$ECHO $path | $GREP ^.:`
25695  new_path="$path"
25696  if test "x$has_colon" = x; then
25697    # Not in mixed or Windows style, start by that.
25698    new_path=`cmd //c echo $path`
25699  fi
25700
25701
25702  input_path="$new_path"
25703  # Check if we need to convert this using DOS-style short mode. If the path
25704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25705  # take no chances and rewrite it.
25706  # Note: m4 eats our [], so we need to use [ and ] instead.
25707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25708  if test "x$has_forbidden_chars" != x; then
25709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25711  fi
25712
25713
25714  windows_path="$new_path"
25715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25716    unix_path=`$CYGPATH -u "$windows_path"`
25717    new_path="$unix_path"
25718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25720    new_path="$unix_path"
25721  fi
25722
25723  if test "x$path" != "x$new_path"; then
25724    BOOT_JDK="$new_path"
25725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25727  fi
25728
25729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25731
25732    else
25733      # We're on a unix platform. Hooray! :)
25734      path="$BOOT_JDK"
25735      has_space=`$ECHO "$path" | $GREP " "`
25736      if test "x$has_space" != x; then
25737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25740      fi
25741
25742      # Use eval to expand a potential ~
25743      eval path="$path"
25744      if test ! -f "$path" && test ! -d "$path"; then
25745        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25746      fi
25747
25748      if test -d "$path"; then
25749        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25750      else
25751        dir="`$DIRNAME "$path"`"
25752        base="`$BASENAME "$path"`"
25753        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25754      fi
25755    fi
25756  fi
25757
25758            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25759$as_echo_n "checking for Boot JDK... " >&6; }
25760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25761$as_echo "$BOOT_JDK" >&6; }
25762            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25763$as_echo_n "checking Boot JDK version... " >&6; }
25764            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25766$as_echo "$BOOT_JDK_VERSION" >&6; }
25767          fi # end check jdk version
25768        fi # end check javac
25769      fi # end check java
25770    fi # end check boot jdk found
25771  fi
25772
25773
25774  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25775
25776  if test "x$BOOT_JDK_FOUND" = xno; then
25777    # Now execute the test
25778
25779  # Extract the first word of "javac", so it can be a program name with args.
25780set dummy javac; ac_word=$2
25781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25782$as_echo_n "checking for $ac_word... " >&6; }
25783if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25784  $as_echo_n "(cached) " >&6
25785else
25786  case $JAVAC_CHECK in
25787  [\\/]* | ?:[\\/]*)
25788  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25789  ;;
25790  *)
25791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25792for as_dir in $PATH
25793do
25794  IFS=$as_save_IFS
25795  test -z "$as_dir" && as_dir=.
25796    for ac_exec_ext in '' $ac_executable_extensions; do
25797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25798    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25800    break 2
25801  fi
25802done
25803  done
25804IFS=$as_save_IFS
25805
25806  ;;
25807esac
25808fi
25809JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25810if test -n "$JAVAC_CHECK"; then
25811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25812$as_echo "$JAVAC_CHECK" >&6; }
25813else
25814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25815$as_echo "no" >&6; }
25816fi
25817
25818
25819  # Extract the first word of "java", so it can be a program name with args.
25820set dummy java; ac_word=$2
25821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25822$as_echo_n "checking for $ac_word... " >&6; }
25823if ${ac_cv_path_JAVA_CHECK+:} false; then :
25824  $as_echo_n "(cached) " >&6
25825else
25826  case $JAVA_CHECK in
25827  [\\/]* | ?:[\\/]*)
25828  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25829  ;;
25830  *)
25831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25832for as_dir in $PATH
25833do
25834  IFS=$as_save_IFS
25835  test -z "$as_dir" && as_dir=.
25836    for ac_exec_ext in '' $ac_executable_extensions; do
25837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25838    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25840    break 2
25841  fi
25842done
25843  done
25844IFS=$as_save_IFS
25845
25846  ;;
25847esac
25848fi
25849JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25850if test -n "$JAVA_CHECK"; then
25851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25852$as_echo "$JAVA_CHECK" >&6; }
25853else
25854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25855$as_echo "no" >&6; }
25856fi
25857
25858
25859  BINARY="$JAVAC_CHECK"
25860  if test "x$JAVAC_CHECK" = x; then
25861    BINARY="$JAVA_CHECK"
25862  fi
25863  if test "x$BINARY" != x; then
25864    # So there is a java(c) binary, it might be part of a JDK.
25865    # Lets find the JDK/JRE directory by following symbolic links.
25866    # Linux/GNU systems often have links from /usr/bin/java to
25867    # /etc/alternatives/java to the real JDK binary.
25868
25869  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25870    # Follow a chain of symbolic links. Use readlink
25871    # where it exists, else fall back to horribly
25872    # complicated shell code.
25873    if test "x$READLINK_TESTED" != yes; then
25874      # On MacOSX there is a readlink tool with a different
25875      # purpose than the GNU readlink tool. Check the found readlink.
25876      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25877      if test "x$ISGNU" = x; then
25878        # A readlink that we do not know how to use.
25879        # Are there other non-GNU readlinks out there?
25880        READLINK_TESTED=yes
25881        READLINK=
25882      fi
25883    fi
25884
25885    if test "x$READLINK" != x; then
25886      BINARY=`$READLINK -f $BINARY`
25887    else
25888      # Save the current directory for restoring afterwards
25889      STARTDIR=$PWD
25890      COUNTER=0
25891      sym_link_dir=`$DIRNAME $BINARY`
25892      sym_link_file=`$BASENAME $BINARY`
25893      cd $sym_link_dir
25894      # Use -P flag to resolve symlinks in directories.
25895      cd `$THEPWDCMD -P`
25896      sym_link_dir=`$THEPWDCMD -P`
25897      # Resolve file symlinks
25898      while test $COUNTER -lt 20; do
25899        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25900        if test "x$ISLINK" == x; then
25901          # This is not a symbolic link! We are done!
25902          break
25903        fi
25904        # Again resolve directory symlinks since the target of the just found
25905        # link could be in a different directory
25906        cd `$DIRNAME $ISLINK`
25907        sym_link_dir=`$THEPWDCMD -P`
25908        sym_link_file=`$BASENAME $ISLINK`
25909        let COUNTER=COUNTER+1
25910      done
25911      cd $STARTDIR
25912      BINARY=$sym_link_dir/$sym_link_file
25913    fi
25914  fi
25915
25916    BOOT_JDK=`dirname "$BINARY"`
25917    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25918    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25919      # Looks like we found ourselves an JDK
25920      BOOT_JDK_FOUND=maybe
25921      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25922$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25923    fi
25924  fi
25925
25926
25927    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25928    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25929      # Do we have a bin/java?
25930      if test ! -x "$BOOT_JDK/bin/java"; then
25931        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25933        BOOT_JDK_FOUND=no
25934      else
25935        # Do we have a bin/javac?
25936        if test ! -x "$BOOT_JDK/bin/javac"; then
25937          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25939          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25940$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25941          BOOT_JDK_FOUND=no
25942        else
25943          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25944          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25945
25946          # Extra M4 quote needed to protect [] in grep expression.
25947          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25948          if test "x$FOUND_CORRECT_VERSION" = x; then
25949            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25951            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25952$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25953            BOOT_JDK_FOUND=no
25954          else
25955            # We're done! :-)
25956            BOOT_JDK_FOUND=yes
25957
25958  # Only process if variable expands to non-empty
25959
25960  if test "x$BOOT_JDK" != x; then
25961    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25962
25963  # Input might be given as Windows format, start by converting to
25964  # unix format.
25965  path="$BOOT_JDK"
25966  new_path=`$CYGPATH -u "$path"`
25967
25968  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25969  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25970  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25971  # "foo.exe" is OK but "foo" is an error.
25972  #
25973  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25974  # It is also a way to make sure we got the proper file name for the real test later on.
25975  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25976  if test "x$test_shortpath" = x; then
25977    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25978$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25979    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25980  fi
25981
25982  # Call helper function which possibly converts this using DOS-style short mode.
25983  # If so, the updated path is stored in $new_path.
25984
25985  input_path="$new_path"
25986  # Check if we need to convert this using DOS-style short mode. If the path
25987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25988  # take no chances and rewrite it.
25989  # Note: m4 eats our [], so we need to use [ and ] instead.
25990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25991  if test "x$has_forbidden_chars" != x; then
25992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25993    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25994    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25995    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25996      # Going to short mode and back again did indeed matter. Since short mode is
25997      # case insensitive, let's make it lowercase to improve readability.
25998      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25999      # Now convert it back to Unix-style (cygpath)
26000      input_path=`$CYGPATH -u "$shortmode_path"`
26001      new_path="$input_path"
26002    fi
26003  fi
26004
26005  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26006  if test "x$test_cygdrive_prefix" = x; then
26007    # As a simple fix, exclude /usr/bin since it's not a real path.
26008    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26009      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26010      # a path prefixed by /cygdrive for fixpath to work.
26011      new_path="$CYGWIN_ROOT_PATH$input_path"
26012    fi
26013  fi
26014
26015
26016  if test "x$path" != "x$new_path"; then
26017    BOOT_JDK="$new_path"
26018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26020  fi
26021
26022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26023
26024  path="$BOOT_JDK"
26025  has_colon=`$ECHO $path | $GREP ^.:`
26026  new_path="$path"
26027  if test "x$has_colon" = x; then
26028    # Not in mixed or Windows style, start by that.
26029    new_path=`cmd //c echo $path`
26030  fi
26031
26032
26033  input_path="$new_path"
26034  # Check if we need to convert this using DOS-style short mode. If the path
26035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26036  # take no chances and rewrite it.
26037  # Note: m4 eats our [], so we need to use [ and ] instead.
26038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26039  if test "x$has_forbidden_chars" != x; then
26040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26042  fi
26043
26044
26045  windows_path="$new_path"
26046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26047    unix_path=`$CYGPATH -u "$windows_path"`
26048    new_path="$unix_path"
26049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26051    new_path="$unix_path"
26052  fi
26053
26054  if test "x$path" != "x$new_path"; then
26055    BOOT_JDK="$new_path"
26056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26058  fi
26059
26060  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26061  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26062
26063    else
26064      # We're on a unix platform. Hooray! :)
26065      path="$BOOT_JDK"
26066      has_space=`$ECHO "$path" | $GREP " "`
26067      if test "x$has_space" != x; then
26068        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26069$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26070        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26071      fi
26072
26073      # Use eval to expand a potential ~
26074      eval path="$path"
26075      if test ! -f "$path" && test ! -d "$path"; then
26076        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26077      fi
26078
26079      if test -d "$path"; then
26080        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26081      else
26082        dir="`$DIRNAME "$path"`"
26083        base="`$BASENAME "$path"`"
26084        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26085      fi
26086    fi
26087  fi
26088
26089            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26090$as_echo_n "checking for Boot JDK... " >&6; }
26091            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26092$as_echo "$BOOT_JDK" >&6; }
26093            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26094$as_echo_n "checking Boot JDK version... " >&6; }
26095            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26097$as_echo "$BOOT_JDK_VERSION" >&6; }
26098          fi # end check jdk version
26099        fi # end check javac
26100      fi # end check java
26101    fi # end check boot jdk found
26102  fi
26103
26104
26105  # Test: Is there a JDK installed in default, well-known locations?
26106
26107  if test "x$BOOT_JDK_FOUND" = xno; then
26108    # Now execute the test
26109
26110  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26111
26112  if test "x$BOOT_JDK_FOUND" = xno; then
26113    # Now execute the test
26114
26115  if test "x$ProgramW6432" != x; then
26116    VIRTUAL_DIR="$ProgramW6432/Java"
26117
26118  windows_path="$VIRTUAL_DIR"
26119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26120    unix_path=`$CYGPATH -u "$windows_path"`
26121    VIRTUAL_DIR="$unix_path"
26122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26124    VIRTUAL_DIR="$unix_path"
26125  fi
26126
26127
26128  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26129  BOOT_JDK_SUFFIX=""
26130  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26131  if test "x$ALL_JDKS_FOUND" != x; then
26132    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26133
26134  if test "x$BOOT_JDK_FOUND" = xno; then
26135    # Now execute the test
26136
26137        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26138        if test -d "$BOOT_JDK"; then
26139          BOOT_JDK_FOUND=maybe
26140          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26141$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26142        fi
26143
26144
26145    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26146    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26147      # Do we have a bin/java?
26148      if test ! -x "$BOOT_JDK/bin/java"; then
26149        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26151        BOOT_JDK_FOUND=no
26152      else
26153        # Do we have a bin/javac?
26154        if test ! -x "$BOOT_JDK/bin/javac"; then
26155          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26157          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26158$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26159          BOOT_JDK_FOUND=no
26160        else
26161          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26162          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26163
26164          # Extra M4 quote needed to protect [] in grep expression.
26165          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26166          if test "x$FOUND_CORRECT_VERSION" = x; then
26167            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26168$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26169            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26170$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26171            BOOT_JDK_FOUND=no
26172          else
26173            # We're done! :-)
26174            BOOT_JDK_FOUND=yes
26175
26176  # Only process if variable expands to non-empty
26177
26178  if test "x$BOOT_JDK" != x; then
26179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26180
26181  # Input might be given as Windows format, start by converting to
26182  # unix format.
26183  path="$BOOT_JDK"
26184  new_path=`$CYGPATH -u "$path"`
26185
26186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26189  # "foo.exe" is OK but "foo" is an error.
26190  #
26191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26192  # It is also a way to make sure we got the proper file name for the real test later on.
26193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26194  if test "x$test_shortpath" = x; then
26195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26197    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26198  fi
26199
26200  # Call helper function which possibly converts this using DOS-style short mode.
26201  # If so, the updated path is stored in $new_path.
26202
26203  input_path="$new_path"
26204  # Check if we need to convert this using DOS-style short mode. If the path
26205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26206  # take no chances and rewrite it.
26207  # Note: m4 eats our [], so we need to use [ and ] instead.
26208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26209  if test "x$has_forbidden_chars" != x; then
26210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26214      # Going to short mode and back again did indeed matter. Since short mode is
26215      # case insensitive, let's make it lowercase to improve readability.
26216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26217      # Now convert it back to Unix-style (cygpath)
26218      input_path=`$CYGPATH -u "$shortmode_path"`
26219      new_path="$input_path"
26220    fi
26221  fi
26222
26223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26224  if test "x$test_cygdrive_prefix" = x; then
26225    # As a simple fix, exclude /usr/bin since it's not a real path.
26226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26228      # a path prefixed by /cygdrive for fixpath to work.
26229      new_path="$CYGWIN_ROOT_PATH$input_path"
26230    fi
26231  fi
26232
26233
26234  if test "x$path" != "x$new_path"; then
26235    BOOT_JDK="$new_path"
26236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26238  fi
26239
26240    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26241
26242  path="$BOOT_JDK"
26243  has_colon=`$ECHO $path | $GREP ^.:`
26244  new_path="$path"
26245  if test "x$has_colon" = x; then
26246    # Not in mixed or Windows style, start by that.
26247    new_path=`cmd //c echo $path`
26248  fi
26249
26250
26251  input_path="$new_path"
26252  # Check if we need to convert this using DOS-style short mode. If the path
26253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26254  # take no chances and rewrite it.
26255  # Note: m4 eats our [], so we need to use [ and ] instead.
26256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26257  if test "x$has_forbidden_chars" != x; then
26258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26260  fi
26261
26262
26263  windows_path="$new_path"
26264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26265    unix_path=`$CYGPATH -u "$windows_path"`
26266    new_path="$unix_path"
26267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26269    new_path="$unix_path"
26270  fi
26271
26272  if test "x$path" != "x$new_path"; then
26273    BOOT_JDK="$new_path"
26274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26276  fi
26277
26278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26280
26281    else
26282      # We're on a unix platform. Hooray! :)
26283      path="$BOOT_JDK"
26284      has_space=`$ECHO "$path" | $GREP " "`
26285      if test "x$has_space" != x; then
26286        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26288        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26289      fi
26290
26291      # Use eval to expand a potential ~
26292      eval path="$path"
26293      if test ! -f "$path" && test ! -d "$path"; then
26294        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26295      fi
26296
26297      if test -d "$path"; then
26298        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26299      else
26300        dir="`$DIRNAME "$path"`"
26301        base="`$BASENAME "$path"`"
26302        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26303      fi
26304    fi
26305  fi
26306
26307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26308$as_echo_n "checking for Boot JDK... " >&6; }
26309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26310$as_echo "$BOOT_JDK" >&6; }
26311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26312$as_echo_n "checking Boot JDK version... " >&6; }
26313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26315$as_echo "$BOOT_JDK_VERSION" >&6; }
26316          fi # end check jdk version
26317        fi # end check javac
26318      fi # end check java
26319    fi # end check boot jdk found
26320  fi
26321
26322    done
26323  fi
26324
26325  fi
26326
26327
26328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26330      # Do we have a bin/java?
26331      if test ! -x "$BOOT_JDK/bin/java"; then
26332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26334        BOOT_JDK_FOUND=no
26335      else
26336        # Do we have a bin/javac?
26337        if test ! -x "$BOOT_JDK/bin/javac"; then
26338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26342          BOOT_JDK_FOUND=no
26343        else
26344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26346
26347          # Extra M4 quote needed to protect [] in grep expression.
26348          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26349          if test "x$FOUND_CORRECT_VERSION" = x; then
26350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26354            BOOT_JDK_FOUND=no
26355          else
26356            # We're done! :-)
26357            BOOT_JDK_FOUND=yes
26358
26359  # Only process if variable expands to non-empty
26360
26361  if test "x$BOOT_JDK" != x; then
26362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26363
26364  # Input might be given as Windows format, start by converting to
26365  # unix format.
26366  path="$BOOT_JDK"
26367  new_path=`$CYGPATH -u "$path"`
26368
26369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26372  # "foo.exe" is OK but "foo" is an error.
26373  #
26374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26375  # It is also a way to make sure we got the proper file name for the real test later on.
26376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26377  if test "x$test_shortpath" = x; then
26378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26381  fi
26382
26383  # Call helper function which possibly converts this using DOS-style short mode.
26384  # If so, the updated path is stored in $new_path.
26385
26386  input_path="$new_path"
26387  # Check if we need to convert this using DOS-style short mode. If the path
26388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26389  # take no chances and rewrite it.
26390  # Note: m4 eats our [], so we need to use [ and ] instead.
26391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26392  if test "x$has_forbidden_chars" != x; then
26393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26397      # Going to short mode and back again did indeed matter. Since short mode is
26398      # case insensitive, let's make it lowercase to improve readability.
26399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26400      # Now convert it back to Unix-style (cygpath)
26401      input_path=`$CYGPATH -u "$shortmode_path"`
26402      new_path="$input_path"
26403    fi
26404  fi
26405
26406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26407  if test "x$test_cygdrive_prefix" = x; then
26408    # As a simple fix, exclude /usr/bin since it's not a real path.
26409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26411      # a path prefixed by /cygdrive for fixpath to work.
26412      new_path="$CYGWIN_ROOT_PATH$input_path"
26413    fi
26414  fi
26415
26416
26417  if test "x$path" != "x$new_path"; then
26418    BOOT_JDK="$new_path"
26419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26421  fi
26422
26423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26424
26425  path="$BOOT_JDK"
26426  has_colon=`$ECHO $path | $GREP ^.:`
26427  new_path="$path"
26428  if test "x$has_colon" = x; then
26429    # Not in mixed or Windows style, start by that.
26430    new_path=`cmd //c echo $path`
26431  fi
26432
26433
26434  input_path="$new_path"
26435  # Check if we need to convert this using DOS-style short mode. If the path
26436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26437  # take no chances and rewrite it.
26438  # Note: m4 eats our [], so we need to use [ and ] instead.
26439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26440  if test "x$has_forbidden_chars" != x; then
26441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26443  fi
26444
26445
26446  windows_path="$new_path"
26447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26448    unix_path=`$CYGPATH -u "$windows_path"`
26449    new_path="$unix_path"
26450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26452    new_path="$unix_path"
26453  fi
26454
26455  if test "x$path" != "x$new_path"; then
26456    BOOT_JDK="$new_path"
26457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26459  fi
26460
26461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26463
26464    else
26465      # We're on a unix platform. Hooray! :)
26466      path="$BOOT_JDK"
26467      has_space=`$ECHO "$path" | $GREP " "`
26468      if test "x$has_space" != x; then
26469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26472      fi
26473
26474      # Use eval to expand a potential ~
26475      eval path="$path"
26476      if test ! -f "$path" && test ! -d "$path"; then
26477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26478      fi
26479
26480      if test -d "$path"; then
26481        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26482      else
26483        dir="`$DIRNAME "$path"`"
26484        base="`$BASENAME "$path"`"
26485        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26486      fi
26487    fi
26488  fi
26489
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26491$as_echo_n "checking for Boot JDK... " >&6; }
26492            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26493$as_echo "$BOOT_JDK" >&6; }
26494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26495$as_echo_n "checking Boot JDK version... " >&6; }
26496            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26498$as_echo "$BOOT_JDK_VERSION" >&6; }
26499          fi # end check jdk version
26500        fi # end check javac
26501      fi # end check java
26502    fi # end check boot jdk found
26503  fi
26504
26505
26506  if test "x$BOOT_JDK_FOUND" = xno; then
26507    # Now execute the test
26508
26509  if test "x$PROGRAMW6432" != x; then
26510    VIRTUAL_DIR="$PROGRAMW6432/Java"
26511
26512  windows_path="$VIRTUAL_DIR"
26513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26514    unix_path=`$CYGPATH -u "$windows_path"`
26515    VIRTUAL_DIR="$unix_path"
26516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26518    VIRTUAL_DIR="$unix_path"
26519  fi
26520
26521
26522  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26523  BOOT_JDK_SUFFIX=""
26524  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26525  if test "x$ALL_JDKS_FOUND" != x; then
26526    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26527
26528  if test "x$BOOT_JDK_FOUND" = xno; then
26529    # Now execute the test
26530
26531        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26532        if test -d "$BOOT_JDK"; then
26533          BOOT_JDK_FOUND=maybe
26534          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26535$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26536        fi
26537
26538
26539    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26540    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26541      # Do we have a bin/java?
26542      if test ! -x "$BOOT_JDK/bin/java"; then
26543        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26545        BOOT_JDK_FOUND=no
26546      else
26547        # Do we have a bin/javac?
26548        if test ! -x "$BOOT_JDK/bin/javac"; then
26549          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26550$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26551          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26552$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26553          BOOT_JDK_FOUND=no
26554        else
26555          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26556          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26557
26558          # Extra M4 quote needed to protect [] in grep expression.
26559          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26560          if test "x$FOUND_CORRECT_VERSION" = x; then
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26564$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26565            BOOT_JDK_FOUND=no
26566          else
26567            # We're done! :-)
26568            BOOT_JDK_FOUND=yes
26569
26570  # Only process if variable expands to non-empty
26571
26572  if test "x$BOOT_JDK" != x; then
26573    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26574
26575  # Input might be given as Windows format, start by converting to
26576  # unix format.
26577  path="$BOOT_JDK"
26578  new_path=`$CYGPATH -u "$path"`
26579
26580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26583  # "foo.exe" is OK but "foo" is an error.
26584  #
26585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26586  # It is also a way to make sure we got the proper file name for the real test later on.
26587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26588  if test "x$test_shortpath" = x; then
26589    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26590$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26591    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26592  fi
26593
26594  # Call helper function which possibly converts this using DOS-style short mode.
26595  # If so, the updated path is stored in $new_path.
26596
26597  input_path="$new_path"
26598  # Check if we need to convert this using DOS-style short mode. If the path
26599  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26600  # take no chances and rewrite it.
26601  # Note: m4 eats our [], so we need to use [ and ] instead.
26602  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26603  if test "x$has_forbidden_chars" != x; then
26604    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26605    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26606    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26607    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26608      # Going to short mode and back again did indeed matter. Since short mode is
26609      # case insensitive, let's make it lowercase to improve readability.
26610      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26611      # Now convert it back to Unix-style (cygpath)
26612      input_path=`$CYGPATH -u "$shortmode_path"`
26613      new_path="$input_path"
26614    fi
26615  fi
26616
26617  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26618  if test "x$test_cygdrive_prefix" = x; then
26619    # As a simple fix, exclude /usr/bin since it's not a real path.
26620    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26621      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26622      # a path prefixed by /cygdrive for fixpath to work.
26623      new_path="$CYGWIN_ROOT_PATH$input_path"
26624    fi
26625  fi
26626
26627
26628  if test "x$path" != "x$new_path"; then
26629    BOOT_JDK="$new_path"
26630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26631$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26632  fi
26633
26634    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26635
26636  path="$BOOT_JDK"
26637  has_colon=`$ECHO $path | $GREP ^.:`
26638  new_path="$path"
26639  if test "x$has_colon" = x; then
26640    # Not in mixed or Windows style, start by that.
26641    new_path=`cmd //c echo $path`
26642  fi
26643
26644
26645  input_path="$new_path"
26646  # Check if we need to convert this using DOS-style short mode. If the path
26647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26648  # take no chances and rewrite it.
26649  # Note: m4 eats our [], so we need to use [ and ] instead.
26650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26651  if test "x$has_forbidden_chars" != x; then
26652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26653    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26654  fi
26655
26656
26657  windows_path="$new_path"
26658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26659    unix_path=`$CYGPATH -u "$windows_path"`
26660    new_path="$unix_path"
26661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26663    new_path="$unix_path"
26664  fi
26665
26666  if test "x$path" != "x$new_path"; then
26667    BOOT_JDK="$new_path"
26668    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26669$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26670  fi
26671
26672  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26673  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26674
26675    else
26676      # We're on a unix platform. Hooray! :)
26677      path="$BOOT_JDK"
26678      has_space=`$ECHO "$path" | $GREP " "`
26679      if test "x$has_space" != x; then
26680        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26681$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26682        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26683      fi
26684
26685      # Use eval to expand a potential ~
26686      eval path="$path"
26687      if test ! -f "$path" && test ! -d "$path"; then
26688        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26689      fi
26690
26691      if test -d "$path"; then
26692        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26693      else
26694        dir="`$DIRNAME "$path"`"
26695        base="`$BASENAME "$path"`"
26696        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26697      fi
26698    fi
26699  fi
26700
26701            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26702$as_echo_n "checking for Boot JDK... " >&6; }
26703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26704$as_echo "$BOOT_JDK" >&6; }
26705            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26706$as_echo_n "checking Boot JDK version... " >&6; }
26707            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26709$as_echo "$BOOT_JDK_VERSION" >&6; }
26710          fi # end check jdk version
26711        fi # end check javac
26712      fi # end check java
26713    fi # end check boot jdk found
26714  fi
26715
26716    done
26717  fi
26718
26719  fi
26720
26721
26722    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26723    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26724      # Do we have a bin/java?
26725      if test ! -x "$BOOT_JDK/bin/java"; then
26726        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26728        BOOT_JDK_FOUND=no
26729      else
26730        # Do we have a bin/javac?
26731        if test ! -x "$BOOT_JDK/bin/javac"; then
26732          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26733$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26734          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26735$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26736          BOOT_JDK_FOUND=no
26737        else
26738          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26739          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26740
26741          # Extra M4 quote needed to protect [] in grep expression.
26742          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26743          if test "x$FOUND_CORRECT_VERSION" = x; then
26744            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26745$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26746            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26747$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26748            BOOT_JDK_FOUND=no
26749          else
26750            # We're done! :-)
26751            BOOT_JDK_FOUND=yes
26752
26753  # Only process if variable expands to non-empty
26754
26755  if test "x$BOOT_JDK" != x; then
26756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26757
26758  # Input might be given as Windows format, start by converting to
26759  # unix format.
26760  path="$BOOT_JDK"
26761  new_path=`$CYGPATH -u "$path"`
26762
26763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26766  # "foo.exe" is OK but "foo" is an error.
26767  #
26768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26769  # It is also a way to make sure we got the proper file name for the real test later on.
26770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26771  if test "x$test_shortpath" = x; then
26772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26774    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26775  fi
26776
26777  # Call helper function which possibly converts this using DOS-style short mode.
26778  # If so, the updated path is stored in $new_path.
26779
26780  input_path="$new_path"
26781  # Check if we need to convert this using DOS-style short mode. If the path
26782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26783  # take no chances and rewrite it.
26784  # Note: m4 eats our [], so we need to use [ and ] instead.
26785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26786  if test "x$has_forbidden_chars" != x; then
26787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26791      # Going to short mode and back again did indeed matter. Since short mode is
26792      # case insensitive, let's make it lowercase to improve readability.
26793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26794      # Now convert it back to Unix-style (cygpath)
26795      input_path=`$CYGPATH -u "$shortmode_path"`
26796      new_path="$input_path"
26797    fi
26798  fi
26799
26800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26801  if test "x$test_cygdrive_prefix" = x; then
26802    # As a simple fix, exclude /usr/bin since it's not a real path.
26803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26805      # a path prefixed by /cygdrive for fixpath to work.
26806      new_path="$CYGWIN_ROOT_PATH$input_path"
26807    fi
26808  fi
26809
26810
26811  if test "x$path" != "x$new_path"; then
26812    BOOT_JDK="$new_path"
26813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26815  fi
26816
26817    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26818
26819  path="$BOOT_JDK"
26820  has_colon=`$ECHO $path | $GREP ^.:`
26821  new_path="$path"
26822  if test "x$has_colon" = x; then
26823    # Not in mixed or Windows style, start by that.
26824    new_path=`cmd //c echo $path`
26825  fi
26826
26827
26828  input_path="$new_path"
26829  # Check if we need to convert this using DOS-style short mode. If the path
26830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26831  # take no chances and rewrite it.
26832  # Note: m4 eats our [], so we need to use [ and ] instead.
26833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26834  if test "x$has_forbidden_chars" != x; then
26835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26837  fi
26838
26839
26840  windows_path="$new_path"
26841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26842    unix_path=`$CYGPATH -u "$windows_path"`
26843    new_path="$unix_path"
26844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26846    new_path="$unix_path"
26847  fi
26848
26849  if test "x$path" != "x$new_path"; then
26850    BOOT_JDK="$new_path"
26851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26853  fi
26854
26855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26857
26858    else
26859      # We're on a unix platform. Hooray! :)
26860      path="$BOOT_JDK"
26861      has_space=`$ECHO "$path" | $GREP " "`
26862      if test "x$has_space" != x; then
26863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26865        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26866      fi
26867
26868      # Use eval to expand a potential ~
26869      eval path="$path"
26870      if test ! -f "$path" && test ! -d "$path"; then
26871        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26872      fi
26873
26874      if test -d "$path"; then
26875        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26876      else
26877        dir="`$DIRNAME "$path"`"
26878        base="`$BASENAME "$path"`"
26879        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26880      fi
26881    fi
26882  fi
26883
26884            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26885$as_echo_n "checking for Boot JDK... " >&6; }
26886            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26887$as_echo "$BOOT_JDK" >&6; }
26888            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26889$as_echo_n "checking Boot JDK version... " >&6; }
26890            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26892$as_echo "$BOOT_JDK_VERSION" >&6; }
26893          fi # end check jdk version
26894        fi # end check javac
26895      fi # end check java
26896    fi # end check boot jdk found
26897  fi
26898
26899
26900  if test "x$BOOT_JDK_FOUND" = xno; then
26901    # Now execute the test
26902
26903  if test "x$PROGRAMFILES" != x; then
26904    VIRTUAL_DIR="$PROGRAMFILES/Java"
26905
26906  windows_path="$VIRTUAL_DIR"
26907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26908    unix_path=`$CYGPATH -u "$windows_path"`
26909    VIRTUAL_DIR="$unix_path"
26910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26912    VIRTUAL_DIR="$unix_path"
26913  fi
26914
26915
26916  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26917  BOOT_JDK_SUFFIX=""
26918  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26919  if test "x$ALL_JDKS_FOUND" != x; then
26920    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26921
26922  if test "x$BOOT_JDK_FOUND" = xno; then
26923    # Now execute the test
26924
26925        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26926        if test -d "$BOOT_JDK"; then
26927          BOOT_JDK_FOUND=maybe
26928          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26929$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26930        fi
26931
26932
26933    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26934    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26935      # Do we have a bin/java?
26936      if test ! -x "$BOOT_JDK/bin/java"; then
26937        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26939        BOOT_JDK_FOUND=no
26940      else
26941        # Do we have a bin/javac?
26942        if test ! -x "$BOOT_JDK/bin/javac"; then
26943          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26945          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26946$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26947          BOOT_JDK_FOUND=no
26948        else
26949          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26950          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26951
26952          # Extra M4 quote needed to protect [] in grep expression.
26953          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26954          if test "x$FOUND_CORRECT_VERSION" = x; then
26955            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26957            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26958$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26959            BOOT_JDK_FOUND=no
26960          else
26961            # We're done! :-)
26962            BOOT_JDK_FOUND=yes
26963
26964  # Only process if variable expands to non-empty
26965
26966  if test "x$BOOT_JDK" != x; then
26967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968
26969  # Input might be given as Windows format, start by converting to
26970  # unix format.
26971  path="$BOOT_JDK"
26972  new_path=`$CYGPATH -u "$path"`
26973
26974  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26975  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26976  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26977  # "foo.exe" is OK but "foo" is an error.
26978  #
26979  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26980  # It is also a way to make sure we got the proper file name for the real test later on.
26981  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26982  if test "x$test_shortpath" = x; then
26983    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26984$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26985    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26986  fi
26987
26988  # Call helper function which possibly converts this using DOS-style short mode.
26989  # If so, the updated path is stored in $new_path.
26990
26991  input_path="$new_path"
26992  # Check if we need to convert this using DOS-style short mode. If the path
26993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26994  # take no chances and rewrite it.
26995  # Note: m4 eats our [], so we need to use [ and ] instead.
26996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26997  if test "x$has_forbidden_chars" != x; then
26998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26999    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27000    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27001    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27002      # Going to short mode and back again did indeed matter. Since short mode is
27003      # case insensitive, let's make it lowercase to improve readability.
27004      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27005      # Now convert it back to Unix-style (cygpath)
27006      input_path=`$CYGPATH -u "$shortmode_path"`
27007      new_path="$input_path"
27008    fi
27009  fi
27010
27011  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27012  if test "x$test_cygdrive_prefix" = x; then
27013    # As a simple fix, exclude /usr/bin since it's not a real path.
27014    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27015      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27016      # a path prefixed by /cygdrive for fixpath to work.
27017      new_path="$CYGWIN_ROOT_PATH$input_path"
27018    fi
27019  fi
27020
27021
27022  if test "x$path" != "x$new_path"; then
27023    BOOT_JDK="$new_path"
27024    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27025$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27026  fi
27027
27028    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27029
27030  path="$BOOT_JDK"
27031  has_colon=`$ECHO $path | $GREP ^.:`
27032  new_path="$path"
27033  if test "x$has_colon" = x; then
27034    # Not in mixed or Windows style, start by that.
27035    new_path=`cmd //c echo $path`
27036  fi
27037
27038
27039  input_path="$new_path"
27040  # Check if we need to convert this using DOS-style short mode. If the path
27041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27042  # take no chances and rewrite it.
27043  # Note: m4 eats our [], so we need to use [ and ] instead.
27044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27045  if test "x$has_forbidden_chars" != x; then
27046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27047    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27048  fi
27049
27050
27051  windows_path="$new_path"
27052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27053    unix_path=`$CYGPATH -u "$windows_path"`
27054    new_path="$unix_path"
27055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27057    new_path="$unix_path"
27058  fi
27059
27060  if test "x$path" != "x$new_path"; then
27061    BOOT_JDK="$new_path"
27062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27063$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27064  fi
27065
27066  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27067  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27068
27069    else
27070      # We're on a unix platform. Hooray! :)
27071      path="$BOOT_JDK"
27072      has_space=`$ECHO "$path" | $GREP " "`
27073      if test "x$has_space" != x; then
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27075$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27076        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27077      fi
27078
27079      # Use eval to expand a potential ~
27080      eval path="$path"
27081      if test ! -f "$path" && test ! -d "$path"; then
27082        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27083      fi
27084
27085      if test -d "$path"; then
27086        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27087      else
27088        dir="`$DIRNAME "$path"`"
27089        base="`$BASENAME "$path"`"
27090        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27091      fi
27092    fi
27093  fi
27094
27095            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27096$as_echo_n "checking for Boot JDK... " >&6; }
27097            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27098$as_echo "$BOOT_JDK" >&6; }
27099            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27100$as_echo_n "checking Boot JDK version... " >&6; }
27101            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27103$as_echo "$BOOT_JDK_VERSION" >&6; }
27104          fi # end check jdk version
27105        fi # end check javac
27106      fi # end check java
27107    fi # end check boot jdk found
27108  fi
27109
27110    done
27111  fi
27112
27113  fi
27114
27115
27116    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27117    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27118      # Do we have a bin/java?
27119      if test ! -x "$BOOT_JDK/bin/java"; then
27120        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27122        BOOT_JDK_FOUND=no
27123      else
27124        # Do we have a bin/javac?
27125        if test ! -x "$BOOT_JDK/bin/javac"; then
27126          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27128          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27129$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27130          BOOT_JDK_FOUND=no
27131        else
27132          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27133          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27134
27135          # Extra M4 quote needed to protect [] in grep expression.
27136          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27137          if test "x$FOUND_CORRECT_VERSION" = x; then
27138            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27140            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27141$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27142            BOOT_JDK_FOUND=no
27143          else
27144            # We're done! :-)
27145            BOOT_JDK_FOUND=yes
27146
27147  # Only process if variable expands to non-empty
27148
27149  if test "x$BOOT_JDK" != x; then
27150    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27151
27152  # Input might be given as Windows format, start by converting to
27153  # unix format.
27154  path="$BOOT_JDK"
27155  new_path=`$CYGPATH -u "$path"`
27156
27157  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27158  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27159  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27160  # "foo.exe" is OK but "foo" is an error.
27161  #
27162  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27163  # It is also a way to make sure we got the proper file name for the real test later on.
27164  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27165  if test "x$test_shortpath" = x; then
27166    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27167$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27168    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27169  fi
27170
27171  # Call helper function which possibly converts this using DOS-style short mode.
27172  # If so, the updated path is stored in $new_path.
27173
27174  input_path="$new_path"
27175  # Check if we need to convert this using DOS-style short mode. If the path
27176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27177  # take no chances and rewrite it.
27178  # Note: m4 eats our [], so we need to use [ and ] instead.
27179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27180  if test "x$has_forbidden_chars" != x; then
27181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27182    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27183    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27184    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27185      # Going to short mode and back again did indeed matter. Since short mode is
27186      # case insensitive, let's make it lowercase to improve readability.
27187      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27188      # Now convert it back to Unix-style (cygpath)
27189      input_path=`$CYGPATH -u "$shortmode_path"`
27190      new_path="$input_path"
27191    fi
27192  fi
27193
27194  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27195  if test "x$test_cygdrive_prefix" = x; then
27196    # As a simple fix, exclude /usr/bin since it's not a real path.
27197    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27198      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27199      # a path prefixed by /cygdrive for fixpath to work.
27200      new_path="$CYGWIN_ROOT_PATH$input_path"
27201    fi
27202  fi
27203
27204
27205  if test "x$path" != "x$new_path"; then
27206    BOOT_JDK="$new_path"
27207    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27208$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27209  fi
27210
27211    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27212
27213  path="$BOOT_JDK"
27214  has_colon=`$ECHO $path | $GREP ^.:`
27215  new_path="$path"
27216  if test "x$has_colon" = x; then
27217    # Not in mixed or Windows style, start by that.
27218    new_path=`cmd //c echo $path`
27219  fi
27220
27221
27222  input_path="$new_path"
27223  # Check if we need to convert this using DOS-style short mode. If the path
27224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27225  # take no chances and rewrite it.
27226  # Note: m4 eats our [], so we need to use [ and ] instead.
27227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27228  if test "x$has_forbidden_chars" != x; then
27229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27231  fi
27232
27233
27234  windows_path="$new_path"
27235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27236    unix_path=`$CYGPATH -u "$windows_path"`
27237    new_path="$unix_path"
27238  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27239    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27240    new_path="$unix_path"
27241  fi
27242
27243  if test "x$path" != "x$new_path"; then
27244    BOOT_JDK="$new_path"
27245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27246$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27247  fi
27248
27249  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27250  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27251
27252    else
27253      # We're on a unix platform. Hooray! :)
27254      path="$BOOT_JDK"
27255      has_space=`$ECHO "$path" | $GREP " "`
27256      if test "x$has_space" != x; then
27257        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27258$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27259        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27260      fi
27261
27262      # Use eval to expand a potential ~
27263      eval path="$path"
27264      if test ! -f "$path" && test ! -d "$path"; then
27265        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27266      fi
27267
27268      if test -d "$path"; then
27269        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27270      else
27271        dir="`$DIRNAME "$path"`"
27272        base="`$BASENAME "$path"`"
27273        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27274      fi
27275    fi
27276  fi
27277
27278            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27279$as_echo_n "checking for Boot JDK... " >&6; }
27280            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27281$as_echo "$BOOT_JDK" >&6; }
27282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27283$as_echo_n "checking Boot JDK version... " >&6; }
27284            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27286$as_echo "$BOOT_JDK_VERSION" >&6; }
27287          fi # end check jdk version
27288        fi # end check javac
27289      fi # end check java
27290    fi # end check boot jdk found
27291  fi
27292
27293
27294  if test "x$BOOT_JDK_FOUND" = xno; then
27295    # Now execute the test
27296
27297  if test "x$ProgramFiles" != x; then
27298    VIRTUAL_DIR="$ProgramFiles/Java"
27299
27300  windows_path="$VIRTUAL_DIR"
27301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27302    unix_path=`$CYGPATH -u "$windows_path"`
27303    VIRTUAL_DIR="$unix_path"
27304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27306    VIRTUAL_DIR="$unix_path"
27307  fi
27308
27309
27310  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27311  BOOT_JDK_SUFFIX=""
27312  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27313  if test "x$ALL_JDKS_FOUND" != x; then
27314    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27315
27316  if test "x$BOOT_JDK_FOUND" = xno; then
27317    # Now execute the test
27318
27319        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27320        if test -d "$BOOT_JDK"; then
27321          BOOT_JDK_FOUND=maybe
27322          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27323$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27324        fi
27325
27326
27327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27329      # Do we have a bin/java?
27330      if test ! -x "$BOOT_JDK/bin/java"; then
27331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27333        BOOT_JDK_FOUND=no
27334      else
27335        # Do we have a bin/javac?
27336        if test ! -x "$BOOT_JDK/bin/javac"; then
27337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27341          BOOT_JDK_FOUND=no
27342        else
27343          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27344          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27345
27346          # Extra M4 quote needed to protect [] in grep expression.
27347          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27348          if test "x$FOUND_CORRECT_VERSION" = x; then
27349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27351            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27352$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27353            BOOT_JDK_FOUND=no
27354          else
27355            # We're done! :-)
27356            BOOT_JDK_FOUND=yes
27357
27358  # Only process if variable expands to non-empty
27359
27360  if test "x$BOOT_JDK" != x; then
27361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27362
27363  # Input might be given as Windows format, start by converting to
27364  # unix format.
27365  path="$BOOT_JDK"
27366  new_path=`$CYGPATH -u "$path"`
27367
27368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27371  # "foo.exe" is OK but "foo" is an error.
27372  #
27373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27374  # It is also a way to make sure we got the proper file name for the real test later on.
27375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27376  if test "x$test_shortpath" = x; then
27377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27379    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27380  fi
27381
27382  # Call helper function which possibly converts this using DOS-style short mode.
27383  # If so, the updated path is stored in $new_path.
27384
27385  input_path="$new_path"
27386  # Check if we need to convert this using DOS-style short mode. If the path
27387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27388  # take no chances and rewrite it.
27389  # Note: m4 eats our [], so we need to use [ and ] instead.
27390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27391  if test "x$has_forbidden_chars" != x; then
27392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27396      # Going to short mode and back again did indeed matter. Since short mode is
27397      # case insensitive, let's make it lowercase to improve readability.
27398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27399      # Now convert it back to Unix-style (cygpath)
27400      input_path=`$CYGPATH -u "$shortmode_path"`
27401      new_path="$input_path"
27402    fi
27403  fi
27404
27405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27406  if test "x$test_cygdrive_prefix" = x; then
27407    # As a simple fix, exclude /usr/bin since it's not a real path.
27408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27410      # a path prefixed by /cygdrive for fixpath to work.
27411      new_path="$CYGWIN_ROOT_PATH$input_path"
27412    fi
27413  fi
27414
27415
27416  if test "x$path" != "x$new_path"; then
27417    BOOT_JDK="$new_path"
27418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27420  fi
27421
27422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423
27424  path="$BOOT_JDK"
27425  has_colon=`$ECHO $path | $GREP ^.:`
27426  new_path="$path"
27427  if test "x$has_colon" = x; then
27428    # Not in mixed or Windows style, start by that.
27429    new_path=`cmd //c echo $path`
27430  fi
27431
27432
27433  input_path="$new_path"
27434  # Check if we need to convert this using DOS-style short mode. If the path
27435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27436  # take no chances and rewrite it.
27437  # Note: m4 eats our [], so we need to use [ and ] instead.
27438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27439  if test "x$has_forbidden_chars" != x; then
27440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27442  fi
27443
27444
27445  windows_path="$new_path"
27446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27447    unix_path=`$CYGPATH -u "$windows_path"`
27448    new_path="$unix_path"
27449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27451    new_path="$unix_path"
27452  fi
27453
27454  if test "x$path" != "x$new_path"; then
27455    BOOT_JDK="$new_path"
27456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27458  fi
27459
27460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27462
27463    else
27464      # We're on a unix platform. Hooray! :)
27465      path="$BOOT_JDK"
27466      has_space=`$ECHO "$path" | $GREP " "`
27467      if test "x$has_space" != x; then
27468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27471      fi
27472
27473      # Use eval to expand a potential ~
27474      eval path="$path"
27475      if test ! -f "$path" && test ! -d "$path"; then
27476        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27477      fi
27478
27479      if test -d "$path"; then
27480        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27481      else
27482        dir="`$DIRNAME "$path"`"
27483        base="`$BASENAME "$path"`"
27484        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27485      fi
27486    fi
27487  fi
27488
27489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27490$as_echo_n "checking for Boot JDK... " >&6; }
27491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27492$as_echo "$BOOT_JDK" >&6; }
27493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27494$as_echo_n "checking Boot JDK version... " >&6; }
27495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27497$as_echo "$BOOT_JDK_VERSION" >&6; }
27498          fi # end check jdk version
27499        fi # end check javac
27500      fi # end check java
27501    fi # end check boot jdk found
27502  fi
27503
27504    done
27505  fi
27506
27507  fi
27508
27509
27510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27512      # Do we have a bin/java?
27513      if test ! -x "$BOOT_JDK/bin/java"; then
27514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27516        BOOT_JDK_FOUND=no
27517      else
27518        # Do we have a bin/javac?
27519        if test ! -x "$BOOT_JDK/bin/javac"; then
27520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27524          BOOT_JDK_FOUND=no
27525        else
27526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27528
27529          # Extra M4 quote needed to protect [] in grep expression.
27530          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27531          if test "x$FOUND_CORRECT_VERSION" = x; then
27532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27536            BOOT_JDK_FOUND=no
27537          else
27538            # We're done! :-)
27539            BOOT_JDK_FOUND=yes
27540
27541  # Only process if variable expands to non-empty
27542
27543  if test "x$BOOT_JDK" != x; then
27544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27545
27546  # Input might be given as Windows format, start by converting to
27547  # unix format.
27548  path="$BOOT_JDK"
27549  new_path=`$CYGPATH -u "$path"`
27550
27551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27554  # "foo.exe" is OK but "foo" is an error.
27555  #
27556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27557  # It is also a way to make sure we got the proper file name for the real test later on.
27558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27559  if test "x$test_shortpath" = x; then
27560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27563  fi
27564
27565  # Call helper function which possibly converts this using DOS-style short mode.
27566  # If so, the updated path is stored in $new_path.
27567
27568  input_path="$new_path"
27569  # Check if we need to convert this using DOS-style short mode. If the path
27570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27571  # take no chances and rewrite it.
27572  # Note: m4 eats our [], so we need to use [ and ] instead.
27573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27574  if test "x$has_forbidden_chars" != x; then
27575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27579      # Going to short mode and back again did indeed matter. Since short mode is
27580      # case insensitive, let's make it lowercase to improve readability.
27581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27582      # Now convert it back to Unix-style (cygpath)
27583      input_path=`$CYGPATH -u "$shortmode_path"`
27584      new_path="$input_path"
27585    fi
27586  fi
27587
27588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27589  if test "x$test_cygdrive_prefix" = x; then
27590    # As a simple fix, exclude /usr/bin since it's not a real path.
27591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27593      # a path prefixed by /cygdrive for fixpath to work.
27594      new_path="$CYGWIN_ROOT_PATH$input_path"
27595    fi
27596  fi
27597
27598
27599  if test "x$path" != "x$new_path"; then
27600    BOOT_JDK="$new_path"
27601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27603  fi
27604
27605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27606
27607  path="$BOOT_JDK"
27608  has_colon=`$ECHO $path | $GREP ^.:`
27609  new_path="$path"
27610  if test "x$has_colon" = x; then
27611    # Not in mixed or Windows style, start by that.
27612    new_path=`cmd //c echo $path`
27613  fi
27614
27615
27616  input_path="$new_path"
27617  # Check if we need to convert this using DOS-style short mode. If the path
27618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27619  # take no chances and rewrite it.
27620  # Note: m4 eats our [], so we need to use [ and ] instead.
27621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27622  if test "x$has_forbidden_chars" != x; then
27623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27625  fi
27626
27627
27628  windows_path="$new_path"
27629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27630    unix_path=`$CYGPATH -u "$windows_path"`
27631    new_path="$unix_path"
27632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27634    new_path="$unix_path"
27635  fi
27636
27637  if test "x$path" != "x$new_path"; then
27638    BOOT_JDK="$new_path"
27639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27641  fi
27642
27643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27645
27646    else
27647      # We're on a unix platform. Hooray! :)
27648      path="$BOOT_JDK"
27649      has_space=`$ECHO "$path" | $GREP " "`
27650      if test "x$has_space" != x; then
27651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27654      fi
27655
27656      # Use eval to expand a potential ~
27657      eval path="$path"
27658      if test ! -f "$path" && test ! -d "$path"; then
27659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27660      fi
27661
27662      if test -d "$path"; then
27663        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27664      else
27665        dir="`$DIRNAME "$path"`"
27666        base="`$BASENAME "$path"`"
27667        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27668      fi
27669    fi
27670  fi
27671
27672            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27673$as_echo_n "checking for Boot JDK... " >&6; }
27674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27675$as_echo "$BOOT_JDK" >&6; }
27676            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27677$as_echo_n "checking Boot JDK version... " >&6; }
27678            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27680$as_echo "$BOOT_JDK_VERSION" >&6; }
27681          fi # end check jdk version
27682        fi # end check javac
27683      fi # end check java
27684    fi # end check boot jdk found
27685  fi
27686
27687
27688  if test "x$BOOT_JDK_FOUND" = xno; then
27689    # Now execute the test
27690
27691  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27692  BOOT_JDK_SUFFIX=""
27693  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27694  if test "x$ALL_JDKS_FOUND" != x; then
27695    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27696
27697  if test "x$BOOT_JDK_FOUND" = xno; then
27698    # Now execute the test
27699
27700        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27701        if test -d "$BOOT_JDK"; then
27702          BOOT_JDK_FOUND=maybe
27703          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27704$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27705        fi
27706
27707
27708    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27709    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27710      # Do we have a bin/java?
27711      if test ! -x "$BOOT_JDK/bin/java"; then
27712        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27713$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27714        BOOT_JDK_FOUND=no
27715      else
27716        # Do we have a bin/javac?
27717        if test ! -x "$BOOT_JDK/bin/javac"; then
27718          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27719$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27720          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27721$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27722          BOOT_JDK_FOUND=no
27723        else
27724          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27725          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27726
27727          # Extra M4 quote needed to protect [] in grep expression.
27728          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27729          if test "x$FOUND_CORRECT_VERSION" = x; then
27730            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27731$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27732            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27733$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27734            BOOT_JDK_FOUND=no
27735          else
27736            # We're done! :-)
27737            BOOT_JDK_FOUND=yes
27738
27739  # Only process if variable expands to non-empty
27740
27741  if test "x$BOOT_JDK" != x; then
27742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27743
27744  # Input might be given as Windows format, start by converting to
27745  # unix format.
27746  path="$BOOT_JDK"
27747  new_path=`$CYGPATH -u "$path"`
27748
27749  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27750  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27751  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27752  # "foo.exe" is OK but "foo" is an error.
27753  #
27754  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27755  # It is also a way to make sure we got the proper file name for the real test later on.
27756  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27757  if test "x$test_shortpath" = x; then
27758    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27760    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27761  fi
27762
27763  # Call helper function which possibly converts this using DOS-style short mode.
27764  # If so, the updated path is stored in $new_path.
27765
27766  input_path="$new_path"
27767  # Check if we need to convert this using DOS-style short mode. If the path
27768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27769  # take no chances and rewrite it.
27770  # Note: m4 eats our [], so we need to use [ and ] instead.
27771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27772  if test "x$has_forbidden_chars" != x; then
27773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27777      # Going to short mode and back again did indeed matter. Since short mode is
27778      # case insensitive, let's make it lowercase to improve readability.
27779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27780      # Now convert it back to Unix-style (cygpath)
27781      input_path=`$CYGPATH -u "$shortmode_path"`
27782      new_path="$input_path"
27783    fi
27784  fi
27785
27786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27787  if test "x$test_cygdrive_prefix" = x; then
27788    # As a simple fix, exclude /usr/bin since it's not a real path.
27789    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27791      # a path prefixed by /cygdrive for fixpath to work.
27792      new_path="$CYGWIN_ROOT_PATH$input_path"
27793    fi
27794  fi
27795
27796
27797  if test "x$path" != "x$new_path"; then
27798    BOOT_JDK="$new_path"
27799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27800$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27801  fi
27802
27803    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27804
27805  path="$BOOT_JDK"
27806  has_colon=`$ECHO $path | $GREP ^.:`
27807  new_path="$path"
27808  if test "x$has_colon" = x; then
27809    # Not in mixed or Windows style, start by that.
27810    new_path=`cmd //c echo $path`
27811  fi
27812
27813
27814  input_path="$new_path"
27815  # Check if we need to convert this using DOS-style short mode. If the path
27816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27817  # take no chances and rewrite it.
27818  # Note: m4 eats our [], so we need to use [ and ] instead.
27819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27820  if test "x$has_forbidden_chars" != x; then
27821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27823  fi
27824
27825
27826  windows_path="$new_path"
27827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27828    unix_path=`$CYGPATH -u "$windows_path"`
27829    new_path="$unix_path"
27830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27832    new_path="$unix_path"
27833  fi
27834
27835  if test "x$path" != "x$new_path"; then
27836    BOOT_JDK="$new_path"
27837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27838$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27839  fi
27840
27841  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27842  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27843
27844    else
27845      # We're on a unix platform. Hooray! :)
27846      path="$BOOT_JDK"
27847      has_space=`$ECHO "$path" | $GREP " "`
27848      if test "x$has_space" != x; then
27849        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27852      fi
27853
27854      # Use eval to expand a potential ~
27855      eval path="$path"
27856      if test ! -f "$path" && test ! -d "$path"; then
27857        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27858      fi
27859
27860      if test -d "$path"; then
27861        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27862      else
27863        dir="`$DIRNAME "$path"`"
27864        base="`$BASENAME "$path"`"
27865        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27866      fi
27867    fi
27868  fi
27869
27870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27871$as_echo_n "checking for Boot JDK... " >&6; }
27872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27873$as_echo "$BOOT_JDK" >&6; }
27874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27875$as_echo_n "checking Boot JDK version... " >&6; }
27876            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27878$as_echo "$BOOT_JDK_VERSION" >&6; }
27879          fi # end check jdk version
27880        fi # end check javac
27881      fi # end check java
27882    fi # end check boot jdk found
27883  fi
27884
27885    done
27886  fi
27887
27888
27889    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27890    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27891      # Do we have a bin/java?
27892      if test ! -x "$BOOT_JDK/bin/java"; then
27893        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27895        BOOT_JDK_FOUND=no
27896      else
27897        # Do we have a bin/javac?
27898        if test ! -x "$BOOT_JDK/bin/javac"; then
27899          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27901          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27902$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27903          BOOT_JDK_FOUND=no
27904        else
27905          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27906          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27907
27908          # Extra M4 quote needed to protect [] in grep expression.
27909          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27910          if test "x$FOUND_CORRECT_VERSION" = x; then
27911            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27913            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27914$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27915            BOOT_JDK_FOUND=no
27916          else
27917            # We're done! :-)
27918            BOOT_JDK_FOUND=yes
27919
27920  # Only process if variable expands to non-empty
27921
27922  if test "x$BOOT_JDK" != x; then
27923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27924
27925  # Input might be given as Windows format, start by converting to
27926  # unix format.
27927  path="$BOOT_JDK"
27928  new_path=`$CYGPATH -u "$path"`
27929
27930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27933  # "foo.exe" is OK but "foo" is an error.
27934  #
27935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27936  # It is also a way to make sure we got the proper file name for the real test later on.
27937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27938  if test "x$test_shortpath" = x; then
27939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27940$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27941    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27942  fi
27943
27944  # Call helper function which possibly converts this using DOS-style short mode.
27945  # If so, the updated path is stored in $new_path.
27946
27947  input_path="$new_path"
27948  # Check if we need to convert this using DOS-style short mode. If the path
27949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27950  # take no chances and rewrite it.
27951  # Note: m4 eats our [], so we need to use [ and ] instead.
27952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27953  if test "x$has_forbidden_chars" != x; then
27954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27958      # Going to short mode and back again did indeed matter. Since short mode is
27959      # case insensitive, let's make it lowercase to improve readability.
27960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27961      # Now convert it back to Unix-style (cygpath)
27962      input_path=`$CYGPATH -u "$shortmode_path"`
27963      new_path="$input_path"
27964    fi
27965  fi
27966
27967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27968  if test "x$test_cygdrive_prefix" = x; then
27969    # As a simple fix, exclude /usr/bin since it's not a real path.
27970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27972      # a path prefixed by /cygdrive for fixpath to work.
27973      new_path="$CYGWIN_ROOT_PATH$input_path"
27974    fi
27975  fi
27976
27977
27978  if test "x$path" != "x$new_path"; then
27979    BOOT_JDK="$new_path"
27980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27981$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27982  fi
27983
27984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27985
27986  path="$BOOT_JDK"
27987  has_colon=`$ECHO $path | $GREP ^.:`
27988  new_path="$path"
27989  if test "x$has_colon" = x; then
27990    # Not in mixed or Windows style, start by that.
27991    new_path=`cmd //c echo $path`
27992  fi
27993
27994
27995  input_path="$new_path"
27996  # Check if we need to convert this using DOS-style short mode. If the path
27997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27998  # take no chances and rewrite it.
27999  # Note: m4 eats our [], so we need to use [ and ] instead.
28000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28001  if test "x$has_forbidden_chars" != x; then
28002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28004  fi
28005
28006
28007  windows_path="$new_path"
28008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28009    unix_path=`$CYGPATH -u "$windows_path"`
28010    new_path="$unix_path"
28011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28013    new_path="$unix_path"
28014  fi
28015
28016  if test "x$path" != "x$new_path"; then
28017    BOOT_JDK="$new_path"
28018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28019$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28020  fi
28021
28022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28024
28025    else
28026      # We're on a unix platform. Hooray! :)
28027      path="$BOOT_JDK"
28028      has_space=`$ECHO "$path" | $GREP " "`
28029      if test "x$has_space" != x; then
28030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28031$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28033      fi
28034
28035      # Use eval to expand a potential ~
28036      eval path="$path"
28037      if test ! -f "$path" && test ! -d "$path"; then
28038        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28039      fi
28040
28041      if test -d "$path"; then
28042        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28043      else
28044        dir="`$DIRNAME "$path"`"
28045        base="`$BASENAME "$path"`"
28046        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28047      fi
28048    fi
28049  fi
28050
28051            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28052$as_echo_n "checking for Boot JDK... " >&6; }
28053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28054$as_echo "$BOOT_JDK" >&6; }
28055            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28056$as_echo_n "checking Boot JDK version... " >&6; }
28057            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28059$as_echo "$BOOT_JDK_VERSION" >&6; }
28060          fi # end check jdk version
28061        fi # end check javac
28062      fi # end check java
28063    fi # end check boot jdk found
28064  fi
28065
28066  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28067
28068  if test "x$BOOT_JDK_FOUND" = xno; then
28069    # Now execute the test
28070
28071  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28072  BOOT_JDK_SUFFIX="/Contents/Home"
28073  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28074  if test "x$ALL_JDKS_FOUND" != x; then
28075    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28076
28077  if test "x$BOOT_JDK_FOUND" = xno; then
28078    # Now execute the test
28079
28080        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28081        if test -d "$BOOT_JDK"; then
28082          BOOT_JDK_FOUND=maybe
28083          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28084$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28085        fi
28086
28087
28088    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28089    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28090      # Do we have a bin/java?
28091      if test ! -x "$BOOT_JDK/bin/java"; then
28092        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28093$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28094        BOOT_JDK_FOUND=no
28095      else
28096        # Do we have a bin/javac?
28097        if test ! -x "$BOOT_JDK/bin/javac"; then
28098          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28099$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28100          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28101$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28102          BOOT_JDK_FOUND=no
28103        else
28104          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28105          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28106
28107          # Extra M4 quote needed to protect [] in grep expression.
28108          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28109          if test "x$FOUND_CORRECT_VERSION" = x; then
28110            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28112            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28113$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28114            BOOT_JDK_FOUND=no
28115          else
28116            # We're done! :-)
28117            BOOT_JDK_FOUND=yes
28118
28119  # Only process if variable expands to non-empty
28120
28121  if test "x$BOOT_JDK" != x; then
28122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28123
28124  # Input might be given as Windows format, start by converting to
28125  # unix format.
28126  path="$BOOT_JDK"
28127  new_path=`$CYGPATH -u "$path"`
28128
28129  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28130  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28131  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28132  # "foo.exe" is OK but "foo" is an error.
28133  #
28134  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28135  # It is also a way to make sure we got the proper file name for the real test later on.
28136  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28137  if test "x$test_shortpath" = x; then
28138    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28140    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28141  fi
28142
28143  # Call helper function which possibly converts this using DOS-style short mode.
28144  # If so, the updated path is stored in $new_path.
28145
28146  input_path="$new_path"
28147  # Check if we need to convert this using DOS-style short mode. If the path
28148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28149  # take no chances and rewrite it.
28150  # Note: m4 eats our [], so we need to use [ and ] instead.
28151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28152  if test "x$has_forbidden_chars" != x; then
28153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28154    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28155    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28156    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28157      # Going to short mode and back again did indeed matter. Since short mode is
28158      # case insensitive, let's make it lowercase to improve readability.
28159      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28160      # Now convert it back to Unix-style (cygpath)
28161      input_path=`$CYGPATH -u "$shortmode_path"`
28162      new_path="$input_path"
28163    fi
28164  fi
28165
28166  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28167  if test "x$test_cygdrive_prefix" = x; then
28168    # As a simple fix, exclude /usr/bin since it's not a real path.
28169    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28170      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28171      # a path prefixed by /cygdrive for fixpath to work.
28172      new_path="$CYGWIN_ROOT_PATH$input_path"
28173    fi
28174  fi
28175
28176
28177  if test "x$path" != "x$new_path"; then
28178    BOOT_JDK="$new_path"
28179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28181  fi
28182
28183    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184
28185  path="$BOOT_JDK"
28186  has_colon=`$ECHO $path | $GREP ^.:`
28187  new_path="$path"
28188  if test "x$has_colon" = x; then
28189    # Not in mixed or Windows style, start by that.
28190    new_path=`cmd //c echo $path`
28191  fi
28192
28193
28194  input_path="$new_path"
28195  # Check if we need to convert this using DOS-style short mode. If the path
28196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28197  # take no chances and rewrite it.
28198  # Note: m4 eats our [], so we need to use [ and ] instead.
28199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28200  if test "x$has_forbidden_chars" != x; then
28201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28203  fi
28204
28205
28206  windows_path="$new_path"
28207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28208    unix_path=`$CYGPATH -u "$windows_path"`
28209    new_path="$unix_path"
28210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28212    new_path="$unix_path"
28213  fi
28214
28215  if test "x$path" != "x$new_path"; then
28216    BOOT_JDK="$new_path"
28217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28218$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28219  fi
28220
28221  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28222  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28223
28224    else
28225      # We're on a unix platform. Hooray! :)
28226      path="$BOOT_JDK"
28227      has_space=`$ECHO "$path" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28231        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28232      fi
28233
28234      # Use eval to expand a potential ~
28235      eval path="$path"
28236      if test ! -f "$path" && test ! -d "$path"; then
28237        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28238      fi
28239
28240      if test -d "$path"; then
28241        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28242      else
28243        dir="`$DIRNAME "$path"`"
28244        base="`$BASENAME "$path"`"
28245        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28246      fi
28247    fi
28248  fi
28249
28250            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28251$as_echo_n "checking for Boot JDK... " >&6; }
28252            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28253$as_echo "$BOOT_JDK" >&6; }
28254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28255$as_echo_n "checking Boot JDK version... " >&6; }
28256            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28258$as_echo "$BOOT_JDK_VERSION" >&6; }
28259          fi # end check jdk version
28260        fi # end check javac
28261      fi # end check java
28262    fi # end check boot jdk found
28263  fi
28264
28265    done
28266  fi
28267
28268
28269    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28270    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28271      # Do we have a bin/java?
28272      if test ! -x "$BOOT_JDK/bin/java"; then
28273        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28275        BOOT_JDK_FOUND=no
28276      else
28277        # Do we have a bin/javac?
28278        if test ! -x "$BOOT_JDK/bin/javac"; then
28279          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28281          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28282$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28283          BOOT_JDK_FOUND=no
28284        else
28285          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28286          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28287
28288          # Extra M4 quote needed to protect [] in grep expression.
28289          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28290          if test "x$FOUND_CORRECT_VERSION" = x; then
28291            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28292$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28293            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28294$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28295            BOOT_JDK_FOUND=no
28296          else
28297            # We're done! :-)
28298            BOOT_JDK_FOUND=yes
28299
28300  # Only process if variable expands to non-empty
28301
28302  if test "x$BOOT_JDK" != x; then
28303    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28304
28305  # Input might be given as Windows format, start by converting to
28306  # unix format.
28307  path="$BOOT_JDK"
28308  new_path=`$CYGPATH -u "$path"`
28309
28310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28313  # "foo.exe" is OK but "foo" is an error.
28314  #
28315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28316  # It is also a way to make sure we got the proper file name for the real test later on.
28317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28318  if test "x$test_shortpath" = x; then
28319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28320$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28321    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28322  fi
28323
28324  # Call helper function which possibly converts this using DOS-style short mode.
28325  # If so, the updated path is stored in $new_path.
28326
28327  input_path="$new_path"
28328  # Check if we need to convert this using DOS-style short mode. If the path
28329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28330  # take no chances and rewrite it.
28331  # Note: m4 eats our [], so we need to use [ and ] instead.
28332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28333  if test "x$has_forbidden_chars" != x; then
28334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28338      # Going to short mode and back again did indeed matter. Since short mode is
28339      # case insensitive, let's make it lowercase to improve readability.
28340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28341      # Now convert it back to Unix-style (cygpath)
28342      input_path=`$CYGPATH -u "$shortmode_path"`
28343      new_path="$input_path"
28344    fi
28345  fi
28346
28347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28348  if test "x$test_cygdrive_prefix" = x; then
28349    # As a simple fix, exclude /usr/bin since it's not a real path.
28350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28352      # a path prefixed by /cygdrive for fixpath to work.
28353      new_path="$CYGWIN_ROOT_PATH$input_path"
28354    fi
28355  fi
28356
28357
28358  if test "x$path" != "x$new_path"; then
28359    BOOT_JDK="$new_path"
28360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28361$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28362  fi
28363
28364    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28365
28366  path="$BOOT_JDK"
28367  has_colon=`$ECHO $path | $GREP ^.:`
28368  new_path="$path"
28369  if test "x$has_colon" = x; then
28370    # Not in mixed or Windows style, start by that.
28371    new_path=`cmd //c echo $path`
28372  fi
28373
28374
28375  input_path="$new_path"
28376  # Check if we need to convert this using DOS-style short mode. If the path
28377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28378  # take no chances and rewrite it.
28379  # Note: m4 eats our [], so we need to use [ and ] instead.
28380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28381  if test "x$has_forbidden_chars" != x; then
28382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28384  fi
28385
28386
28387  windows_path="$new_path"
28388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28389    unix_path=`$CYGPATH -u "$windows_path"`
28390    new_path="$unix_path"
28391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28393    new_path="$unix_path"
28394  fi
28395
28396  if test "x$path" != "x$new_path"; then
28397    BOOT_JDK="$new_path"
28398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28400  fi
28401
28402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28404
28405    else
28406      # We're on a unix platform. Hooray! :)
28407      path="$BOOT_JDK"
28408      has_space=`$ECHO "$path" | $GREP " "`
28409      if test "x$has_space" != x; then
28410        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28412        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28413      fi
28414
28415      # Use eval to expand a potential ~
28416      eval path="$path"
28417      if test ! -f "$path" && test ! -d "$path"; then
28418        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28419      fi
28420
28421      if test -d "$path"; then
28422        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28423      else
28424        dir="`$DIRNAME "$path"`"
28425        base="`$BASENAME "$path"`"
28426        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28427      fi
28428    fi
28429  fi
28430
28431            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28432$as_echo_n "checking for Boot JDK... " >&6; }
28433            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28434$as_echo "$BOOT_JDK" >&6; }
28435            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28436$as_echo_n "checking Boot JDK version... " >&6; }
28437            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28439$as_echo "$BOOT_JDK_VERSION" >&6; }
28440          fi # end check jdk version
28441        fi # end check javac
28442      fi # end check java
28443    fi # end check boot jdk found
28444  fi
28445
28446
28447  if test "x$BOOT_JDK_FOUND" = xno; then
28448    # Now execute the test
28449
28450  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28451  BOOT_JDK_SUFFIX="/Contents/Home"
28452  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28453  if test "x$ALL_JDKS_FOUND" != x; then
28454    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28455
28456  if test "x$BOOT_JDK_FOUND" = xno; then
28457    # Now execute the test
28458
28459        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28460        if test -d "$BOOT_JDK"; then
28461          BOOT_JDK_FOUND=maybe
28462          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28463$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28464        fi
28465
28466
28467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28469      # Do we have a bin/java?
28470      if test ! -x "$BOOT_JDK/bin/java"; then
28471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28473        BOOT_JDK_FOUND=no
28474      else
28475        # Do we have a bin/javac?
28476        if test ! -x "$BOOT_JDK/bin/javac"; then
28477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28481          BOOT_JDK_FOUND=no
28482        else
28483          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28484          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28485
28486          # Extra M4 quote needed to protect [] in grep expression.
28487          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28488          if test "x$FOUND_CORRECT_VERSION" = x; then
28489            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28490$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28491            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28492$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28493            BOOT_JDK_FOUND=no
28494          else
28495            # We're done! :-)
28496            BOOT_JDK_FOUND=yes
28497
28498  # Only process if variable expands to non-empty
28499
28500  if test "x$BOOT_JDK" != x; then
28501    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28502
28503  # Input might be given as Windows format, start by converting to
28504  # unix format.
28505  path="$BOOT_JDK"
28506  new_path=`$CYGPATH -u "$path"`
28507
28508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28511  # "foo.exe" is OK but "foo" is an error.
28512  #
28513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28514  # It is also a way to make sure we got the proper file name for the real test later on.
28515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28516  if test "x$test_shortpath" = x; then
28517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28520  fi
28521
28522  # Call helper function which possibly converts this using DOS-style short mode.
28523  # If so, the updated path is stored in $new_path.
28524
28525  input_path="$new_path"
28526  # Check if we need to convert this using DOS-style short mode. If the path
28527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28528  # take no chances and rewrite it.
28529  # Note: m4 eats our [], so we need to use [ and ] instead.
28530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28531  if test "x$has_forbidden_chars" != x; then
28532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28533    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28536      # Going to short mode and back again did indeed matter. Since short mode is
28537      # case insensitive, let's make it lowercase to improve readability.
28538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28539      # Now convert it back to Unix-style (cygpath)
28540      input_path=`$CYGPATH -u "$shortmode_path"`
28541      new_path="$input_path"
28542    fi
28543  fi
28544
28545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28546  if test "x$test_cygdrive_prefix" = x; then
28547    # As a simple fix, exclude /usr/bin since it's not a real path.
28548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28550      # a path prefixed by /cygdrive for fixpath to work.
28551      new_path="$CYGWIN_ROOT_PATH$input_path"
28552    fi
28553  fi
28554
28555
28556  if test "x$path" != "x$new_path"; then
28557    BOOT_JDK="$new_path"
28558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28560  fi
28561
28562    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28563
28564  path="$BOOT_JDK"
28565  has_colon=`$ECHO $path | $GREP ^.:`
28566  new_path="$path"
28567  if test "x$has_colon" = x; then
28568    # Not in mixed or Windows style, start by that.
28569    new_path=`cmd //c echo $path`
28570  fi
28571
28572
28573  input_path="$new_path"
28574  # Check if we need to convert this using DOS-style short mode. If the path
28575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28576  # take no chances and rewrite it.
28577  # Note: m4 eats our [], so we need to use [ and ] instead.
28578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28579  if test "x$has_forbidden_chars" != x; then
28580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28582  fi
28583
28584
28585  windows_path="$new_path"
28586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28587    unix_path=`$CYGPATH -u "$windows_path"`
28588    new_path="$unix_path"
28589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28591    new_path="$unix_path"
28592  fi
28593
28594  if test "x$path" != "x$new_path"; then
28595    BOOT_JDK="$new_path"
28596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28598  fi
28599
28600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28602
28603    else
28604      # We're on a unix platform. Hooray! :)
28605      path="$BOOT_JDK"
28606      has_space=`$ECHO "$path" | $GREP " "`
28607      if test "x$has_space" != x; then
28608        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28610        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28611      fi
28612
28613      # Use eval to expand a potential ~
28614      eval path="$path"
28615      if test ! -f "$path" && test ! -d "$path"; then
28616        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28617      fi
28618
28619      if test -d "$path"; then
28620        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28621      else
28622        dir="`$DIRNAME "$path"`"
28623        base="`$BASENAME "$path"`"
28624        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28625      fi
28626    fi
28627  fi
28628
28629            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28630$as_echo_n "checking for Boot JDK... " >&6; }
28631            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28632$as_echo "$BOOT_JDK" >&6; }
28633            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28634$as_echo_n "checking Boot JDK version... " >&6; }
28635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28637$as_echo "$BOOT_JDK_VERSION" >&6; }
28638          fi # end check jdk version
28639        fi # end check javac
28640      fi # end check java
28641    fi # end check boot jdk found
28642  fi
28643
28644    done
28645  fi
28646
28647
28648    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28649    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28650      # Do we have a bin/java?
28651      if test ! -x "$BOOT_JDK/bin/java"; then
28652        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28654        BOOT_JDK_FOUND=no
28655      else
28656        # Do we have a bin/javac?
28657        if test ! -x "$BOOT_JDK/bin/javac"; then
28658          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28659$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28660          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28661$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28662          BOOT_JDK_FOUND=no
28663        else
28664          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28665          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28666
28667          # Extra M4 quote needed to protect [] in grep expression.
28668          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28669          if test "x$FOUND_CORRECT_VERSION" = x; then
28670            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28672            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28673$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28674            BOOT_JDK_FOUND=no
28675          else
28676            # We're done! :-)
28677            BOOT_JDK_FOUND=yes
28678
28679  # Only process if variable expands to non-empty
28680
28681  if test "x$BOOT_JDK" != x; then
28682    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28683
28684  # Input might be given as Windows format, start by converting to
28685  # unix format.
28686  path="$BOOT_JDK"
28687  new_path=`$CYGPATH -u "$path"`
28688
28689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28692  # "foo.exe" is OK but "foo" is an error.
28693  #
28694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28695  # It is also a way to make sure we got the proper file name for the real test later on.
28696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28697  if test "x$test_shortpath" = x; then
28698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28700    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28701  fi
28702
28703  # Call helper function which possibly converts this using DOS-style short mode.
28704  # If so, the updated path is stored in $new_path.
28705
28706  input_path="$new_path"
28707  # Check if we need to convert this using DOS-style short mode. If the path
28708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28709  # take no chances and rewrite it.
28710  # Note: m4 eats our [], so we need to use [ and ] instead.
28711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28712  if test "x$has_forbidden_chars" != x; then
28713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28717      # Going to short mode and back again did indeed matter. Since short mode is
28718      # case insensitive, let's make it lowercase to improve readability.
28719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28720      # Now convert it back to Unix-style (cygpath)
28721      input_path=`$CYGPATH -u "$shortmode_path"`
28722      new_path="$input_path"
28723    fi
28724  fi
28725
28726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28727  if test "x$test_cygdrive_prefix" = x; then
28728    # As a simple fix, exclude /usr/bin since it's not a real path.
28729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28731      # a path prefixed by /cygdrive for fixpath to work.
28732      new_path="$CYGWIN_ROOT_PATH$input_path"
28733    fi
28734  fi
28735
28736
28737  if test "x$path" != "x$new_path"; then
28738    BOOT_JDK="$new_path"
28739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28740$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28741  fi
28742
28743    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28744
28745  path="$BOOT_JDK"
28746  has_colon=`$ECHO $path | $GREP ^.:`
28747  new_path="$path"
28748  if test "x$has_colon" = x; then
28749    # Not in mixed or Windows style, start by that.
28750    new_path=`cmd //c echo $path`
28751  fi
28752
28753
28754  input_path="$new_path"
28755  # Check if we need to convert this using DOS-style short mode. If the path
28756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28757  # take no chances and rewrite it.
28758  # Note: m4 eats our [], so we need to use [ and ] instead.
28759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28760  if test "x$has_forbidden_chars" != x; then
28761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28763  fi
28764
28765
28766  windows_path="$new_path"
28767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28768    unix_path=`$CYGPATH -u "$windows_path"`
28769    new_path="$unix_path"
28770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28772    new_path="$unix_path"
28773  fi
28774
28775  if test "x$path" != "x$new_path"; then
28776    BOOT_JDK="$new_path"
28777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28779  fi
28780
28781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28783
28784    else
28785      # We're on a unix platform. Hooray! :)
28786      path="$BOOT_JDK"
28787      has_space=`$ECHO "$path" | $GREP " "`
28788      if test "x$has_space" != x; then
28789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28790$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28791        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28792      fi
28793
28794      # Use eval to expand a potential ~
28795      eval path="$path"
28796      if test ! -f "$path" && test ! -d "$path"; then
28797        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28798      fi
28799
28800      if test -d "$path"; then
28801        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28802      else
28803        dir="`$DIRNAME "$path"`"
28804        base="`$BASENAME "$path"`"
28805        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28806      fi
28807    fi
28808  fi
28809
28810            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28811$as_echo_n "checking for Boot JDK... " >&6; }
28812            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28813$as_echo "$BOOT_JDK" >&6; }
28814            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28815$as_echo_n "checking Boot JDK version... " >&6; }
28816            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28818$as_echo "$BOOT_JDK_VERSION" >&6; }
28819          fi # end check jdk version
28820        fi # end check javac
28821      fi # end check java
28822    fi # end check boot jdk found
28823  fi
28824
28825  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28826
28827  if test "x$BOOT_JDK_FOUND" = xno; then
28828    # Now execute the test
28829
28830  BOOT_JDK_PREFIX="/usr/lib/jvm"
28831  BOOT_JDK_SUFFIX=""
28832  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28833  if test "x$ALL_JDKS_FOUND" != x; then
28834    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28835
28836  if test "x$BOOT_JDK_FOUND" = xno; then
28837    # Now execute the test
28838
28839        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28840        if test -d "$BOOT_JDK"; then
28841          BOOT_JDK_FOUND=maybe
28842          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28843$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28844        fi
28845
28846
28847    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28848    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28849      # Do we have a bin/java?
28850      if test ! -x "$BOOT_JDK/bin/java"; then
28851        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28853        BOOT_JDK_FOUND=no
28854      else
28855        # Do we have a bin/javac?
28856        if test ! -x "$BOOT_JDK/bin/javac"; then
28857          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28858$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28859          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28860$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28861          BOOT_JDK_FOUND=no
28862        else
28863          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28864          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28865
28866          # Extra M4 quote needed to protect [] in grep expression.
28867          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28868          if test "x$FOUND_CORRECT_VERSION" = x; then
28869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28871            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28872$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28873            BOOT_JDK_FOUND=no
28874          else
28875            # We're done! :-)
28876            BOOT_JDK_FOUND=yes
28877
28878  # Only process if variable expands to non-empty
28879
28880  if test "x$BOOT_JDK" != x; then
28881    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28882
28883  # Input might be given as Windows format, start by converting to
28884  # unix format.
28885  path="$BOOT_JDK"
28886  new_path=`$CYGPATH -u "$path"`
28887
28888  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28889  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28890  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28891  # "foo.exe" is OK but "foo" is an error.
28892  #
28893  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28894  # It is also a way to make sure we got the proper file name for the real test later on.
28895  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28896  if test "x$test_shortpath" = x; then
28897    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28899    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28900  fi
28901
28902  # Call helper function which possibly converts this using DOS-style short mode.
28903  # If so, the updated path is stored in $new_path.
28904
28905  input_path="$new_path"
28906  # Check if we need to convert this using DOS-style short mode. If the path
28907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28908  # take no chances and rewrite it.
28909  # Note: m4 eats our [], so we need to use [ and ] instead.
28910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28911  if test "x$has_forbidden_chars" != x; then
28912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28913    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28914    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28915    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28916      # Going to short mode and back again did indeed matter. Since short mode is
28917      # case insensitive, let's make it lowercase to improve readability.
28918      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28919      # Now convert it back to Unix-style (cygpath)
28920      input_path=`$CYGPATH -u "$shortmode_path"`
28921      new_path="$input_path"
28922    fi
28923  fi
28924
28925  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28926  if test "x$test_cygdrive_prefix" = x; then
28927    # As a simple fix, exclude /usr/bin since it's not a real path.
28928    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28929      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28930      # a path prefixed by /cygdrive for fixpath to work.
28931      new_path="$CYGWIN_ROOT_PATH$input_path"
28932    fi
28933  fi
28934
28935
28936  if test "x$path" != "x$new_path"; then
28937    BOOT_JDK="$new_path"
28938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28939$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28940  fi
28941
28942    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28943
28944  path="$BOOT_JDK"
28945  has_colon=`$ECHO $path | $GREP ^.:`
28946  new_path="$path"
28947  if test "x$has_colon" = x; then
28948    # Not in mixed or Windows style, start by that.
28949    new_path=`cmd //c echo $path`
28950  fi
28951
28952
28953  input_path="$new_path"
28954  # Check if we need to convert this using DOS-style short mode. If the path
28955  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28956  # take no chances and rewrite it.
28957  # Note: m4 eats our [], so we need to use [ and ] instead.
28958  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28959  if test "x$has_forbidden_chars" != x; then
28960    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28961    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28962  fi
28963
28964
28965  windows_path="$new_path"
28966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28967    unix_path=`$CYGPATH -u "$windows_path"`
28968    new_path="$unix_path"
28969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28971    new_path="$unix_path"
28972  fi
28973
28974  if test "x$path" != "x$new_path"; then
28975    BOOT_JDK="$new_path"
28976    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28977$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28978  fi
28979
28980  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28981  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28982
28983    else
28984      # We're on a unix platform. Hooray! :)
28985      path="$BOOT_JDK"
28986      has_space=`$ECHO "$path" | $GREP " "`
28987      if test "x$has_space" != x; then
28988        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28990        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28991      fi
28992
28993      # Use eval to expand a potential ~
28994      eval path="$path"
28995      if test ! -f "$path" && test ! -d "$path"; then
28996        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28997      fi
28998
28999      if test -d "$path"; then
29000        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29001      else
29002        dir="`$DIRNAME "$path"`"
29003        base="`$BASENAME "$path"`"
29004        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29005      fi
29006    fi
29007  fi
29008
29009            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29010$as_echo_n "checking for Boot JDK... " >&6; }
29011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29012$as_echo "$BOOT_JDK" >&6; }
29013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29014$as_echo_n "checking Boot JDK version... " >&6; }
29015            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29017$as_echo "$BOOT_JDK_VERSION" >&6; }
29018          fi # end check jdk version
29019        fi # end check javac
29020      fi # end check java
29021    fi # end check boot jdk found
29022  fi
29023
29024    done
29025  fi
29026
29027
29028    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29029    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29030      # Do we have a bin/java?
29031      if test ! -x "$BOOT_JDK/bin/java"; then
29032        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29034        BOOT_JDK_FOUND=no
29035      else
29036        # Do we have a bin/javac?
29037        if test ! -x "$BOOT_JDK/bin/javac"; then
29038          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29040          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29041$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29042          BOOT_JDK_FOUND=no
29043        else
29044          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29045          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29046
29047          # Extra M4 quote needed to protect [] in grep expression.
29048          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29049          if test "x$FOUND_CORRECT_VERSION" = x; then
29050            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29051$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29052            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29053$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29054            BOOT_JDK_FOUND=no
29055          else
29056            # We're done! :-)
29057            BOOT_JDK_FOUND=yes
29058
29059  # Only process if variable expands to non-empty
29060
29061  if test "x$BOOT_JDK" != x; then
29062    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29063
29064  # Input might be given as Windows format, start by converting to
29065  # unix format.
29066  path="$BOOT_JDK"
29067  new_path=`$CYGPATH -u "$path"`
29068
29069  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29070  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29071  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29072  # "foo.exe" is OK but "foo" is an error.
29073  #
29074  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29075  # It is also a way to make sure we got the proper file name for the real test later on.
29076  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29077  if test "x$test_shortpath" = x; then
29078    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29079$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29080    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29081  fi
29082
29083  # Call helper function which possibly converts this using DOS-style short mode.
29084  # If so, the updated path is stored in $new_path.
29085
29086  input_path="$new_path"
29087  # Check if we need to convert this using DOS-style short mode. If the path
29088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29089  # take no chances and rewrite it.
29090  # Note: m4 eats our [], so we need to use [ and ] instead.
29091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29092  if test "x$has_forbidden_chars" != x; then
29093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29094    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29095    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29096    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29097      # Going to short mode and back again did indeed matter. Since short mode is
29098      # case insensitive, let's make it lowercase to improve readability.
29099      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29100      # Now convert it back to Unix-style (cygpath)
29101      input_path=`$CYGPATH -u "$shortmode_path"`
29102      new_path="$input_path"
29103    fi
29104  fi
29105
29106  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29107  if test "x$test_cygdrive_prefix" = x; then
29108    # As a simple fix, exclude /usr/bin since it's not a real path.
29109    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29110      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29111      # a path prefixed by /cygdrive for fixpath to work.
29112      new_path="$CYGWIN_ROOT_PATH$input_path"
29113    fi
29114  fi
29115
29116
29117  if test "x$path" != "x$new_path"; then
29118    BOOT_JDK="$new_path"
29119    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29120$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29121  fi
29122
29123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124
29125  path="$BOOT_JDK"
29126  has_colon=`$ECHO $path | $GREP ^.:`
29127  new_path="$path"
29128  if test "x$has_colon" = x; then
29129    # Not in mixed or Windows style, start by that.
29130    new_path=`cmd //c echo $path`
29131  fi
29132
29133
29134  input_path="$new_path"
29135  # Check if we need to convert this using DOS-style short mode. If the path
29136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29137  # take no chances and rewrite it.
29138  # Note: m4 eats our [], so we need to use [ and ] instead.
29139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29140  if test "x$has_forbidden_chars" != x; then
29141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29143  fi
29144
29145
29146  windows_path="$new_path"
29147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29148    unix_path=`$CYGPATH -u "$windows_path"`
29149    new_path="$unix_path"
29150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29152    new_path="$unix_path"
29153  fi
29154
29155  if test "x$path" != "x$new_path"; then
29156    BOOT_JDK="$new_path"
29157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29158$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29159  fi
29160
29161  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29162  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29163
29164    else
29165      # We're on a unix platform. Hooray! :)
29166      path="$BOOT_JDK"
29167      has_space=`$ECHO "$path" | $GREP " "`
29168      if test "x$has_space" != x; then
29169        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29170$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29171        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29172      fi
29173
29174      # Use eval to expand a potential ~
29175      eval path="$path"
29176      if test ! -f "$path" && test ! -d "$path"; then
29177        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29178      fi
29179
29180      if test -d "$path"; then
29181        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29182      else
29183        dir="`$DIRNAME "$path"`"
29184        base="`$BASENAME "$path"`"
29185        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29186      fi
29187    fi
29188  fi
29189
29190            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29191$as_echo_n "checking for Boot JDK... " >&6; }
29192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29193$as_echo "$BOOT_JDK" >&6; }
29194            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29195$as_echo_n "checking Boot JDK version... " >&6; }
29196            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29198$as_echo "$BOOT_JDK_VERSION" >&6; }
29199          fi # end check jdk version
29200        fi # end check javac
29201      fi # end check java
29202    fi # end check boot jdk found
29203  fi
29204
29205  fi
29206
29207
29208    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29209    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29210      # Do we have a bin/java?
29211      if test ! -x "$BOOT_JDK/bin/java"; then
29212        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29214        BOOT_JDK_FOUND=no
29215      else
29216        # Do we have a bin/javac?
29217        if test ! -x "$BOOT_JDK/bin/javac"; then
29218          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29220          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29221$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29222          BOOT_JDK_FOUND=no
29223        else
29224          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29225          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29226
29227          # Extra M4 quote needed to protect [] in grep expression.
29228          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29229          if test "x$FOUND_CORRECT_VERSION" = x; then
29230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29232            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29233$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29234            BOOT_JDK_FOUND=no
29235          else
29236            # We're done! :-)
29237            BOOT_JDK_FOUND=yes
29238
29239  # Only process if variable expands to non-empty
29240
29241  if test "x$BOOT_JDK" != x; then
29242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29243
29244  # Input might be given as Windows format, start by converting to
29245  # unix format.
29246  path="$BOOT_JDK"
29247  new_path=`$CYGPATH -u "$path"`
29248
29249  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29250  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29251  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29252  # "foo.exe" is OK but "foo" is an error.
29253  #
29254  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29255  # It is also a way to make sure we got the proper file name for the real test later on.
29256  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29257  if test "x$test_shortpath" = x; then
29258    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29259$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29260    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29261  fi
29262
29263  # Call helper function which possibly converts this using DOS-style short mode.
29264  # If so, the updated path is stored in $new_path.
29265
29266  input_path="$new_path"
29267  # Check if we need to convert this using DOS-style short mode. If the path
29268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29269  # take no chances and rewrite it.
29270  # Note: m4 eats our [], so we need to use [ and ] instead.
29271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29272  if test "x$has_forbidden_chars" != x; then
29273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29277      # Going to short mode and back again did indeed matter. Since short mode is
29278      # case insensitive, let's make it lowercase to improve readability.
29279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29280      # Now convert it back to Unix-style (cygpath)
29281      input_path=`$CYGPATH -u "$shortmode_path"`
29282      new_path="$input_path"
29283    fi
29284  fi
29285
29286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29287  if test "x$test_cygdrive_prefix" = x; then
29288    # As a simple fix, exclude /usr/bin since it's not a real path.
29289    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29291      # a path prefixed by /cygdrive for fixpath to work.
29292      new_path="$CYGWIN_ROOT_PATH$input_path"
29293    fi
29294  fi
29295
29296
29297  if test "x$path" != "x$new_path"; then
29298    BOOT_JDK="$new_path"
29299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29300$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29301  fi
29302
29303    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29304
29305  path="$BOOT_JDK"
29306  has_colon=`$ECHO $path | $GREP ^.:`
29307  new_path="$path"
29308  if test "x$has_colon" = x; then
29309    # Not in mixed or Windows style, start by that.
29310    new_path=`cmd //c echo $path`
29311  fi
29312
29313
29314  input_path="$new_path"
29315  # Check if we need to convert this using DOS-style short mode. If the path
29316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29317  # take no chances and rewrite it.
29318  # Note: m4 eats our [], so we need to use [ and ] instead.
29319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29320  if test "x$has_forbidden_chars" != x; then
29321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29322    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29323  fi
29324
29325
29326  windows_path="$new_path"
29327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29328    unix_path=`$CYGPATH -u "$windows_path"`
29329    new_path="$unix_path"
29330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29332    new_path="$unix_path"
29333  fi
29334
29335  if test "x$path" != "x$new_path"; then
29336    BOOT_JDK="$new_path"
29337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29339  fi
29340
29341  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29342  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29343
29344    else
29345      # We're on a unix platform. Hooray! :)
29346      path="$BOOT_JDK"
29347      has_space=`$ECHO "$path" | $GREP " "`
29348      if test "x$has_space" != x; then
29349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29350$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29351        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29352      fi
29353
29354      # Use eval to expand a potential ~
29355      eval path="$path"
29356      if test ! -f "$path" && test ! -d "$path"; then
29357        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29358      fi
29359
29360      if test -d "$path"; then
29361        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29362      else
29363        dir="`$DIRNAME "$path"`"
29364        base="`$BASENAME "$path"`"
29365        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29366      fi
29367    fi
29368  fi
29369
29370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29371$as_echo_n "checking for Boot JDK... " >&6; }
29372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29373$as_echo "$BOOT_JDK" >&6; }
29374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29375$as_echo_n "checking Boot JDK version... " >&6; }
29376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29378$as_echo "$BOOT_JDK_VERSION" >&6; }
29379          fi # end check jdk version
29380        fi # end check javac
29381      fi # end check java
29382    fi # end check boot jdk found
29383  fi
29384
29385
29386  # If we haven't found anything yet, we've truly lost. Give up.
29387  if test "x$BOOT_JDK_FOUND" = xno; then
29388
29389  # Print a helpful message on how to acquire the necessary build dependency.
29390  # openjdk is the help tag: freetype, cups, alsa etc
29391  MISSING_DEPENDENCY=openjdk
29392
29393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29394    cygwin_help $MISSING_DEPENDENCY
29395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29396    msys_help $MISSING_DEPENDENCY
29397  else
29398    PKGHANDLER_COMMAND=
29399
29400    case $PKGHANDLER in
29401      apt-get)
29402        apt_help     $MISSING_DEPENDENCY ;;
29403      yum)
29404        yum_help     $MISSING_DEPENDENCY ;;
29405      port)
29406        port_help    $MISSING_DEPENDENCY ;;
29407      pkgutil)
29408        pkgutil_help $MISSING_DEPENDENCY ;;
29409      pkgadd)
29410        pkgadd_help  $MISSING_DEPENDENCY ;;
29411    esac
29412
29413    if test "x$PKGHANDLER_COMMAND" != x; then
29414      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29415    fi
29416  fi
29417
29418    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29419$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29420    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29421$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29422    as_fn_error $? "Cannot continue" "$LINENO" 5
29423  fi
29424
29425
29426
29427  # Setup tools from the Boot JDK.
29428
29429  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29430
29431  # Publish this variable in the help.
29432
29433
29434  if [ -z "${JAVA+x}" ]; then
29435    # The variable is not set by user, try to locate tool using the code snippet
29436
29437      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29438$as_echo_n "checking for java in Boot JDK... " >&6; }
29439      JAVA=$BOOT_JDK/bin/java
29440      if test ! -x $JAVA; then
29441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29442$as_echo "not found" >&6; }
29443        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29444$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29445        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29446      fi
29447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29448$as_echo "ok" >&6; }
29449
29450
29451  else
29452    # The variable is set, but is it from the command line or the environment?
29453
29454    # Try to remove the string !JAVA! from our list.
29455    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29456    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29457      # If it failed, the variable was not from the command line. Ignore it,
29458      # but warn the user (except for BASH, which is always set by the calling BASH).
29459      if test "xJAVA" != xBASH; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29461$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29462      fi
29463      # Try to locate tool using the code snippet
29464
29465      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29466$as_echo_n "checking for java in Boot JDK... " >&6; }
29467      JAVA=$BOOT_JDK/bin/java
29468      if test ! -x $JAVA; then
29469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29470$as_echo "not found" >&6; }
29471        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29472$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29473        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29474      fi
29475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29476$as_echo "ok" >&6; }
29477
29478
29479    else
29480      # If it succeeded, then it was overridden by the user. We will use it
29481      # for the tool.
29482
29483      # First remove it from the list of overridden variables, so we can test
29484      # for unknown variables in the end.
29485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29486
29487      # Check if we try to supply an empty value
29488      if test "x$JAVA" = x; then
29489        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29490$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29492$as_echo_n "checking for JAVA... " >&6; }
29493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29494$as_echo "disabled" >&6; }
29495      else
29496        # Check if the provided tool contains a complete path.
29497        tool_specified="$JAVA"
29498        tool_basename="${tool_specified##*/}"
29499        if test "x$tool_basename" = "x$tool_specified"; then
29500          # A command without a complete path is provided, search $PATH.
29501          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29502$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29503          # Extract the first word of "$tool_basename", so it can be a program name with args.
29504set dummy $tool_basename; ac_word=$2
29505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29506$as_echo_n "checking for $ac_word... " >&6; }
29507if ${ac_cv_path_JAVA+:} false; then :
29508  $as_echo_n "(cached) " >&6
29509else
29510  case $JAVA in
29511  [\\/]* | ?:[\\/]*)
29512  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29513  ;;
29514  *)
29515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29516for as_dir in $PATH
29517do
29518  IFS=$as_save_IFS
29519  test -z "$as_dir" && as_dir=.
29520    for ac_exec_ext in '' $ac_executable_extensions; do
29521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29522    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29524    break 2
29525  fi
29526done
29527  done
29528IFS=$as_save_IFS
29529
29530  ;;
29531esac
29532fi
29533JAVA=$ac_cv_path_JAVA
29534if test -n "$JAVA"; then
29535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29536$as_echo "$JAVA" >&6; }
29537else
29538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29539$as_echo "no" >&6; }
29540fi
29541
29542
29543          if test "x$JAVA" = x; then
29544            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29545          fi
29546        else
29547          # Otherwise we believe it is a complete path. Use it as it is.
29548          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29549$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29550          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29551$as_echo_n "checking for JAVA... " >&6; }
29552          if test ! -x "$tool_specified"; then
29553            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29554$as_echo "not found" >&6; }
29555            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29556          fi
29557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29558$as_echo "$tool_specified" >&6; }
29559        fi
29560      fi
29561    fi
29562
29563  fi
29564
29565
29566
29567  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29568
29569  # Publish this variable in the help.
29570
29571
29572  if [ -z "${JAVAC+x}" ]; then
29573    # The variable is not set by user, try to locate tool using the code snippet
29574
29575      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29576$as_echo_n "checking for javac in Boot JDK... " >&6; }
29577      JAVAC=$BOOT_JDK/bin/javac
29578      if test ! -x $JAVAC; then
29579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29580$as_echo "not found" >&6; }
29581        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29582$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29583        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29584      fi
29585      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29586$as_echo "ok" >&6; }
29587
29588
29589  else
29590    # The variable is set, but is it from the command line or the environment?
29591
29592    # Try to remove the string !JAVAC! from our list.
29593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29595      # If it failed, the variable was not from the command line. Ignore it,
29596      # but warn the user (except for BASH, which is always set by the calling BASH).
29597      if test "xJAVAC" != xBASH; then
29598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29599$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29600      fi
29601      # Try to locate tool using the code snippet
29602
29603      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29604$as_echo_n "checking for javac in Boot JDK... " >&6; }
29605      JAVAC=$BOOT_JDK/bin/javac
29606      if test ! -x $JAVAC; then
29607        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29608$as_echo "not found" >&6; }
29609        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29610$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29611        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29612      fi
29613      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29614$as_echo "ok" >&6; }
29615
29616
29617    else
29618      # If it succeeded, then it was overridden by the user. We will use it
29619      # for the tool.
29620
29621      # First remove it from the list of overridden variables, so we can test
29622      # for unknown variables in the end.
29623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29624
29625      # Check if we try to supply an empty value
29626      if test "x$JAVAC" = x; then
29627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29628$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29630$as_echo_n "checking for JAVAC... " >&6; }
29631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29632$as_echo "disabled" >&6; }
29633      else
29634        # Check if the provided tool contains a complete path.
29635        tool_specified="$JAVAC"
29636        tool_basename="${tool_specified##*/}"
29637        if test "x$tool_basename" = "x$tool_specified"; then
29638          # A command without a complete path is provided, search $PATH.
29639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29640$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29641          # Extract the first word of "$tool_basename", so it can be a program name with args.
29642set dummy $tool_basename; ac_word=$2
29643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29644$as_echo_n "checking for $ac_word... " >&6; }
29645if ${ac_cv_path_JAVAC+:} false; then :
29646  $as_echo_n "(cached) " >&6
29647else
29648  case $JAVAC in
29649  [\\/]* | ?:[\\/]*)
29650  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29651  ;;
29652  *)
29653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29654for as_dir in $PATH
29655do
29656  IFS=$as_save_IFS
29657  test -z "$as_dir" && as_dir=.
29658    for ac_exec_ext in '' $ac_executable_extensions; do
29659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29660    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29662    break 2
29663  fi
29664done
29665  done
29666IFS=$as_save_IFS
29667
29668  ;;
29669esac
29670fi
29671JAVAC=$ac_cv_path_JAVAC
29672if test -n "$JAVAC"; then
29673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29674$as_echo "$JAVAC" >&6; }
29675else
29676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29677$as_echo "no" >&6; }
29678fi
29679
29680
29681          if test "x$JAVAC" = x; then
29682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29683          fi
29684        else
29685          # Otherwise we believe it is a complete path. Use it as it is.
29686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29687$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29689$as_echo_n "checking for JAVAC... " >&6; }
29690          if test ! -x "$tool_specified"; then
29691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29692$as_echo "not found" >&6; }
29693            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29694          fi
29695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29696$as_echo "$tool_specified" >&6; }
29697        fi
29698      fi
29699    fi
29700
29701  fi
29702
29703
29704
29705  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29706
29707  # Publish this variable in the help.
29708
29709
29710  if [ -z "${JAVAH+x}" ]; then
29711    # The variable is not set by user, try to locate tool using the code snippet
29712
29713      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29714$as_echo_n "checking for javah in Boot JDK... " >&6; }
29715      JAVAH=$BOOT_JDK/bin/javah
29716      if test ! -x $JAVAH; then
29717        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29718$as_echo "not found" >&6; }
29719        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29720$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29721        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29722      fi
29723      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29724$as_echo "ok" >&6; }
29725
29726
29727  else
29728    # The variable is set, but is it from the command line or the environment?
29729
29730    # Try to remove the string !JAVAH! from our list.
29731    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29732    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29733      # If it failed, the variable was not from the command line. Ignore it,
29734      # but warn the user (except for BASH, which is always set by the calling BASH).
29735      if test "xJAVAH" != xBASH; then
29736        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29737$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29738      fi
29739      # Try to locate tool using the code snippet
29740
29741      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29742$as_echo_n "checking for javah in Boot JDK... " >&6; }
29743      JAVAH=$BOOT_JDK/bin/javah
29744      if test ! -x $JAVAH; then
29745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29746$as_echo "not found" >&6; }
29747        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29748$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29749        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29750      fi
29751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29752$as_echo "ok" >&6; }
29753
29754
29755    else
29756      # If it succeeded, then it was overridden by the user. We will use it
29757      # for the tool.
29758
29759      # First remove it from the list of overridden variables, so we can test
29760      # for unknown variables in the end.
29761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29762
29763      # Check if we try to supply an empty value
29764      if test "x$JAVAH" = x; then
29765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29766$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29768$as_echo_n "checking for JAVAH... " >&6; }
29769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29770$as_echo "disabled" >&6; }
29771      else
29772        # Check if the provided tool contains a complete path.
29773        tool_specified="$JAVAH"
29774        tool_basename="${tool_specified##*/}"
29775        if test "x$tool_basename" = "x$tool_specified"; then
29776          # A command without a complete path is provided, search $PATH.
29777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29778$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29779          # Extract the first word of "$tool_basename", so it can be a program name with args.
29780set dummy $tool_basename; ac_word=$2
29781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29782$as_echo_n "checking for $ac_word... " >&6; }
29783if ${ac_cv_path_JAVAH+:} false; then :
29784  $as_echo_n "(cached) " >&6
29785else
29786  case $JAVAH in
29787  [\\/]* | ?:[\\/]*)
29788  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29789  ;;
29790  *)
29791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29792for as_dir in $PATH
29793do
29794  IFS=$as_save_IFS
29795  test -z "$as_dir" && as_dir=.
29796    for ac_exec_ext in '' $ac_executable_extensions; do
29797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29798    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29800    break 2
29801  fi
29802done
29803  done
29804IFS=$as_save_IFS
29805
29806  ;;
29807esac
29808fi
29809JAVAH=$ac_cv_path_JAVAH
29810if test -n "$JAVAH"; then
29811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29812$as_echo "$JAVAH" >&6; }
29813else
29814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29815$as_echo "no" >&6; }
29816fi
29817
29818
29819          if test "x$JAVAH" = x; then
29820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29821          fi
29822        else
29823          # Otherwise we believe it is a complete path. Use it as it is.
29824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29825$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29827$as_echo_n "checking for JAVAH... " >&6; }
29828          if test ! -x "$tool_specified"; then
29829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29830$as_echo "not found" >&6; }
29831            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29832          fi
29833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29834$as_echo "$tool_specified" >&6; }
29835        fi
29836      fi
29837    fi
29838
29839  fi
29840
29841
29842
29843  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29844
29845  # Publish this variable in the help.
29846
29847
29848  if [ -z "${JAR+x}" ]; then
29849    # The variable is not set by user, try to locate tool using the code snippet
29850
29851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29852$as_echo_n "checking for jar in Boot JDK... " >&6; }
29853      JAR=$BOOT_JDK/bin/jar
29854      if test ! -x $JAR; then
29855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29856$as_echo "not found" >&6; }
29857        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29858$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29859        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29860      fi
29861      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29862$as_echo "ok" >&6; }
29863
29864
29865  else
29866    # The variable is set, but is it from the command line or the environment?
29867
29868    # Try to remove the string !JAR! from our list.
29869    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29870    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29871      # If it failed, the variable was not from the command line. Ignore it,
29872      # but warn the user (except for BASH, which is always set by the calling BASH).
29873      if test "xJAR" != xBASH; then
29874        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29875$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29876      fi
29877      # Try to locate tool using the code snippet
29878
29879      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29880$as_echo_n "checking for jar in Boot JDK... " >&6; }
29881      JAR=$BOOT_JDK/bin/jar
29882      if test ! -x $JAR; then
29883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29884$as_echo "not found" >&6; }
29885        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29886$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29887        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29888      fi
29889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29890$as_echo "ok" >&6; }
29891
29892
29893    else
29894      # If it succeeded, then it was overridden by the user. We will use it
29895      # for the tool.
29896
29897      # First remove it from the list of overridden variables, so we can test
29898      # for unknown variables in the end.
29899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29900
29901      # Check if we try to supply an empty value
29902      if test "x$JAR" = x; then
29903        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29904$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29906$as_echo_n "checking for JAR... " >&6; }
29907        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29908$as_echo "disabled" >&6; }
29909      else
29910        # Check if the provided tool contains a complete path.
29911        tool_specified="$JAR"
29912        tool_basename="${tool_specified##*/}"
29913        if test "x$tool_basename" = "x$tool_specified"; then
29914          # A command without a complete path is provided, search $PATH.
29915          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29916$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29917          # Extract the first word of "$tool_basename", so it can be a program name with args.
29918set dummy $tool_basename; ac_word=$2
29919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29920$as_echo_n "checking for $ac_word... " >&6; }
29921if ${ac_cv_path_JAR+:} false; then :
29922  $as_echo_n "(cached) " >&6
29923else
29924  case $JAR in
29925  [\\/]* | ?:[\\/]*)
29926  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29927  ;;
29928  *)
29929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29930for as_dir in $PATH
29931do
29932  IFS=$as_save_IFS
29933  test -z "$as_dir" && as_dir=.
29934    for ac_exec_ext in '' $ac_executable_extensions; do
29935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29936    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29938    break 2
29939  fi
29940done
29941  done
29942IFS=$as_save_IFS
29943
29944  ;;
29945esac
29946fi
29947JAR=$ac_cv_path_JAR
29948if test -n "$JAR"; then
29949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29950$as_echo "$JAR" >&6; }
29951else
29952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29953$as_echo "no" >&6; }
29954fi
29955
29956
29957          if test "x$JAR" = x; then
29958            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29959          fi
29960        else
29961          # Otherwise we believe it is a complete path. Use it as it is.
29962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29963$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29964          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29965$as_echo_n "checking for JAR... " >&6; }
29966          if test ! -x "$tool_specified"; then
29967            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29968$as_echo "not found" >&6; }
29969            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29970          fi
29971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29972$as_echo "$tool_specified" >&6; }
29973        fi
29974      fi
29975    fi
29976
29977  fi
29978
29979
29980
29981  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29982
29983  # Publish this variable in the help.
29984
29985
29986  if [ -z "${JARSIGNER+x}" ]; then
29987    # The variable is not set by user, try to locate tool using the code snippet
29988
29989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29990$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29991      JARSIGNER=$BOOT_JDK/bin/jarsigner
29992      if test ! -x $JARSIGNER; then
29993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29994$as_echo "not found" >&6; }
29995        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29996$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29997        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
29998      fi
29999      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30000$as_echo "ok" >&6; }
30001
30002
30003  else
30004    # The variable is set, but is it from the command line or the environment?
30005
30006    # Try to remove the string !JARSIGNER! from our list.
30007    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30008    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30009      # If it failed, the variable was not from the command line. Ignore it,
30010      # but warn the user (except for BASH, which is always set by the calling BASH).
30011      if test "xJARSIGNER" != xBASH; then
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30013$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30014      fi
30015      # Try to locate tool using the code snippet
30016
30017      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30018$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30019      JARSIGNER=$BOOT_JDK/bin/jarsigner
30020      if test ! -x $JARSIGNER; then
30021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30022$as_echo "not found" >&6; }
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30024$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30025        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30026      fi
30027      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30028$as_echo "ok" >&6; }
30029
30030
30031    else
30032      # If it succeeded, then it was overridden by the user. We will use it
30033      # for the tool.
30034
30035      # First remove it from the list of overridden variables, so we can test
30036      # for unknown variables in the end.
30037      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30038
30039      # Check if we try to supply an empty value
30040      if test "x$JARSIGNER" = x; then
30041        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30042$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30044$as_echo_n "checking for JARSIGNER... " >&6; }
30045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30046$as_echo "disabled" >&6; }
30047      else
30048        # Check if the provided tool contains a complete path.
30049        tool_specified="$JARSIGNER"
30050        tool_basename="${tool_specified##*/}"
30051        if test "x$tool_basename" = "x$tool_specified"; then
30052          # A command without a complete path is provided, search $PATH.
30053          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30054$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30055          # Extract the first word of "$tool_basename", so it can be a program name with args.
30056set dummy $tool_basename; ac_word=$2
30057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30058$as_echo_n "checking for $ac_word... " >&6; }
30059if ${ac_cv_path_JARSIGNER+:} false; then :
30060  $as_echo_n "(cached) " >&6
30061else
30062  case $JARSIGNER in
30063  [\\/]* | ?:[\\/]*)
30064  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30065  ;;
30066  *)
30067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30068for as_dir in $PATH
30069do
30070  IFS=$as_save_IFS
30071  test -z "$as_dir" && as_dir=.
30072    for ac_exec_ext in '' $ac_executable_extensions; do
30073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30074    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30076    break 2
30077  fi
30078done
30079  done
30080IFS=$as_save_IFS
30081
30082  ;;
30083esac
30084fi
30085JARSIGNER=$ac_cv_path_JARSIGNER
30086if test -n "$JARSIGNER"; then
30087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30088$as_echo "$JARSIGNER" >&6; }
30089else
30090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30091$as_echo "no" >&6; }
30092fi
30093
30094
30095          if test "x$JARSIGNER" = x; then
30096            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30097          fi
30098        else
30099          # Otherwise we believe it is a complete path. Use it as it is.
30100          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30101$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30102          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30103$as_echo_n "checking for JARSIGNER... " >&6; }
30104          if test ! -x "$tool_specified"; then
30105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30106$as_echo "not found" >&6; }
30107            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30108          fi
30109          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30110$as_echo "$tool_specified" >&6; }
30111        fi
30112      fi
30113    fi
30114
30115  fi
30116
30117
30118
30119  # Finally, set some other options...
30120
30121  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30122  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30123
30124
30125
30126  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30127  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30128  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30129  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30130  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30131  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30132    dummy="$dummy -Xpatch:foo=bar"
30133    JVM_ARG_OK=true
30134  else
30135    $ECHO "Arg failed:" >&5
30136    $ECHO "$OUTPUT" >&5
30137    JVM_ARG_OK=false
30138  fi
30139
30140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30141$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30142  if test "x$JVM_ARG_OK" = "xtrue"; then
30143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30144$as_echo "yes" >&6; }
30145    BOOT_JDK_MODULAR="true"
30146  else
30147    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30148$as_echo "no" >&6; }
30149    BOOT_JDK_MODULAR="false"
30150  fi
30151
30152
30153
30154
30155  # Check if the boot jdk is 32 or 64 bit
30156  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30157    BOOT_JDK_BITS="64"
30158  else
30159    BOOT_JDK_BITS="32"
30160  fi
30161  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30162$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30164$as_echo "$BOOT_JDK_BITS" >&6; }
30165
30166
30167
30168
30169# Check whether --with-build-jdk was given.
30170if test "${with_build_jdk+set}" = set; then :
30171  withval=$with_build_jdk;
30172fi
30173
30174
30175  CREATE_BUILDJDK=false
30176  EXTERNAL_BUILDJDK=false
30177  BUILD_JDK_FOUND="no"
30178  if test "x$with_build_jdk" != "x"; then
30179
30180  if test "x$BUILD_JDK_FOUND" = xno; then
30181    # Execute the test
30182
30183       if test "x$with_build_jdk" != x; then
30184         BUILD_JDK=$with_build_jdk
30185         BUILD_JDK_FOUND=maybe
30186         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30187$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30188       fi
30189
30190    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30191    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30192      # Do we have a bin/java?
30193      if test ! -x "$BUILD_JDK/bin/java"; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30195$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30196        BUILD_JDK_FOUND=no
30197      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30199$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30200        BUILD_JDK_FOUND=no
30201      elif test ! -x "$BUILD_JDK/bin/javac"; then
30202        # Do we have a bin/javac?
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30204$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30205        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30206$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30207        BUILD_JDK_FOUND=no
30208      else
30209        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30210        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30211
30212        # Extra M4 quote needed to protect [] in grep expression.
30213        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30214        if test "x$FOUND_CORRECT_VERSION" = x; then
30215          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30216$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30217          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30218$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30219          BUILD_JDK_FOUND=no
30220        else
30221          # We're done!
30222          BUILD_JDK_FOUND=yes
30223
30224  # Only process if variable expands to non-empty
30225
30226  if test "x$BUILD_JDK" != x; then
30227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30228
30229  # Input might be given as Windows format, start by converting to
30230  # unix format.
30231  path="$BUILD_JDK"
30232  new_path=`$CYGPATH -u "$path"`
30233
30234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30237  # "foo.exe" is OK but "foo" is an error.
30238  #
30239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30240  # It is also a way to make sure we got the proper file name for the real test later on.
30241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30242  if test "x$test_shortpath" = x; then
30243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30244$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30245    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30246  fi
30247
30248  # Call helper function which possibly converts this using DOS-style short mode.
30249  # If so, the updated path is stored in $new_path.
30250
30251  input_path="$new_path"
30252  # Check if we need to convert this using DOS-style short mode. If the path
30253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30254  # take no chances and rewrite it.
30255  # Note: m4 eats our [], so we need to use [ and ] instead.
30256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30257  if test "x$has_forbidden_chars" != x; then
30258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30262      # Going to short mode and back again did indeed matter. Since short mode is
30263      # case insensitive, let's make it lowercase to improve readability.
30264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30265      # Now convert it back to Unix-style (cygpath)
30266      input_path=`$CYGPATH -u "$shortmode_path"`
30267      new_path="$input_path"
30268    fi
30269  fi
30270
30271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30272  if test "x$test_cygdrive_prefix" = x; then
30273    # As a simple fix, exclude /usr/bin since it's not a real path.
30274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30276      # a path prefixed by /cygdrive for fixpath to work.
30277      new_path="$CYGWIN_ROOT_PATH$input_path"
30278    fi
30279  fi
30280
30281
30282  if test "x$path" != "x$new_path"; then
30283    BUILD_JDK="$new_path"
30284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30285$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30286  fi
30287
30288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30289
30290  path="$BUILD_JDK"
30291  has_colon=`$ECHO $path | $GREP ^.:`
30292  new_path="$path"
30293  if test "x$has_colon" = x; then
30294    # Not in mixed or Windows style, start by that.
30295    new_path=`cmd //c echo $path`
30296  fi
30297
30298
30299  input_path="$new_path"
30300  # Check if we need to convert this using DOS-style short mode. If the path
30301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30302  # take no chances and rewrite it.
30303  # Note: m4 eats our [], so we need to use [ and ] instead.
30304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30305  if test "x$has_forbidden_chars" != x; then
30306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30308  fi
30309
30310
30311  windows_path="$new_path"
30312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30313    unix_path=`$CYGPATH -u "$windows_path"`
30314    new_path="$unix_path"
30315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30317    new_path="$unix_path"
30318  fi
30319
30320  if test "x$path" != "x$new_path"; then
30321    BUILD_JDK="$new_path"
30322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30323$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30324  fi
30325
30326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30328
30329    else
30330      # We're on a unix platform. Hooray! :)
30331      path="$BUILD_JDK"
30332      has_space=`$ECHO "$path" | $GREP " "`
30333      if test "x$has_space" != x; then
30334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30335$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30337      fi
30338
30339      # Use eval to expand a potential ~
30340      eval path="$path"
30341      if test ! -f "$path" && test ! -d "$path"; then
30342        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30343      fi
30344
30345      if test -d "$path"; then
30346        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30347      else
30348        dir="`$DIRNAME "$path"`"
30349        base="`$BASENAME "$path"`"
30350        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30351      fi
30352    fi
30353  fi
30354
30355          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30356$as_echo_n "checking for Build JDK... " >&6; }
30357          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30358$as_echo "$BUILD_JDK" >&6; }
30359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30360$as_echo_n "checking Build JDK version... " >&6; }
30361          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30363$as_echo "$BUILD_JDK_VERSION" >&6; }
30364        fi # end check jdk version
30365      fi # end check java
30366    fi # end check build jdk found
30367  fi
30368
30369    EXTERNAL_BUILDJDK=true
30370  else
30371    if test "x$COMPILE_TYPE" = "xcross"; then
30372      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30373      BUILD_JDK_FOUND=yes
30374      CREATE_BUILDJDK=true
30375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30376$as_echo_n "checking for Build JDK... " >&6; }
30377      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30378$as_echo "yes, will build it for the host platform" >&6; }
30379    else
30380      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30381      BUILD_JDK_FOUND=yes
30382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30383$as_echo_n "checking for Build JDK... " >&6; }
30384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30385$as_echo "yes, will use output dir" >&6; }
30386    fi
30387  fi
30388
30389  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30391$as_echo_n "checking for Build JDK... " >&6; }
30392    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30393$as_echo "no" >&6; }
30394    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30395  fi
30396
30397
30398
30399
30400
30401
30402###############################################################################
30403#
30404# Configure the sources to use. We can add or override individual directories.
30405#
30406###############################################################################
30407
30408
30409  # Where are the sources.
30410  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30411  CORBA_TOPDIR="$SRC_ROOT/corba"
30412  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30413  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30414  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30415  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30416  JDK_TOPDIR="$SRC_ROOT/jdk"
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426  # This feature is no longer supported.
30427
30428
30429
30430# Check whether --with-add-source-root was given.
30431if test "${with_add_source_root+set}" = set; then :
30432  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
30433$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30434fi
30435
30436
30437
30438
30439# Check whether --with-override-source-root was given.
30440if test "${with_override_source_root+set}" = set; then :
30441  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
30442$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30443fi
30444
30445
30446
30447
30448# Check whether --with-adds-and-overrides was given.
30449if test "${with_adds_and_overrides+set}" = set; then :
30450  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
30451$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30452fi
30453
30454
30455
30456
30457# Check whether --with-override-langtools was given.
30458if test "${with_override_langtools+set}" = set; then :
30459  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30460$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30461fi
30462
30463
30464
30465
30466# Check whether --with-override-corba was given.
30467if test "${with_override_corba+set}" = set; then :
30468  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30469$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30470fi
30471
30472
30473
30474
30475# Check whether --with-override-jaxp was given.
30476if test "${with_override_jaxp+set}" = set; then :
30477  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30478$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30479fi
30480
30481
30482
30483
30484# Check whether --with-override-jaxws was given.
30485if test "${with_override_jaxws+set}" = set; then :
30486  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30487$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30488fi
30489
30490
30491
30492
30493# Check whether --with-override-hotspot was given.
30494if test "${with_override_hotspot+set}" = set; then :
30495  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30496$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30497fi
30498
30499
30500
30501
30502# Check whether --with-override-nashorn was given.
30503if test "${with_override_nashorn+set}" = set; then :
30504  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30505$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30506fi
30507
30508
30509
30510
30511# Check whether --with-override-jdk was given.
30512if test "${with_override_jdk+set}" = set; then :
30513  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30514$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30515fi
30516
30517
30518
30519
30520  BUILD_OUTPUT="$OUTPUT_ROOT"
30521
30522
30523  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30524  BUILD_HOTSPOT=true
30525
30526
30527
30528# Check whether --with-import-hotspot was given.
30529if test "${with_import_hotspot+set}" = set; then :
30530  withval=$with_import_hotspot;
30531fi
30532
30533  if test "x$with_import_hotspot" != x; then
30534    CURDIR="$PWD"
30535    cd "$with_import_hotspot"
30536    HOTSPOT_DIST="`pwd`"
30537    cd "$CURDIR"
30538    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30539      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30540    fi
30541    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30542$as_echo_n "checking if hotspot should be imported... " >&6; }
30543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30544$as_echo "yes from $HOTSPOT_DIST" >&6; }
30545    BUILD_HOTSPOT=false
30546  fi
30547
30548  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30549
30550
30551
30552
30553# Check whether --with-import-modules was given.
30554if test "${with_import_modules+set}" = set; then :
30555  withval=$with_import_modules;
30556fi
30557
30558
30559  if test "x$with_import_modules" != x \
30560      && test "x$with_import_modules" != "xno"; then
30561    if test -d "$with_import_modules"; then
30562      IMPORT_MODULES_TOPDIR="$with_import_modules"
30563
30564  # Only process if variable expands to non-empty
30565
30566  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30567    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30568
30569  # Input might be given as Windows format, start by converting to
30570  # unix format.
30571  path="$IMPORT_MODULES_TOPDIR"
30572  new_path=`$CYGPATH -u "$path"`
30573
30574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30577  # "foo.exe" is OK but "foo" is an error.
30578  #
30579  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30580  # It is also a way to make sure we got the proper file name for the real test later on.
30581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30582  if test "x$test_shortpath" = x; then
30583    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30584$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30585    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30586  fi
30587
30588  # Call helper function which possibly converts this using DOS-style short mode.
30589  # If so, the updated path is stored in $new_path.
30590
30591  input_path="$new_path"
30592  # Check if we need to convert this using DOS-style short mode. If the path
30593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30594  # take no chances and rewrite it.
30595  # Note: m4 eats our [], so we need to use [ and ] instead.
30596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30597  if test "x$has_forbidden_chars" != x; then
30598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30599    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30600    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30601    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30602      # Going to short mode and back again did indeed matter. Since short mode is
30603      # case insensitive, let's make it lowercase to improve readability.
30604      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30605      # Now convert it back to Unix-style (cygpath)
30606      input_path=`$CYGPATH -u "$shortmode_path"`
30607      new_path="$input_path"
30608    fi
30609  fi
30610
30611  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30612  if test "x$test_cygdrive_prefix" = x; then
30613    # As a simple fix, exclude /usr/bin since it's not a real path.
30614    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30615      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30616      # a path prefixed by /cygdrive for fixpath to work.
30617      new_path="$CYGWIN_ROOT_PATH$input_path"
30618    fi
30619  fi
30620
30621
30622  if test "x$path" != "x$new_path"; then
30623    IMPORT_MODULES_TOPDIR="$new_path"
30624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30625$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30626  fi
30627
30628    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30629
30630  path="$IMPORT_MODULES_TOPDIR"
30631  has_colon=`$ECHO $path | $GREP ^.:`
30632  new_path="$path"
30633  if test "x$has_colon" = x; then
30634    # Not in mixed or Windows style, start by that.
30635    new_path=`cmd //c echo $path`
30636  fi
30637
30638
30639  input_path="$new_path"
30640  # Check if we need to convert this using DOS-style short mode. If the path
30641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30642  # take no chances and rewrite it.
30643  # Note: m4 eats our [], so we need to use [ and ] instead.
30644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30645  if test "x$has_forbidden_chars" != x; then
30646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30648  fi
30649
30650
30651  windows_path="$new_path"
30652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30653    unix_path=`$CYGPATH -u "$windows_path"`
30654    new_path="$unix_path"
30655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30657    new_path="$unix_path"
30658  fi
30659
30660  if test "x$path" != "x$new_path"; then
30661    IMPORT_MODULES_TOPDIR="$new_path"
30662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30663$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30664  fi
30665
30666  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30667  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30668
30669    else
30670      # We're on a unix platform. Hooray! :)
30671      path="$IMPORT_MODULES_TOPDIR"
30672      has_space=`$ECHO "$path" | $GREP " "`
30673      if test "x$has_space" != x; then
30674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30675$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30676        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30677      fi
30678
30679      # Use eval to expand a potential ~
30680      eval path="$path"
30681      if test ! -f "$path" && test ! -d "$path"; then
30682        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30683      fi
30684
30685      if test -d "$path"; then
30686        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30687      else
30688        dir="`$DIRNAME "$path"`"
30689        base="`$BASENAME "$path"`"
30690        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30691      fi
30692    fi
30693  fi
30694
30695    elif test -e "$with_import_modules"; then
30696      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30697      $RM -rf "$IMPORT_MODULES_TOPDIR"
30698      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30699      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30700        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30701      fi
30702    else
30703      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30704    fi
30705  fi
30706
30707  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30708    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30709  fi
30710  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30711    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30712  fi
30713  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30714    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30715  fi
30716  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30717    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30718  fi
30719  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30720    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30721  fi
30722  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30723    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30724  fi
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734###############################################################################
30735#
30736# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30737# native code.
30738#
30739###############################################################################
30740
30741# See if we are doing a complete static build or not
30742
30743  # Check whether --enable-static-build was given.
30744if test "${enable_static_build+set}" = set; then :
30745  enableval=$enable_static_build;
30746fi
30747
30748  STATIC_BUILD=false
30749  if test "x$enable_static_build" = "xyes"; then
30750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30751$as_echo_n "checking if static build is enabled... " >&6; }
30752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30753$as_echo "yes" >&6; }
30754    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30755      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30756    fi
30757    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30758    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30759    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30760    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30761    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30762    STATIC_BUILD=true
30763  elif test "x$enable_static_build" = "xno"; then
30764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30765$as_echo_n "checking if static build is enabled... " >&6; }
30766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30767$as_echo "no" >&6; }
30768  elif test "x$enable_static_build" != "x"; then
30769    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30770  fi
30771
30772
30773
30774
30775# First determine the toolchain type (compiler family)
30776
30777
30778# Check whether --with-toolchain-type was given.
30779if test "${with_toolchain_type+set}" = set; then :
30780  withval=$with_toolchain_type;
30781fi
30782
30783
30784  # Use indirect variable referencing
30785  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30786  VALID_TOOLCHAINS=${!toolchain_var_name}
30787
30788  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30789    if test -n "$XCODEBUILD"; then
30790      # On Mac OS X, default toolchain to clang after Xcode 5
30791      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30792      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30793      if test $? -ne 0; then
30794        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30795      fi
30796      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30797          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30798          $CUT -f 1 -d .`
30799      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30800$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30801      if test $XCODE_MAJOR_VERSION -ge 5; then
30802          DEFAULT_TOOLCHAIN="clang"
30803      else
30804          DEFAULT_TOOLCHAIN="gcc"
30805      fi
30806    else
30807      # If Xcode is not installed, but the command line tools are
30808      # then we can't run xcodebuild. On these systems we should
30809      # default to clang
30810      DEFAULT_TOOLCHAIN="clang"
30811    fi
30812  else
30813    # First toolchain type in the list is the default
30814    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30815  fi
30816
30817  if test "x$with_toolchain_type" = xlist; then
30818    # List all toolchains
30819    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30820$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30821    for toolchain in $VALID_TOOLCHAINS; do
30822      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30823      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30824      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30825    done
30826
30827    exit 0
30828  elif test "x$with_toolchain_type" != x; then
30829    # User override; check that it is valid
30830    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30831      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30832$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30833      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30834$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30835      as_fn_error $? "Cannot continue." "$LINENO" 5
30836    fi
30837    TOOLCHAIN_TYPE=$with_toolchain_type
30838  else
30839    # No flag given, use default
30840    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30841  fi
30842
30843
30844  TOOLCHAIN_CC_BINARY_clang="clang"
30845  TOOLCHAIN_CC_BINARY_gcc="gcc"
30846  TOOLCHAIN_CC_BINARY_microsoft="cl"
30847  TOOLCHAIN_CC_BINARY_solstudio="cc"
30848  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30849
30850  TOOLCHAIN_CXX_BINARY_clang="clang++"
30851  TOOLCHAIN_CXX_BINARY_gcc="g++"
30852  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30853  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30854  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30855
30856  # Use indirect variable referencing
30857  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30858  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30859  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30860  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30861  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30862  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30863  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30864  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30865
30866
30867  # Define filename patterns
30868  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30869    LIBRARY_PREFIX=
30870    SHARED_LIBRARY_SUFFIX='.dll'
30871    STATIC_LIBRARY_SUFFIX='.lib'
30872    SHARED_LIBRARY='$1.dll'
30873    STATIC_LIBRARY='$1.lib'
30874    OBJ_SUFFIX='.obj'
30875    EXE_SUFFIX='.exe'
30876  else
30877    LIBRARY_PREFIX=lib
30878    SHARED_LIBRARY_SUFFIX='.so'
30879    STATIC_LIBRARY_SUFFIX='.a'
30880    SHARED_LIBRARY='lib$1.so'
30881    STATIC_LIBRARY='lib$1.a'
30882    OBJ_SUFFIX='.o'
30883    EXE_SUFFIX=''
30884    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30885      # For full static builds, we're overloading the SHARED_LIBRARY
30886      # variables in order to limit the amount of changes required.
30887      # It would be better to remove SHARED and just use LIBRARY and
30888      # LIBRARY_SUFFIX for libraries that can be built either
30889      # shared or static and use STATIC_* for libraries that are
30890      # always built statically.
30891      if test "x$STATIC_BUILD" = xtrue; then
30892        SHARED_LIBRARY='lib$1.a'
30893        SHARED_LIBRARY_SUFFIX='.a'
30894      else
30895        SHARED_LIBRARY='lib$1.dylib'
30896        SHARED_LIBRARY_SUFFIX='.dylib'
30897      fi
30898    fi
30899  fi
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30911    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30912$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30913  else
30914    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30915$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30916  fi
30917
30918
30919# User supplied flags should be used when configure detects compilers
30920
30921  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30922    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30923$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30924  fi
30925
30926  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30927    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30928$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30929  fi
30930
30931  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30932    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30933$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30934  fi
30935
30936
30937# Check whether --with-extra-cflags was given.
30938if test "${with_extra_cflags+set}" = set; then :
30939  withval=$with_extra_cflags;
30940fi
30941
30942
30943
30944# Check whether --with-extra-cxxflags was given.
30945if test "${with_extra_cxxflags+set}" = set; then :
30946  withval=$with_extra_cxxflags;
30947fi
30948
30949
30950
30951# Check whether --with-extra-ldflags was given.
30952if test "${with_extra_ldflags+set}" = set; then :
30953  withval=$with_extra_ldflags;
30954fi
30955
30956
30957  EXTRA_CFLAGS="$with_extra_cflags"
30958  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30959  EXTRA_LDFLAGS="$with_extra_ldflags"
30960
30961  # Hotspot needs these set in their legacy form
30962  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30963  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30964  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974  # The global CFLAGS and LDLAGS variables are used by configure tests and
30975  # should include the extra parameters
30976  CFLAGS="$EXTRA_CFLAGS"
30977  CXXFLAGS="$EXTRA_CXXFLAGS"
30978  LDFLAGS="$EXTRA_LDFLAGS"
30979  CPPFLAGS=""
30980
30981# The sysroot cflags are needed for configure to be able to run the compilers
30982
30983  if test "x$SYSROOT" != "x"; then
30984    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30985      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30986        # Solaris Studio does not have a concept of sysroot. Instead we must
30987        # make sure the default include and lib dirs are appended to each
30988        # compile and link command line. Must also add -I-xbuiltin to enable
30989        # inlining of system functions and intrinsics.
30990        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
30991        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
30992            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
30993            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
30994      fi
30995    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
30996      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
30997      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
30998    elif test "x$TOOLCHAIN_TYPE" = xclang; then
30999      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31000      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31001    fi
31002    # Propagate the sysroot args to hotspot
31003    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31004    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31005    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31006    # The global CFLAGS and LDFLAGS variables need these for configure to function
31007    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31008    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31009    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31010    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31011  fi
31012
31013  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31014    # We also need -iframework<path>/System/Library/Frameworks
31015    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31016    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31017    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31018    # set this here so it doesn't have to be peppered throughout the forest
31019    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31020    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31021  fi
31022
31023
31024
31025
31026
31027# Then detect the actual binaries needed
31028
31029  # FIXME: Is this needed?
31030  ac_ext=cpp
31031ac_cpp='$CXXCPP $CPPFLAGS'
31032ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31033ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31034ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31035
31036
31037  # Store the CFLAGS etc passed to the configure script.
31038  ORG_CFLAGS="$CFLAGS"
31039  ORG_CXXFLAGS="$CXXFLAGS"
31040
31041  # autoconf magic only relies on PATH, so update it if tools dir is specified
31042  OLD_PATH="$PATH"
31043
31044  # On Windows, we need to detect the visual studio installation first.
31045  # This will change the PATH, but we need to keep that new PATH even
31046  # after toolchain detection is done, since the compiler (on x86) uses
31047  # it for DLL resolution in runtime.
31048  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31049      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31050
31051  # Store path to cygwin link.exe to help excluding it when searching for
31052  # VS linker. This must be done before changing the PATH when looking for VS.
31053  # Extract the first word of "link", so it can be a program name with args.
31054set dummy link; ac_word=$2
31055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31056$as_echo_n "checking for $ac_word... " >&6; }
31057if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31058  $as_echo_n "(cached) " >&6
31059else
31060  case $CYGWIN_LINK in
31061  [\\/]* | ?:[\\/]*)
31062  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31063  ;;
31064  *)
31065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31066for as_dir in $PATH
31067do
31068  IFS=$as_save_IFS
31069  test -z "$as_dir" && as_dir=.
31070    for ac_exec_ext in '' $ac_executable_extensions; do
31071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31072    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31074    break 2
31075  fi
31076done
31077  done
31078IFS=$as_save_IFS
31079
31080  ;;
31081esac
31082fi
31083CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31084if test -n "$CYGWIN_LINK"; then
31085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31086$as_echo "$CYGWIN_LINK" >&6; }
31087else
31088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31089$as_echo "no" >&6; }
31090fi
31091
31092
31093  if test "x$CYGWIN_LINK" != x; then
31094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31095$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31096    "$CYGWIN_LINK" --version > /dev/null
31097    if test $? -eq 0 ; then
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31099$as_echo "yes" >&6; }
31100    else
31101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31102$as_echo "no" >&6; }
31103      # This might be the VS linker. Don't exclude it later on.
31104      CYGWIN_LINK=""
31105    fi
31106  fi
31107
31108  # First-hand choice is to locate and run the vsvars bat file.
31109
31110
31111# Check whether --with-toolchain-version was given.
31112if test "${with_toolchain_version+set}" = set; then :
31113  withval=$with_toolchain_version;
31114fi
31115
31116
31117  if test "x$with_toolchain_version" = xlist; then
31118    # List all toolchains
31119    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31120$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31121    for version in $VALID_VS_VERSIONS; do
31122      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31123      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31124    done
31125
31126    exit 0
31127  elif test "x$DEVKIT_VS_VERSION" != x; then
31128    VS_VERSION=$DEVKIT_VS_VERSION
31129    TOOLCHAIN_VERSION=$VS_VERSION
31130    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31131    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31132    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31133    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31134    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31135    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31136
31137    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31138    # can still be exported as INCLUDE for compiler invocations without
31139    # SYSROOT_CFLAGS
31140    OLDIFS="$IFS"
31141    IFS=";"
31142    for i in $DEVKIT_VS_INCLUDE; do
31143      ipath=$i
31144
31145  unix_path="$ipath"
31146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31147    windows_path=`$CYGPATH -m "$unix_path"`
31148    ipath="$windows_path"
31149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31150    windows_path=`cmd //c echo $unix_path`
31151    ipath="$windows_path"
31152  fi
31153
31154      VS_INCLUDE="$VS_INCLUDE;$ipath"
31155    done
31156    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31157    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31158    for i in $DEVKIT_VS_LIB; do
31159      libpath=$i
31160
31161  unix_path="$libpath"
31162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31163    windows_path=`$CYGPATH -m "$unix_path"`
31164    libpath="$windows_path"
31165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31166    windows_path=`cmd //c echo $unix_path`
31167    libpath="$windows_path"
31168  fi
31169
31170      VS_LIB="$VS_LIB;$libpath"
31171    done
31172    IFS="$OLDIFS"
31173
31174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31175$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31176
31177  elif test "x$with_toolchain_version" != x; then
31178    # User override; check that it is valid
31179    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31180      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31181$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31182      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31183$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31184      as_fn_error $? "Cannot continue." "$LINENO" 5
31185    fi
31186    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31187  else
31188    # No flag given, use default
31189    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31190  fi
31191
31192  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31193
31194  VS_VERSION="$VS_VERSION"
31195  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31196  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31197  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31198  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31199
31200  # When using --with-tools-dir, assume it points to the correct and default
31201  # version of Visual Studio or that --with-toolchain-version was also set.
31202  if test "x$with_tools_dir" != x; then
31203
31204  if test "x$VS_ENV_CMD" = x; then
31205    VS_VERSION="${VS_VERSION}"
31206    VS_BASE="$with_tools_dir/../.."
31207    METHOD="--with-tools-dir"
31208
31209    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31210      VCVARSFILE="vc/bin/vcvars32.bat"
31211    else
31212      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31213    fi
31214
31215
31216  windows_path="$VS_BASE"
31217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31218    unix_path=`$CYGPATH -u "$windows_path"`
31219    VS_BASE="$unix_path"
31220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31222    VS_BASE="$unix_path"
31223  fi
31224
31225    if test -d "$VS_BASE"; then
31226      if test -f "$VS_BASE/$VCVARSFILE"; then
31227        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31228$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31229        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31230        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31231        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31232        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31233      else
31234        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31235$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31236        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31237$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31238      fi
31239    fi
31240  fi
31241
31242
31243  if test "x$VS_ENV_CMD" = x; then
31244    VS_VERSION="${VS_VERSION}"
31245    VS_BASE="$with_tools_dir/../../.."
31246    METHOD="--with-tools-dir"
31247
31248    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31249      VCVARSFILE="vc/bin/vcvars32.bat"
31250    else
31251      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31252    fi
31253
31254
31255  windows_path="$VS_BASE"
31256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31257    unix_path=`$CYGPATH -u "$windows_path"`
31258    VS_BASE="$unix_path"
31259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31261    VS_BASE="$unix_path"
31262  fi
31263
31264    if test -d "$VS_BASE"; then
31265      if test -f "$VS_BASE/$VCVARSFILE"; then
31266        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31267$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31268        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31269        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31270        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31271        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31272      else
31273        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31274$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31275        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31276$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31277      fi
31278    fi
31279  fi
31280
31281    if test "x$VS_ENV_CMD" = x; then
31282      # Having specified an argument which is incorrect will produce an instant failure;
31283      # we should not go on looking
31284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31285$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31286      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31287$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31288      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31289$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31290      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31291    fi
31292  fi
31293
31294  VS_ENV_CMD=""
31295  VS_ENV_ARGS=""
31296
31297  if test "x$VS_COMNTOOLS" != x; then
31298
31299  if test "x$VS_ENV_CMD" = x; then
31300    VS_VERSION="${VS_VERSION}"
31301    VS_BASE="$VS_COMNTOOLS/../.."
31302    METHOD="$VS_COMNTOOLS_VAR variable"
31303
31304    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31305      VCVARSFILE="vc/bin/vcvars32.bat"
31306    else
31307      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31308    fi
31309
31310
31311  windows_path="$VS_BASE"
31312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31313    unix_path=`$CYGPATH -u "$windows_path"`
31314    VS_BASE="$unix_path"
31315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31317    VS_BASE="$unix_path"
31318  fi
31319
31320    if test -d "$VS_BASE"; then
31321      if test -f "$VS_BASE/$VCVARSFILE"; then
31322        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31323$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31324        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31325        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31326        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31327        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31328      else
31329        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31330$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31331        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31332$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31333      fi
31334    fi
31335  fi
31336
31337  fi
31338  if test "x$PROGRAMFILES" != x; then
31339
31340  if test "x$VS_ENV_CMD" = x; then
31341    VS_VERSION="${VS_VERSION}"
31342    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31343    METHOD="well-known name"
31344
31345    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31346      VCVARSFILE="vc/bin/vcvars32.bat"
31347    else
31348      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31349    fi
31350
31351
31352  windows_path="$VS_BASE"
31353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31354    unix_path=`$CYGPATH -u "$windows_path"`
31355    VS_BASE="$unix_path"
31356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31358    VS_BASE="$unix_path"
31359  fi
31360
31361    if test -d "$VS_BASE"; then
31362      if test -f "$VS_BASE/$VCVARSFILE"; then
31363        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31364$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31365        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31366        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31367        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31368        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31369      else
31370        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31371$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31372        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31373$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31374      fi
31375    fi
31376  fi
31377
31378  fi
31379  # Work around the insanely named ProgramFiles(x86) env variable
31380  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31381  if test "x$PROGRAMFILES_X86" != x; then
31382
31383  if test "x$VS_ENV_CMD" = x; then
31384    VS_VERSION="${VS_VERSION}"
31385    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31386    METHOD="well-known name"
31387
31388    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31389      VCVARSFILE="vc/bin/vcvars32.bat"
31390    else
31391      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31392    fi
31393
31394
31395  windows_path="$VS_BASE"
31396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31397    unix_path=`$CYGPATH -u "$windows_path"`
31398    VS_BASE="$unix_path"
31399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31401    VS_BASE="$unix_path"
31402  fi
31403
31404    if test -d "$VS_BASE"; then
31405      if test -f "$VS_BASE/$VCVARSFILE"; then
31406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31407$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31408        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31409        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31410        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31411        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31412      else
31413        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31414$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31415        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31416$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31417      fi
31418    fi
31419  fi
31420
31421  fi
31422
31423  if test "x$VS_ENV_CMD" = x; then
31424    VS_VERSION="${VS_VERSION}"
31425    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31426    METHOD="well-known name"
31427
31428    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31429      VCVARSFILE="vc/bin/vcvars32.bat"
31430    else
31431      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31432    fi
31433
31434
31435  windows_path="$VS_BASE"
31436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31437    unix_path=`$CYGPATH -u "$windows_path"`
31438    VS_BASE="$unix_path"
31439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31441    VS_BASE="$unix_path"
31442  fi
31443
31444    if test -d "$VS_BASE"; then
31445      if test -f "$VS_BASE/$VCVARSFILE"; then
31446        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31447$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31448        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31449        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31450        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31451        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31452      else
31453        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31454$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31455        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31456$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31457      fi
31458    fi
31459  fi
31460
31461
31462  if test "x$VS_ENV_CMD" = x; then
31463    VS_VERSION="${VS_VERSION}"
31464    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31465    METHOD="well-known name"
31466
31467    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31468      VCVARSFILE="vc/bin/vcvars32.bat"
31469    else
31470      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31471    fi
31472
31473
31474  windows_path="$VS_BASE"
31475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31476    unix_path=`$CYGPATH -u "$windows_path"`
31477    VS_BASE="$unix_path"
31478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31480    VS_BASE="$unix_path"
31481  fi
31482
31483    if test -d "$VS_BASE"; then
31484      if test -f "$VS_BASE/$VCVARSFILE"; then
31485        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31486$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31487        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31488        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31489        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31490        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31491      else
31492        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31493$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31494        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31495$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31496      fi
31497    fi
31498  fi
31499
31500
31501  if test "x$SDK_INSTALL_DIR" != x; then
31502    if test "x$ProgramW6432" != x; then
31503
31504  if test "x$VS_ENV_CMD" = x; then
31505    VS_VERSION="${VS_VERSION}"
31506    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31507    METHOD="well-known name"
31508
31509  windows_path="$WIN_SDK_BASE"
31510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31511    unix_path=`$CYGPATH -u "$windows_path"`
31512    WIN_SDK_BASE="$unix_path"
31513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31515    WIN_SDK_BASE="$unix_path"
31516  fi
31517
31518    if test -d "$WIN_SDK_BASE"; then
31519      # There have been cases of partial or broken SDK installations. A missing
31520      # lib dir is not going to work.
31521      if test ! -d "$WIN_SDK_BASE/lib"; then
31522        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31523$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31524        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31525$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31526      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31527        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31528$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31529        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31530        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31531          VS_ENV_ARGS="/x86"
31532        else
31533          VS_ENV_ARGS="/x64"
31534        fi
31535        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31536        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31537        # TODO: improve detection for other versions of SDK
31538        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31539      else
31540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31541$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31542        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31543$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31544      fi
31545    fi
31546  fi
31547
31548    fi
31549    if test "x$PROGRAMW6432" != x; then
31550
31551  if test "x$VS_ENV_CMD" = x; then
31552    VS_VERSION="${VS_VERSION}"
31553    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31554    METHOD="well-known name"
31555
31556  windows_path="$WIN_SDK_BASE"
31557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31558    unix_path=`$CYGPATH -u "$windows_path"`
31559    WIN_SDK_BASE="$unix_path"
31560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31562    WIN_SDK_BASE="$unix_path"
31563  fi
31564
31565    if test -d "$WIN_SDK_BASE"; then
31566      # There have been cases of partial or broken SDK installations. A missing
31567      # lib dir is not going to work.
31568      if test ! -d "$WIN_SDK_BASE/lib"; then
31569        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31570$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31571        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31572$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31573      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31574        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31575$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31576        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31577        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31578          VS_ENV_ARGS="/x86"
31579        else
31580          VS_ENV_ARGS="/x64"
31581        fi
31582        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31583        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31584        # TODO: improve detection for other versions of SDK
31585        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31586      else
31587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31588$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31589        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31590$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31591      fi
31592    fi
31593  fi
31594
31595    fi
31596    if test "x$PROGRAMFILES" != x; then
31597
31598  if test "x$VS_ENV_CMD" = x; then
31599    VS_VERSION="${VS_VERSION}"
31600    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31601    METHOD="well-known name"
31602
31603  windows_path="$WIN_SDK_BASE"
31604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31605    unix_path=`$CYGPATH -u "$windows_path"`
31606    WIN_SDK_BASE="$unix_path"
31607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31609    WIN_SDK_BASE="$unix_path"
31610  fi
31611
31612    if test -d "$WIN_SDK_BASE"; then
31613      # There have been cases of partial or broken SDK installations. A missing
31614      # lib dir is not going to work.
31615      if test ! -d "$WIN_SDK_BASE/lib"; then
31616        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31617$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31618        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31619$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31620      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31621        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31622$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31623        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31624        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31625          VS_ENV_ARGS="/x86"
31626        else
31627          VS_ENV_ARGS="/x64"
31628        fi
31629        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31630        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31631        # TODO: improve detection for other versions of SDK
31632        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31633      else
31634        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31635$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31636        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31637$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31638      fi
31639    fi
31640  fi
31641
31642    fi
31643
31644  if test "x$VS_ENV_CMD" = x; then
31645    VS_VERSION="${VS_VERSION}"
31646    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31647    METHOD="well-known name"
31648
31649  windows_path="$WIN_SDK_BASE"
31650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31651    unix_path=`$CYGPATH -u "$windows_path"`
31652    WIN_SDK_BASE="$unix_path"
31653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31655    WIN_SDK_BASE="$unix_path"
31656  fi
31657
31658    if test -d "$WIN_SDK_BASE"; then
31659      # There have been cases of partial or broken SDK installations. A missing
31660      # lib dir is not going to work.
31661      if test ! -d "$WIN_SDK_BASE/lib"; then
31662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31663$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31664        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31665$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31666      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31667        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31668$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31669        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31670        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31671          VS_ENV_ARGS="/x86"
31672        else
31673          VS_ENV_ARGS="/x64"
31674        fi
31675        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31676        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31677        # TODO: improve detection for other versions of SDK
31678        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31679      else
31680        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31681$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31682        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31683$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31684      fi
31685    fi
31686  fi
31687
31688
31689  if test "x$VS_ENV_CMD" = x; then
31690    VS_VERSION="${VS_VERSION}"
31691    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31692    METHOD="well-known name"
31693
31694  windows_path="$WIN_SDK_BASE"
31695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31696    unix_path=`$CYGPATH -u "$windows_path"`
31697    WIN_SDK_BASE="$unix_path"
31698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31700    WIN_SDK_BASE="$unix_path"
31701  fi
31702
31703    if test -d "$WIN_SDK_BASE"; then
31704      # There have been cases of partial or broken SDK installations. A missing
31705      # lib dir is not going to work.
31706      if test ! -d "$WIN_SDK_BASE/lib"; then
31707        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31708$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31710$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31711      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31712        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31713$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31714        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31715        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31716          VS_ENV_ARGS="/x86"
31717        else
31718          VS_ENV_ARGS="/x64"
31719        fi
31720        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31721        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31722        # TODO: improve detection for other versions of SDK
31723        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31724      else
31725        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31726$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31727        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31728$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31729      fi
31730    fi
31731  fi
31732
31733  fi
31734
31735    if test "x$VS_ENV_CMD" != x; then
31736      TOOLCHAIN_VERSION=$VS_VERSION
31737      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31738      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31739      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31740      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31741      # The rest of the variables are already evaled while probing
31742      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31743$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31744      break
31745    fi
31746  done
31747
31748
31749  # If we have a devkit, skip all of the below.
31750  if test "x$DEVKIT_VS_VERSION" = x; then
31751    if test "x$VS_ENV_CMD" != x; then
31752      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31753
31754  # Only process if variable expands to non-empty
31755
31756  if test "x$VS_ENV_CMD" != x; then
31757    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31758
31759  # First separate the path from the arguments. This will split at the first
31760  # space.
31761  complete="$VS_ENV_CMD"
31762  path="${complete%% *}"
31763  tmp="$complete EOL"
31764  arguments="${tmp#* }"
31765
31766  # Input might be given as Windows format, start by converting to
31767  # unix format.
31768  new_path=`$CYGPATH -u "$path"`
31769
31770  # Now try to locate executable using which
31771  new_path=`$WHICH "$new_path" 2> /dev/null`
31772  # bat and cmd files are not always considered executable in cygwin causing which
31773  # to not find them
31774  if test "x$new_path" = x \
31775      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31776      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31777    new_path=`$CYGPATH -u "$path"`
31778  fi
31779  if test "x$new_path" = x; then
31780    # Oops. Which didn't find the executable.
31781    # The splitting of arguments from the executable at a space might have been incorrect,
31782    # since paths with space are more likely in Windows. Give it another try with the whole
31783    # argument.
31784    path="$complete"
31785    arguments="EOL"
31786    new_path=`$CYGPATH -u "$path"`
31787    new_path=`$WHICH "$new_path" 2> /dev/null`
31788    # bat and cmd files are not always considered executable in cygwin causing which
31789    # to not find them
31790    if test "x$new_path" = x \
31791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31793      new_path=`$CYGPATH -u "$path"`
31794    fi
31795    if test "x$new_path" = x; then
31796      # It's still not found. Now this is an unrecoverable error.
31797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31798$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31799      has_space=`$ECHO "$complete" | $GREP " "`
31800      if test "x$has_space" != x; then
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31803      fi
31804      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31805    fi
31806  fi
31807
31808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31811  # "foo.exe" is OK but "foo" is an error.
31812  #
31813  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31814  # It is also a way to make sure we got the proper file name for the real test later on.
31815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31816  if test "x$test_shortpath" = x; then
31817    # Short path failed, file does not exist as specified.
31818    # Try adding .exe or .cmd
31819    if test -f "${new_path}.exe"; then
31820      input_to_shortpath="${new_path}.exe"
31821    elif test -f "${new_path}.cmd"; then
31822      input_to_shortpath="${new_path}.cmd"
31823    else
31824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31825$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31826      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31827$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31828      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31829    fi
31830  else
31831    input_to_shortpath="$new_path"
31832  fi
31833
31834  # Call helper function which possibly converts this using DOS-style short mode.
31835  # If so, the updated path is stored in $new_path.
31836  new_path="$input_to_shortpath"
31837
31838  input_path="$input_to_shortpath"
31839  # Check if we need to convert this using DOS-style short mode. If the path
31840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31841  # take no chances and rewrite it.
31842  # Note: m4 eats our [], so we need to use [ and ] instead.
31843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31844  if test "x$has_forbidden_chars" != x; then
31845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31846    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31849      # Going to short mode and back again did indeed matter. Since short mode is
31850      # case insensitive, let's make it lowercase to improve readability.
31851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31852      # Now convert it back to Unix-style (cygpath)
31853      input_path=`$CYGPATH -u "$shortmode_path"`
31854      new_path="$input_path"
31855    fi
31856  fi
31857
31858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31859  if test "x$test_cygdrive_prefix" = x; then
31860    # As a simple fix, exclude /usr/bin since it's not a real path.
31861    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31863      # a path prefixed by /cygdrive for fixpath to work.
31864      new_path="$CYGWIN_ROOT_PATH$input_path"
31865    fi
31866  fi
31867
31868  # remove trailing .exe if any
31869  new_path="${new_path/%.exe/}"
31870
31871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31872
31873  # First separate the path from the arguments. This will split at the first
31874  # space.
31875  complete="$VS_ENV_CMD"
31876  path="${complete%% *}"
31877  tmp="$complete EOL"
31878  arguments="${tmp#* }"
31879
31880  # Input might be given as Windows format, start by converting to
31881  # unix format.
31882  new_path="$path"
31883
31884  windows_path="$new_path"
31885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31886    unix_path=`$CYGPATH -u "$windows_path"`
31887    new_path="$unix_path"
31888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31890    new_path="$unix_path"
31891  fi
31892
31893
31894  # Now try to locate executable using which
31895  new_path=`$WHICH "$new_path" 2> /dev/null`
31896
31897  if test "x$new_path" = x; then
31898    # Oops. Which didn't find the executable.
31899    # The splitting of arguments from the executable at a space might have been incorrect,
31900    # since paths with space are more likely in Windows. Give it another try with the whole
31901    # argument.
31902    path="$complete"
31903    arguments="EOL"
31904    new_path="$path"
31905
31906  windows_path="$new_path"
31907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31908    unix_path=`$CYGPATH -u "$windows_path"`
31909    new_path="$unix_path"
31910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31912    new_path="$unix_path"
31913  fi
31914
31915
31916    new_path=`$WHICH "$new_path" 2> /dev/null`
31917    # bat and cmd files are not always considered executable in MSYS causing which
31918    # to not find them
31919    if test "x$new_path" = x \
31920        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31921        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31922      new_path="$path"
31923
31924  windows_path="$new_path"
31925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31926    unix_path=`$CYGPATH -u "$windows_path"`
31927    new_path="$unix_path"
31928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31930    new_path="$unix_path"
31931  fi
31932
31933    fi
31934
31935    if test "x$new_path" = x; then
31936      # It's still not found. Now this is an unrecoverable error.
31937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31938$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31939      has_space=`$ECHO "$complete" | $GREP " "`
31940      if test "x$has_space" != x; then
31941        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31942$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31943      fi
31944      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31945    fi
31946  fi
31947
31948  # Now new_path has a complete unix path to the binary
31949  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31950    # Keep paths in /bin as-is, but remove trailing .exe if any
31951    new_path="${new_path/%.exe/}"
31952    # Do not save /bin paths to all_fixpath_prefixes!
31953  else
31954    # Not in mixed or Windows style, start by that.
31955    new_path=`cmd //c echo $new_path`
31956
31957  input_path="$new_path"
31958  # Check if we need to convert this using DOS-style short mode. If the path
31959  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31960  # take no chances and rewrite it.
31961  # Note: m4 eats our [], so we need to use [ and ] instead.
31962  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31963  if test "x$has_forbidden_chars" != x; then
31964    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31965    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31966  fi
31967
31968    # Output is in $new_path
31969
31970  windows_path="$new_path"
31971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31972    unix_path=`$CYGPATH -u "$windows_path"`
31973    new_path="$unix_path"
31974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31976    new_path="$unix_path"
31977  fi
31978
31979    # remove trailing .exe if any
31980    new_path="${new_path/%.exe/}"
31981
31982    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31983    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31984  fi
31985
31986    else
31987      # We're on a unix platform. Hooray! :)
31988      # First separate the path from the arguments. This will split at the first
31989      # space.
31990      complete="$VS_ENV_CMD"
31991      path="${complete%% *}"
31992      tmp="$complete EOL"
31993      arguments="${tmp#* }"
31994
31995      # Cannot rely on the command "which" here since it doesn't always work.
31996      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31997      if test -z "$is_absolute_path"; then
31998        # Path to executable is not absolute. Find it.
31999        IFS_save="$IFS"
32000        IFS=:
32001        for p in $PATH; do
32002          if test -f "$p/$path" && test -x "$p/$path"; then
32003            new_path="$p/$path"
32004            break
32005          fi
32006        done
32007        IFS="$IFS_save"
32008      else
32009        # This is an absolute path, we can use it without further modifications.
32010        new_path="$path"
32011      fi
32012
32013      if test "x$new_path" = x; then
32014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32015$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32016        has_space=`$ECHO "$complete" | $GREP " "`
32017        if test "x$has_space" != x; then
32018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32020        fi
32021        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32022      fi
32023    fi
32024
32025    # Now join together the path and the arguments once again
32026    if test "x$arguments" != xEOL; then
32027      new_complete="$new_path ${arguments% *}"
32028    else
32029      new_complete="$new_path"
32030    fi
32031
32032    if test "x$complete" != "x$new_complete"; then
32033      VS_ENV_CMD="$new_complete"
32034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32035$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32036    fi
32037  fi
32038
32039
32040      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32041      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32042$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32043
32044      # We need to create a couple of temporary files.
32045      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32046      $MKDIR -p $VS_ENV_TMP_DIR
32047
32048      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32049      # Instead create a shell script which will set the relevant variables when run.
32050      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32051
32052  unix_path="$WINPATH_VS_ENV_CMD"
32053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32054    windows_path=`$CYGPATH -m "$unix_path"`
32055    WINPATH_VS_ENV_CMD="$windows_path"
32056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32057    windows_path=`cmd //c echo $unix_path`
32058    WINPATH_VS_ENV_CMD="$windows_path"
32059  fi
32060
32061      WINPATH_BASH="$BASH"
32062
32063  unix_path="$WINPATH_BASH"
32064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32065    windows_path=`$CYGPATH -m "$unix_path"`
32066    WINPATH_BASH="$windows_path"
32067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32068    windows_path=`cmd //c echo $unix_path`
32069    WINPATH_BASH="$windows_path"
32070  fi
32071
32072
32073      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32074      # script (executable by bash) that will setup the important variables.
32075      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32076      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32077      # This will end up something like:
32078      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32079      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32080      # These will end up something like:
32081      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32082      # The trailing space for everyone except PATH is no typo, but is needed due
32083      # to trailing \ in the Windows paths. These will be stripped later.
32084      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32085          >> $EXTRACT_VC_ENV_BAT_FILE
32086      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32087          >> $EXTRACT_VC_ENV_BAT_FILE
32088      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32089          >> $EXTRACT_VC_ENV_BAT_FILE
32090      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32091          >> $EXTRACT_VC_ENV_BAT_FILE
32092      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32093          >> $EXTRACT_VC_ENV_BAT_FILE
32094      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32095          >> $EXTRACT_VC_ENV_BAT_FILE
32096
32097      # Now execute the newly created bat file.
32098      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32099      # Change directory so we don't need to mess with Windows paths in redirects.
32100      cd $VS_ENV_TMP_DIR
32101      cmd /c extract-vs-env.bat | $CAT
32102      cd $CURDIR
32103
32104      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32106$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32107        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32108$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32109        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32110$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32111        as_fn_error $? "Cannot continue" "$LINENO" 5
32112      fi
32113
32114      # Now set all paths and other env variables. This will allow the rest of
32115      # the configure script to find and run the compiler in the proper way.
32116      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32117$as_echo "$as_me: Setting extracted environment variables" >&6;}
32118      . $VS_ENV_TMP_DIR/set-vs-env.sh
32119      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32120      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32121    else
32122      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32123      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32124$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32125    fi
32126  fi
32127
32128  # At this point, we should have correct variables in the environment, or we can't continue.
32129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32130$as_echo_n "checking for Visual Studio variables... " >&6; }
32131
32132  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32133      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32134    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32136$as_echo "present but broken" >&6; }
32137      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32138    else
32139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32140$as_echo "ok" >&6; }
32141      # Remove any trailing "\" ";" and " " from the variables.
32142      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32143      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32144      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32145      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32146      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32147      # Remove any paths containing # (typically F#) as that messes up make. This
32148      # is needed if visual studio was installed with F# support.
32149      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32150
32151
32152
32153
32154
32155      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32156      OLDIFS="$IFS"
32157      IFS=";"
32158      for i in $VS_INCLUDE; do
32159        ipath=$i
32160        # Only process non-empty elements
32161        if test "x$ipath" != x; then
32162          IFS="$OLDIFS"
32163          # Check that directory exists before calling fixup_path
32164          testpath=$ipath
32165
32166  windows_path="$testpath"
32167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32168    unix_path=`$CYGPATH -u "$windows_path"`
32169    testpath="$unix_path"
32170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32172    testpath="$unix_path"
32173  fi
32174
32175          if test -d "$testpath"; then
32176
32177  # Only process if variable expands to non-empty
32178
32179  if test "x$ipath" != x; then
32180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32181
32182  # Input might be given as Windows format, start by converting to
32183  # unix format.
32184  path="$ipath"
32185  new_path=`$CYGPATH -u "$path"`
32186
32187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32190  # "foo.exe" is OK but "foo" is an error.
32191  #
32192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32193  # It is also a way to make sure we got the proper file name for the real test later on.
32194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32195  if test "x$test_shortpath" = x; then
32196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32197$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32198    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32199  fi
32200
32201  # Call helper function which possibly converts this using DOS-style short mode.
32202  # If so, the updated path is stored in $new_path.
32203
32204  input_path="$new_path"
32205  # Check if we need to convert this using DOS-style short mode. If the path
32206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32207  # take no chances and rewrite it.
32208  # Note: m4 eats our [], so we need to use [ and ] instead.
32209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32210  if test "x$has_forbidden_chars" != x; then
32211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32215      # Going to short mode and back again did indeed matter. Since short mode is
32216      # case insensitive, let's make it lowercase to improve readability.
32217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32218      # Now convert it back to Unix-style (cygpath)
32219      input_path=`$CYGPATH -u "$shortmode_path"`
32220      new_path="$input_path"
32221    fi
32222  fi
32223
32224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32225  if test "x$test_cygdrive_prefix" = x; then
32226    # As a simple fix, exclude /usr/bin since it's not a real path.
32227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32229      # a path prefixed by /cygdrive for fixpath to work.
32230      new_path="$CYGWIN_ROOT_PATH$input_path"
32231    fi
32232  fi
32233
32234
32235  if test "x$path" != "x$new_path"; then
32236    ipath="$new_path"
32237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32238$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32239  fi
32240
32241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32242
32243  path="$ipath"
32244  has_colon=`$ECHO $path | $GREP ^.:`
32245  new_path="$path"
32246  if test "x$has_colon" = x; then
32247    # Not in mixed or Windows style, start by that.
32248    new_path=`cmd //c echo $path`
32249  fi
32250
32251
32252  input_path="$new_path"
32253  # Check if we need to convert this using DOS-style short mode. If the path
32254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32255  # take no chances and rewrite it.
32256  # Note: m4 eats our [], so we need to use [ and ] instead.
32257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32258  if test "x$has_forbidden_chars" != x; then
32259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32261  fi
32262
32263
32264  windows_path="$new_path"
32265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32266    unix_path=`$CYGPATH -u "$windows_path"`
32267    new_path="$unix_path"
32268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32270    new_path="$unix_path"
32271  fi
32272
32273  if test "x$path" != "x$new_path"; then
32274    ipath="$new_path"
32275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32276$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32277  fi
32278
32279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32281
32282    else
32283      # We're on a unix platform. Hooray! :)
32284      path="$ipath"
32285      has_space=`$ECHO "$path" | $GREP " "`
32286      if test "x$has_space" != x; then
32287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32288$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32290      fi
32291
32292      # Use eval to expand a potential ~
32293      eval path="$path"
32294      if test ! -f "$path" && test ! -d "$path"; then
32295        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32296      fi
32297
32298      if test -d "$path"; then
32299        ipath="`cd "$path"; $THEPWDCMD -L`"
32300      else
32301        dir="`$DIRNAME "$path"`"
32302        base="`$BASENAME "$path"`"
32303        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32304      fi
32305    fi
32306  fi
32307
32308            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32309          fi
32310          IFS=";"
32311        fi
32312      done
32313      # Convert VS_LIB into SYSROOT_LDFLAGS
32314      for i in $VS_LIB; do
32315        libpath=$i
32316        # Only process non-empty elements
32317        if test "x$libpath" != x; then
32318          IFS="$OLDIFS"
32319          # Check that directory exists before calling fixup_path
32320          testpath=$libpath
32321
32322  windows_path="$testpath"
32323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32324    unix_path=`$CYGPATH -u "$windows_path"`
32325    testpath="$unix_path"
32326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32328    testpath="$unix_path"
32329  fi
32330
32331          if test -d "$testpath"; then
32332
32333  # Only process if variable expands to non-empty
32334
32335  if test "x$libpath" != x; then
32336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32337
32338  # Input might be given as Windows format, start by converting to
32339  # unix format.
32340  path="$libpath"
32341  new_path=`$CYGPATH -u "$path"`
32342
32343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32346  # "foo.exe" is OK but "foo" is an error.
32347  #
32348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32349  # It is also a way to make sure we got the proper file name for the real test later on.
32350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32351  if test "x$test_shortpath" = x; then
32352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32353$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32354    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32355  fi
32356
32357  # Call helper function which possibly converts this using DOS-style short mode.
32358  # If so, the updated path is stored in $new_path.
32359
32360  input_path="$new_path"
32361  # Check if we need to convert this using DOS-style short mode. If the path
32362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32363  # take no chances and rewrite it.
32364  # Note: m4 eats our [], so we need to use [ and ] instead.
32365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32366  if test "x$has_forbidden_chars" != x; then
32367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32371      # Going to short mode and back again did indeed matter. Since short mode is
32372      # case insensitive, let's make it lowercase to improve readability.
32373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32374      # Now convert it back to Unix-style (cygpath)
32375      input_path=`$CYGPATH -u "$shortmode_path"`
32376      new_path="$input_path"
32377    fi
32378  fi
32379
32380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32381  if test "x$test_cygdrive_prefix" = x; then
32382    # As a simple fix, exclude /usr/bin since it's not a real path.
32383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32385      # a path prefixed by /cygdrive for fixpath to work.
32386      new_path="$CYGWIN_ROOT_PATH$input_path"
32387    fi
32388  fi
32389
32390
32391  if test "x$path" != "x$new_path"; then
32392    libpath="$new_path"
32393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32394$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32395  fi
32396
32397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32398
32399  path="$libpath"
32400  has_colon=`$ECHO $path | $GREP ^.:`
32401  new_path="$path"
32402  if test "x$has_colon" = x; then
32403    # Not in mixed or Windows style, start by that.
32404    new_path=`cmd //c echo $path`
32405  fi
32406
32407
32408  input_path="$new_path"
32409  # Check if we need to convert this using DOS-style short mode. If the path
32410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32411  # take no chances and rewrite it.
32412  # Note: m4 eats our [], so we need to use [ and ] instead.
32413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32414  if test "x$has_forbidden_chars" != x; then
32415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32417  fi
32418
32419
32420  windows_path="$new_path"
32421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32422    unix_path=`$CYGPATH -u "$windows_path"`
32423    new_path="$unix_path"
32424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32426    new_path="$unix_path"
32427  fi
32428
32429  if test "x$path" != "x$new_path"; then
32430    libpath="$new_path"
32431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32432$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32433  fi
32434
32435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32437
32438    else
32439      # We're on a unix platform. Hooray! :)
32440      path="$libpath"
32441      has_space=`$ECHO "$path" | $GREP " "`
32442      if test "x$has_space" != x; then
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32444$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32446      fi
32447
32448      # Use eval to expand a potential ~
32449      eval path="$path"
32450      if test ! -f "$path" && test ! -d "$path"; then
32451        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32452      fi
32453
32454      if test -d "$path"; then
32455        libpath="`cd "$path"; $THEPWDCMD -L`"
32456      else
32457        dir="`$DIRNAME "$path"`"
32458        base="`$BASENAME "$path"`"
32459        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32460      fi
32461    fi
32462  fi
32463
32464            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32465          fi
32466          IFS=";"
32467        fi
32468      done
32469      IFS="$OLDIFS"
32470    fi
32471  else
32472    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32473$as_echo "not found" >&6; }
32474
32475    if test "x$VS_ENV_CMD" = x; then
32476      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32477$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32478      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32479$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32480    else
32481      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32482$as_echo "$as_me: Running the extraction script failed." >&6;}
32483    fi
32484    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32485$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32486    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32487$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32488    as_fn_error $? "Cannot continue" "$LINENO" 5
32489  fi
32490
32491    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32492    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32493    PATH="$VS_PATH"
32494    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32495    export INCLUDE="$VS_INCLUDE"
32496    export LIB="$VS_LIB"
32497  else
32498    if test "x$XCODE_VERSION_OUTPUT" != x; then
32499      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32500      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32501      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32502    else
32503      # Currently we do not define this for other toolchains. This might change as the need arise.
32504      TOOLCHAIN_VERSION=
32505    fi
32506  fi
32507
32508
32509  # For solaris we really need solaris tools, and not the GNU equivalent.
32510  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32511  # so add that to path before starting to probe.
32512  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32513  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32514    PATH="/usr/ccs/bin:$PATH"
32515  fi
32516
32517  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32518  # override all other locations.
32519  if test "x$TOOLCHAIN_PATH" != x; then
32520    PATH=$TOOLCHAIN_PATH:$PATH
32521  fi
32522
32523
32524  #
32525  # Setup the compilers (CC and CXX)
32526  #
32527
32528  COMPILER_NAME=C
32529  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32530
32531  if test "x$CC" != x; then
32532    # User has supplied compiler name already, always let that override.
32533    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32534$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32535    if test "x`basename $CC`" = "x$CC"; then
32536      # A command without a complete path is provided, search $PATH.
32537
32538      for ac_prog in $CC
32539do
32540  # Extract the first word of "$ac_prog", so it can be a program name with args.
32541set dummy $ac_prog; ac_word=$2
32542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32543$as_echo_n "checking for $ac_word... " >&6; }
32544if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32545  $as_echo_n "(cached) " >&6
32546else
32547  case $POTENTIAL_CC in
32548  [\\/]* | ?:[\\/]*)
32549  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32550  ;;
32551  *)
32552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32553for as_dir in $PATH
32554do
32555  IFS=$as_save_IFS
32556  test -z "$as_dir" && as_dir=.
32557    for ac_exec_ext in '' $ac_executable_extensions; do
32558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32559    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32561    break 2
32562  fi
32563done
32564  done
32565IFS=$as_save_IFS
32566
32567  ;;
32568esac
32569fi
32570POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32571if test -n "$POTENTIAL_CC"; then
32572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32573$as_echo "$POTENTIAL_CC" >&6; }
32574else
32575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32576$as_echo "no" >&6; }
32577fi
32578
32579
32580  test -n "$POTENTIAL_CC" && break
32581done
32582
32583      if test "x$POTENTIAL_CC" != x; then
32584        CC=$POTENTIAL_CC
32585      else
32586        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32587      fi
32588    else
32589      # Otherwise it might already be a complete path
32590      if test ! -x "$CC"; then
32591        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32592      fi
32593    fi
32594  else
32595    # No user supplied value. Locate compiler ourselves.
32596
32597    # If we are cross compiling, assume cross compilation tools follows the
32598    # cross compilation standard where they are prefixed with the autoconf
32599    # standard name for the target. For example the binary
32600    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32601    # If we are not cross compiling, then the default compiler name will be
32602    # used.
32603
32604    CC=
32605    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32606    # before checking the rest of the PATH.
32607    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32608    # step, this should not be necessary.
32609    if test -n "$TOOLCHAIN_PATH"; then
32610      PATH_save="$PATH"
32611      PATH="$TOOLCHAIN_PATH"
32612      for ac_prog in $SEARCH_LIST
32613do
32614  # Extract the first word of "$ac_prog", so it can be a program name with args.
32615set dummy $ac_prog; ac_word=$2
32616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32617$as_echo_n "checking for $ac_word... " >&6; }
32618if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32619  $as_echo_n "(cached) " >&6
32620else
32621  case $TOOLCHAIN_PATH_CC in
32622  [\\/]* | ?:[\\/]*)
32623  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32624  ;;
32625  *)
32626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32627for as_dir in $PATH
32628do
32629  IFS=$as_save_IFS
32630  test -z "$as_dir" && as_dir=.
32631    for ac_exec_ext in '' $ac_executable_extensions; do
32632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32633    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32635    break 2
32636  fi
32637done
32638  done
32639IFS=$as_save_IFS
32640
32641  ;;
32642esac
32643fi
32644TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32645if test -n "$TOOLCHAIN_PATH_CC"; then
32646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32647$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32648else
32649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32650$as_echo "no" >&6; }
32651fi
32652
32653
32654  test -n "$TOOLCHAIN_PATH_CC" && break
32655done
32656
32657      CC=$TOOLCHAIN_PATH_CC
32658      PATH="$PATH_save"
32659    fi
32660
32661    # AC_PATH_PROGS can't be run multiple times with the same variable,
32662    # so create a new name for this run.
32663    if test "x$CC" = x; then
32664      for ac_prog in $SEARCH_LIST
32665do
32666  # Extract the first word of "$ac_prog", so it can be a program name with args.
32667set dummy $ac_prog; ac_word=$2
32668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32669$as_echo_n "checking for $ac_word... " >&6; }
32670if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32671  $as_echo_n "(cached) " >&6
32672else
32673  case $POTENTIAL_CC in
32674  [\\/]* | ?:[\\/]*)
32675  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32676  ;;
32677  *)
32678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32679for as_dir in $PATH
32680do
32681  IFS=$as_save_IFS
32682  test -z "$as_dir" && as_dir=.
32683    for ac_exec_ext in '' $ac_executable_extensions; do
32684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32685    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32687    break 2
32688  fi
32689done
32690  done
32691IFS=$as_save_IFS
32692
32693  ;;
32694esac
32695fi
32696POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32697if test -n "$POTENTIAL_CC"; then
32698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32699$as_echo "$POTENTIAL_CC" >&6; }
32700else
32701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32702$as_echo "no" >&6; }
32703fi
32704
32705
32706  test -n "$POTENTIAL_CC" && break
32707done
32708
32709      CC=$POTENTIAL_CC
32710    fi
32711
32712    if test "x$CC" = x; then
32713
32714  # Print a helpful message on how to acquire the necessary build dependency.
32715  # devkit is the help tag: freetype, cups, alsa etc
32716  MISSING_DEPENDENCY=devkit
32717
32718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32719    cygwin_help $MISSING_DEPENDENCY
32720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32721    msys_help $MISSING_DEPENDENCY
32722  else
32723    PKGHANDLER_COMMAND=
32724
32725    case $PKGHANDLER in
32726      apt-get)
32727        apt_help     $MISSING_DEPENDENCY ;;
32728      yum)
32729        yum_help     $MISSING_DEPENDENCY ;;
32730      port)
32731        port_help    $MISSING_DEPENDENCY ;;
32732      pkgutil)
32733        pkgutil_help $MISSING_DEPENDENCY ;;
32734      pkgadd)
32735        pkgadd_help  $MISSING_DEPENDENCY ;;
32736    esac
32737
32738    if test "x$PKGHANDLER_COMMAND" != x; then
32739      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32740    fi
32741  fi
32742
32743      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32744    fi
32745  fi
32746
32747  # Now we have a compiler binary in CC. Make sure it's okay.
32748
32749  # Only process if variable expands to non-empty
32750
32751  if test "x$CC" != x; then
32752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32753
32754  # First separate the path from the arguments. This will split at the first
32755  # space.
32756  complete="$CC"
32757  path="${complete%% *}"
32758  tmp="$complete EOL"
32759  arguments="${tmp#* }"
32760
32761  # Input might be given as Windows format, start by converting to
32762  # unix format.
32763  new_path=`$CYGPATH -u "$path"`
32764
32765  # Now try to locate executable using which
32766  new_path=`$WHICH "$new_path" 2> /dev/null`
32767  # bat and cmd files are not always considered executable in cygwin causing which
32768  # to not find them
32769  if test "x$new_path" = x \
32770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32772    new_path=`$CYGPATH -u "$path"`
32773  fi
32774  if test "x$new_path" = x; then
32775    # Oops. Which didn't find the executable.
32776    # The splitting of arguments from the executable at a space might have been incorrect,
32777    # since paths with space are more likely in Windows. Give it another try with the whole
32778    # argument.
32779    path="$complete"
32780    arguments="EOL"
32781    new_path=`$CYGPATH -u "$path"`
32782    new_path=`$WHICH "$new_path" 2> /dev/null`
32783    # bat and cmd files are not always considered executable in cygwin causing which
32784    # to not find them
32785    if test "x$new_path" = x \
32786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32788      new_path=`$CYGPATH -u "$path"`
32789    fi
32790    if test "x$new_path" = x; then
32791      # It's still not found. Now this is an unrecoverable error.
32792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32793$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32794      has_space=`$ECHO "$complete" | $GREP " "`
32795      if test "x$has_space" != x; then
32796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32798      fi
32799      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32800    fi
32801  fi
32802
32803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32806  # "foo.exe" is OK but "foo" is an error.
32807  #
32808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32809  # It is also a way to make sure we got the proper file name for the real test later on.
32810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32811  if test "x$test_shortpath" = x; then
32812    # Short path failed, file does not exist as specified.
32813    # Try adding .exe or .cmd
32814    if test -f "${new_path}.exe"; then
32815      input_to_shortpath="${new_path}.exe"
32816    elif test -f "${new_path}.cmd"; then
32817      input_to_shortpath="${new_path}.cmd"
32818    else
32819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32820$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32823      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32824    fi
32825  else
32826    input_to_shortpath="$new_path"
32827  fi
32828
32829  # Call helper function which possibly converts this using DOS-style short mode.
32830  # If so, the updated path is stored in $new_path.
32831  new_path="$input_to_shortpath"
32832
32833  input_path="$input_to_shortpath"
32834  # Check if we need to convert this using DOS-style short mode. If the path
32835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32836  # take no chances and rewrite it.
32837  # Note: m4 eats our [], so we need to use [ and ] instead.
32838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32839  if test "x$has_forbidden_chars" != x; then
32840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32844      # Going to short mode and back again did indeed matter. Since short mode is
32845      # case insensitive, let's make it lowercase to improve readability.
32846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32847      # Now convert it back to Unix-style (cygpath)
32848      input_path=`$CYGPATH -u "$shortmode_path"`
32849      new_path="$input_path"
32850    fi
32851  fi
32852
32853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32854  if test "x$test_cygdrive_prefix" = x; then
32855    # As a simple fix, exclude /usr/bin since it's not a real path.
32856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32858      # a path prefixed by /cygdrive for fixpath to work.
32859      new_path="$CYGWIN_ROOT_PATH$input_path"
32860    fi
32861  fi
32862
32863  # remove trailing .exe if any
32864  new_path="${new_path/%.exe/}"
32865
32866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32867
32868  # First separate the path from the arguments. This will split at the first
32869  # space.
32870  complete="$CC"
32871  path="${complete%% *}"
32872  tmp="$complete EOL"
32873  arguments="${tmp#* }"
32874
32875  # Input might be given as Windows format, start by converting to
32876  # unix format.
32877  new_path="$path"
32878
32879  windows_path="$new_path"
32880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32881    unix_path=`$CYGPATH -u "$windows_path"`
32882    new_path="$unix_path"
32883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32885    new_path="$unix_path"
32886  fi
32887
32888
32889  # Now try to locate executable using which
32890  new_path=`$WHICH "$new_path" 2> /dev/null`
32891
32892  if test "x$new_path" = x; then
32893    # Oops. Which didn't find the executable.
32894    # The splitting of arguments from the executable at a space might have been incorrect,
32895    # since paths with space are more likely in Windows. Give it another try with the whole
32896    # argument.
32897    path="$complete"
32898    arguments="EOL"
32899    new_path="$path"
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910
32911    new_path=`$WHICH "$new_path" 2> /dev/null`
32912    # bat and cmd files are not always considered executable in MSYS causing which
32913    # to not find them
32914    if test "x$new_path" = x \
32915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32917      new_path="$path"
32918
32919  windows_path="$new_path"
32920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32921    unix_path=`$CYGPATH -u "$windows_path"`
32922    new_path="$unix_path"
32923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32925    new_path="$unix_path"
32926  fi
32927
32928    fi
32929
32930    if test "x$new_path" = x; then
32931      # It's still not found. Now this is an unrecoverable error.
32932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32933$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32934      has_space=`$ECHO "$complete" | $GREP " "`
32935      if test "x$has_space" != x; then
32936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32938      fi
32939      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32940    fi
32941  fi
32942
32943  # Now new_path has a complete unix path to the binary
32944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32945    # Keep paths in /bin as-is, but remove trailing .exe if any
32946    new_path="${new_path/%.exe/}"
32947    # Do not save /bin paths to all_fixpath_prefixes!
32948  else
32949    # Not in mixed or Windows style, start by that.
32950    new_path=`cmd //c echo $new_path`
32951
32952  input_path="$new_path"
32953  # Check if we need to convert this using DOS-style short mode. If the path
32954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32955  # take no chances and rewrite it.
32956  # Note: m4 eats our [], so we need to use [ and ] instead.
32957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32958  if test "x$has_forbidden_chars" != x; then
32959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32961  fi
32962
32963    # Output is in $new_path
32964
32965  windows_path="$new_path"
32966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32967    unix_path=`$CYGPATH -u "$windows_path"`
32968    new_path="$unix_path"
32969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32971    new_path="$unix_path"
32972  fi
32973
32974    # remove trailing .exe if any
32975    new_path="${new_path/%.exe/}"
32976
32977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32979  fi
32980
32981    else
32982      # We're on a unix platform. Hooray! :)
32983      # First separate the path from the arguments. This will split at the first
32984      # space.
32985      complete="$CC"
32986      path="${complete%% *}"
32987      tmp="$complete EOL"
32988      arguments="${tmp#* }"
32989
32990      # Cannot rely on the command "which" here since it doesn't always work.
32991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32992      if test -z "$is_absolute_path"; then
32993        # Path to executable is not absolute. Find it.
32994        IFS_save="$IFS"
32995        IFS=:
32996        for p in $PATH; do
32997          if test -f "$p/$path" && test -x "$p/$path"; then
32998            new_path="$p/$path"
32999            break
33000          fi
33001        done
33002        IFS="$IFS_save"
33003      else
33004        # This is an absolute path, we can use it without further modifications.
33005        new_path="$path"
33006      fi
33007
33008      if test "x$new_path" = x; then
33009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33010$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33011        has_space=`$ECHO "$complete" | $GREP " "`
33012        if test "x$has_space" != x; then
33013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33015        fi
33016        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33017      fi
33018    fi
33019
33020    # Now join together the path and the arguments once again
33021    if test "x$arguments" != xEOL; then
33022      new_complete="$new_path ${arguments% *}"
33023    else
33024      new_complete="$new_path"
33025    fi
33026
33027    if test "x$complete" != "x$new_complete"; then
33028      CC="$new_complete"
33029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33030$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33031    fi
33032  fi
33033
33034  TEST_COMPILER="$CC"
33035
33036  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33037$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33038  SYMLINK_ORIGINAL="$TEST_COMPILER"
33039
33040  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33041    # Follow a chain of symbolic links. Use readlink
33042    # where it exists, else fall back to horribly
33043    # complicated shell code.
33044    if test "x$READLINK_TESTED" != yes; then
33045      # On MacOSX there is a readlink tool with a different
33046      # purpose than the GNU readlink tool. Check the found readlink.
33047      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33048      if test "x$ISGNU" = x; then
33049        # A readlink that we do not know how to use.
33050        # Are there other non-GNU readlinks out there?
33051        READLINK_TESTED=yes
33052        READLINK=
33053      fi
33054    fi
33055
33056    if test "x$READLINK" != x; then
33057      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33058    else
33059      # Save the current directory for restoring afterwards
33060      STARTDIR=$PWD
33061      COUNTER=0
33062      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33063      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33064      cd $sym_link_dir
33065      # Use -P flag to resolve symlinks in directories.
33066      cd `$THEPWDCMD -P`
33067      sym_link_dir=`$THEPWDCMD -P`
33068      # Resolve file symlinks
33069      while test $COUNTER -lt 20; do
33070        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33071        if test "x$ISLINK" == x; then
33072          # This is not a symbolic link! We are done!
33073          break
33074        fi
33075        # Again resolve directory symlinks since the target of the just found
33076        # link could be in a different directory
33077        cd `$DIRNAME $ISLINK`
33078        sym_link_dir=`$THEPWDCMD -P`
33079        sym_link_file=`$BASENAME $ISLINK`
33080        let COUNTER=COUNTER+1
33081      done
33082      cd $STARTDIR
33083      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33084    fi
33085  fi
33086
33087  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33089$as_echo "no symlink" >&6; }
33090  else
33091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33092$as_echo "$SYMLINK_ORIGINAL" >&6; }
33093
33094    # We can't handle ccache by gcc wrappers, since we need to know if we're
33095    # using ccache. Instead ccache usage must be controlled by a configure option.
33096    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33097    if test "x$COMPILER_BASENAME" = "xccache"; then
33098      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33099$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33100      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33101    fi
33102  fi
33103
33104
33105  COMPILER=$CC
33106  COMPILER_NAME=$COMPILER_NAME
33107
33108  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33109    # cc -V output typically looks like
33110    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33111    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33112    # Check that this is likely to be the Solaris Studio cc.
33113    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33114    if test $? -ne 0; then
33115      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33116      { $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
33117$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33119$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33120      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33121$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33122      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33123    fi
33124    # Remove usage instructions (if present), and
33125    # collapse compiler output into a single line
33126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33127        $SED -e 's/ *[Uu]sage:.*//'`
33128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33129        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33130  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33131    # xlc -qversion output typically looks like
33132    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33133    #     Version: 11.01.0000.0015
33134    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33135    # Check that this is likely to be the IBM XL C compiler.
33136    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33137    if test $? -ne 0; then
33138      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33139      { $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
33140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33142$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33143      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33144$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33145      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33146    fi
33147    # Collapse compiler output into a single line
33148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33150        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33151  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33152    # There is no specific version flag, but all output starts with a version string.
33153    # First line typically looks something like:
33154    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33155    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33156    # Check that this is likely to be Microsoft CL.EXE.
33157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33158    if test $? -ne 0; then
33159      { $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
33160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33162$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33164    fi
33165    # Collapse compiler output into a single line
33166    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33168        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33169  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33170    # gcc --version output typically looks like
33171    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33172    #     Copyright (C) 2013 Free Software Foundation, Inc.
33173    #     This is free software; see the source for copying conditions.  There is NO
33174    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33175    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33176    # Check that this is likely to be GCC.
33177    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33178    if test $? -ne 0; then
33179      { $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
33180$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33181      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33182$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33183      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33184    fi
33185    # Remove Copyright and legalese from version string, and
33186    # collapse into a single line
33187    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33188        $SED -e 's/ *Copyright .*//'`
33189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33190        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33191  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33192    # clang --version output typically looks like
33193    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33194    #    clang version 3.3 (tags/RELEASE_33/final)
33195    # or
33196    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33197    #    Target: x86_64-pc-linux-gnu
33198    #    Thread model: posix
33199    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33200    # Check that this is likely to be clang
33201    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33202    if test $? -ne 0; then
33203      { $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
33204$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33205      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33206$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33207      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33208    fi
33209    # Collapse compiler output into a single line
33210    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33211    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33212        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33213  else
33214      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33215  fi
33216  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33217  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33218  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33219  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33220
33221  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33222$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33223
33224
33225  # Now that we have resolved CC ourself, let autoconf have its go at it
33226  ac_ext=c
33227ac_cpp='$CPP $CPPFLAGS'
33228ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33229ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33230ac_compiler_gnu=$ac_cv_c_compiler_gnu
33231if test -n "$ac_tool_prefix"; then
33232  for ac_prog in $CC
33233  do
33234    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33235set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33237$as_echo_n "checking for $ac_word... " >&6; }
33238if ${ac_cv_prog_CC+:} false; then :
33239  $as_echo_n "(cached) " >&6
33240else
33241  if test -n "$CC"; then
33242  ac_cv_prog_CC="$CC" # Let the user override the test.
33243else
33244as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33245for as_dir in $PATH
33246do
33247  IFS=$as_save_IFS
33248  test -z "$as_dir" && as_dir=.
33249    for ac_exec_ext in '' $ac_executable_extensions; do
33250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33251    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33253    break 2
33254  fi
33255done
33256  done
33257IFS=$as_save_IFS
33258
33259fi
33260fi
33261CC=$ac_cv_prog_CC
33262if test -n "$CC"; then
33263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33264$as_echo "$CC" >&6; }
33265else
33266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33267$as_echo "no" >&6; }
33268fi
33269
33270
33271    test -n "$CC" && break
33272  done
33273fi
33274if test -z "$CC"; then
33275  ac_ct_CC=$CC
33276  for ac_prog in $CC
33277do
33278  # Extract the first word of "$ac_prog", so it can be a program name with args.
33279set dummy $ac_prog; ac_word=$2
33280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33281$as_echo_n "checking for $ac_word... " >&6; }
33282if ${ac_cv_prog_ac_ct_CC+:} false; then :
33283  $as_echo_n "(cached) " >&6
33284else
33285  if test -n "$ac_ct_CC"; then
33286  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33287else
33288as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33289for as_dir in $PATH
33290do
33291  IFS=$as_save_IFS
33292  test -z "$as_dir" && as_dir=.
33293    for ac_exec_ext in '' $ac_executable_extensions; do
33294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33295    ac_cv_prog_ac_ct_CC="$ac_prog"
33296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33297    break 2
33298  fi
33299done
33300  done
33301IFS=$as_save_IFS
33302
33303fi
33304fi
33305ac_ct_CC=$ac_cv_prog_ac_ct_CC
33306if test -n "$ac_ct_CC"; then
33307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33308$as_echo "$ac_ct_CC" >&6; }
33309else
33310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33311$as_echo "no" >&6; }
33312fi
33313
33314
33315  test -n "$ac_ct_CC" && break
33316done
33317
33318  if test "x$ac_ct_CC" = x; then
33319    CC=""
33320  else
33321    case $cross_compiling:$ac_tool_warned in
33322yes:)
33323{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33324$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33325ac_tool_warned=yes ;;
33326esac
33327    CC=$ac_ct_CC
33328  fi
33329fi
33330
33331
33332test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33333$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33334as_fn_error $? "no acceptable C compiler found in \$PATH
33335See \`config.log' for more details" "$LINENO" 5; }
33336
33337# Provide some information about the compiler.
33338$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33339set X $ac_compile
33340ac_compiler=$2
33341for ac_option in --version -v -V -qversion; do
33342  { { ac_try="$ac_compiler $ac_option >&5"
33343case "(($ac_try" in
33344  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33345  *) ac_try_echo=$ac_try;;
33346esac
33347eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33348$as_echo "$ac_try_echo"; } >&5
33349  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33350  ac_status=$?
33351  if test -s conftest.err; then
33352    sed '10a\
33353... rest of stderr output deleted ...
33354         10q' conftest.err >conftest.er1
33355    cat conftest.er1 >&5
33356  fi
33357  rm -f conftest.er1 conftest.err
33358  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33359  test $ac_status = 0; }
33360done
33361
33362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33363/* end confdefs.h.  */
33364
33365int
33366main ()
33367{
33368
33369  ;
33370  return 0;
33371}
33372_ACEOF
33373ac_clean_files_save=$ac_clean_files
33374ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33375# Try to create an executable without -o first, disregard a.out.
33376# It will help us diagnose broken compilers, and finding out an intuition
33377# of exeext.
33378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33379$as_echo_n "checking whether the C compiler works... " >&6; }
33380ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33381
33382# The possible output files:
33383ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33384
33385ac_rmfiles=
33386for ac_file in $ac_files
33387do
33388  case $ac_file in
33389    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33390    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33391  esac
33392done
33393rm -f $ac_rmfiles
33394
33395if { { ac_try="$ac_link_default"
33396case "(($ac_try" in
33397  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33398  *) ac_try_echo=$ac_try;;
33399esac
33400eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33401$as_echo "$ac_try_echo"; } >&5
33402  (eval "$ac_link_default") 2>&5
33403  ac_status=$?
33404  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33405  test $ac_status = 0; }; then :
33406  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33407# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33408# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33409# so that the user can short-circuit this test for compilers unknown to
33410# Autoconf.
33411for ac_file in $ac_files ''
33412do
33413  test -f "$ac_file" || continue
33414  case $ac_file in
33415    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33416	;;
33417    [ab].out )
33418	# We found the default executable, but exeext='' is most
33419	# certainly right.
33420	break;;
33421    *.* )
33422	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33423	then :; else
33424	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33425	fi
33426	# We set ac_cv_exeext here because the later test for it is not
33427	# safe: cross compilers may not add the suffix if given an `-o'
33428	# argument, so we may need to know it at that point already.
33429	# Even if this section looks crufty: it has the advantage of
33430	# actually working.
33431	break;;
33432    * )
33433	break;;
33434  esac
33435done
33436test "$ac_cv_exeext" = no && ac_cv_exeext=
33437
33438else
33439  ac_file=''
33440fi
33441if test -z "$ac_file"; then :
33442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33443$as_echo "no" >&6; }
33444$as_echo "$as_me: failed program was:" >&5
33445sed 's/^/| /' conftest.$ac_ext >&5
33446
33447{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33449as_fn_error 77 "C compiler cannot create executables
33450See \`config.log' for more details" "$LINENO" 5; }
33451else
33452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33453$as_echo "yes" >&6; }
33454fi
33455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33456$as_echo_n "checking for C compiler default output file name... " >&6; }
33457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33458$as_echo "$ac_file" >&6; }
33459ac_exeext=$ac_cv_exeext
33460
33461rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33462ac_clean_files=$ac_clean_files_save
33463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33464$as_echo_n "checking for suffix of executables... " >&6; }
33465if { { ac_try="$ac_link"
33466case "(($ac_try" in
33467  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33468  *) ac_try_echo=$ac_try;;
33469esac
33470eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33471$as_echo "$ac_try_echo"; } >&5
33472  (eval "$ac_link") 2>&5
33473  ac_status=$?
33474  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33475  test $ac_status = 0; }; then :
33476  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33477# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33478# work properly (i.e., refer to `conftest.exe'), while it won't with
33479# `rm'.
33480for ac_file in conftest.exe conftest conftest.*; do
33481  test -f "$ac_file" || continue
33482  case $ac_file in
33483    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33484    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33485	  break;;
33486    * ) break;;
33487  esac
33488done
33489else
33490  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33492as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33493See \`config.log' for more details" "$LINENO" 5; }
33494fi
33495rm -f conftest conftest$ac_cv_exeext
33496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33497$as_echo "$ac_cv_exeext" >&6; }
33498
33499rm -f conftest.$ac_ext
33500EXEEXT=$ac_cv_exeext
33501ac_exeext=$EXEEXT
33502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33503/* end confdefs.h.  */
33504#include <stdio.h>
33505int
33506main ()
33507{
33508FILE *f = fopen ("conftest.out", "w");
33509 return ferror (f) || fclose (f) != 0;
33510
33511  ;
33512  return 0;
33513}
33514_ACEOF
33515ac_clean_files="$ac_clean_files conftest.out"
33516# Check that the compiler produces executables we can run.  If not, either
33517# the compiler is broken, or we cross compile.
33518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33519$as_echo_n "checking whether we are cross compiling... " >&6; }
33520if test "$cross_compiling" != yes; then
33521  { { ac_try="$ac_link"
33522case "(($ac_try" in
33523  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33524  *) ac_try_echo=$ac_try;;
33525esac
33526eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33527$as_echo "$ac_try_echo"; } >&5
33528  (eval "$ac_link") 2>&5
33529  ac_status=$?
33530  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33531  test $ac_status = 0; }
33532  if { ac_try='./conftest$ac_cv_exeext'
33533  { { case "(($ac_try" in
33534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33535  *) ac_try_echo=$ac_try;;
33536esac
33537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33538$as_echo "$ac_try_echo"; } >&5
33539  (eval "$ac_try") 2>&5
33540  ac_status=$?
33541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33542  test $ac_status = 0; }; }; then
33543    cross_compiling=no
33544  else
33545    if test "$cross_compiling" = maybe; then
33546	cross_compiling=yes
33547    else
33548	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33549$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33550as_fn_error $? "cannot run C compiled programs.
33551If you meant to cross compile, use \`--host'.
33552See \`config.log' for more details" "$LINENO" 5; }
33553    fi
33554  fi
33555fi
33556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33557$as_echo "$cross_compiling" >&6; }
33558
33559rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33560ac_clean_files=$ac_clean_files_save
33561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33562$as_echo_n "checking for suffix of object files... " >&6; }
33563if ${ac_cv_objext+:} false; then :
33564  $as_echo_n "(cached) " >&6
33565else
33566  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33567/* end confdefs.h.  */
33568
33569int
33570main ()
33571{
33572
33573  ;
33574  return 0;
33575}
33576_ACEOF
33577rm -f conftest.o conftest.obj
33578if { { ac_try="$ac_compile"
33579case "(($ac_try" in
33580  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33581  *) ac_try_echo=$ac_try;;
33582esac
33583eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33584$as_echo "$ac_try_echo"; } >&5
33585  (eval "$ac_compile") 2>&5
33586  ac_status=$?
33587  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33588  test $ac_status = 0; }; then :
33589  for ac_file in conftest.o conftest.obj conftest.*; do
33590  test -f "$ac_file" || continue;
33591  case $ac_file in
33592    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33593    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33594       break;;
33595  esac
33596done
33597else
33598  $as_echo "$as_me: failed program was:" >&5
33599sed 's/^/| /' conftest.$ac_ext >&5
33600
33601{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33603as_fn_error $? "cannot compute suffix of object files: cannot compile
33604See \`config.log' for more details" "$LINENO" 5; }
33605fi
33606rm -f conftest.$ac_cv_objext conftest.$ac_ext
33607fi
33608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33609$as_echo "$ac_cv_objext" >&6; }
33610OBJEXT=$ac_cv_objext
33611ac_objext=$OBJEXT
33612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33613$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33614if ${ac_cv_c_compiler_gnu+:} false; then :
33615  $as_echo_n "(cached) " >&6
33616else
33617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33618/* end confdefs.h.  */
33619
33620int
33621main ()
33622{
33623#ifndef __GNUC__
33624       choke me
33625#endif
33626
33627  ;
33628  return 0;
33629}
33630_ACEOF
33631if ac_fn_c_try_compile "$LINENO"; then :
33632  ac_compiler_gnu=yes
33633else
33634  ac_compiler_gnu=no
33635fi
33636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33637ac_cv_c_compiler_gnu=$ac_compiler_gnu
33638
33639fi
33640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33641$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33642if test $ac_compiler_gnu = yes; then
33643  GCC=yes
33644else
33645  GCC=
33646fi
33647ac_test_CFLAGS=${CFLAGS+set}
33648ac_save_CFLAGS=$CFLAGS
33649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33650$as_echo_n "checking whether $CC accepts -g... " >&6; }
33651if ${ac_cv_prog_cc_g+:} false; then :
33652  $as_echo_n "(cached) " >&6
33653else
33654  ac_save_c_werror_flag=$ac_c_werror_flag
33655   ac_c_werror_flag=yes
33656   ac_cv_prog_cc_g=no
33657   CFLAGS="-g"
33658   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33659/* end confdefs.h.  */
33660
33661int
33662main ()
33663{
33664
33665  ;
33666  return 0;
33667}
33668_ACEOF
33669if ac_fn_c_try_compile "$LINENO"; then :
33670  ac_cv_prog_cc_g=yes
33671else
33672  CFLAGS=""
33673      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33674/* end confdefs.h.  */
33675
33676int
33677main ()
33678{
33679
33680  ;
33681  return 0;
33682}
33683_ACEOF
33684if ac_fn_c_try_compile "$LINENO"; then :
33685
33686else
33687  ac_c_werror_flag=$ac_save_c_werror_flag
33688	 CFLAGS="-g"
33689	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33690/* end confdefs.h.  */
33691
33692int
33693main ()
33694{
33695
33696  ;
33697  return 0;
33698}
33699_ACEOF
33700if ac_fn_c_try_compile "$LINENO"; then :
33701  ac_cv_prog_cc_g=yes
33702fi
33703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33704fi
33705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33706fi
33707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33708   ac_c_werror_flag=$ac_save_c_werror_flag
33709fi
33710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33711$as_echo "$ac_cv_prog_cc_g" >&6; }
33712if test "$ac_test_CFLAGS" = set; then
33713  CFLAGS=$ac_save_CFLAGS
33714elif test $ac_cv_prog_cc_g = yes; then
33715  if test "$GCC" = yes; then
33716    CFLAGS="-g -O2"
33717  else
33718    CFLAGS="-g"
33719  fi
33720else
33721  if test "$GCC" = yes; then
33722    CFLAGS="-O2"
33723  else
33724    CFLAGS=
33725  fi
33726fi
33727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33728$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33729if ${ac_cv_prog_cc_c89+:} false; then :
33730  $as_echo_n "(cached) " >&6
33731else
33732  ac_cv_prog_cc_c89=no
33733ac_save_CC=$CC
33734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33735/* end confdefs.h.  */
33736#include <stdarg.h>
33737#include <stdio.h>
33738struct stat;
33739/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33740struct buf { int x; };
33741FILE * (*rcsopen) (struct buf *, struct stat *, int);
33742static char *e (p, i)
33743     char **p;
33744     int i;
33745{
33746  return p[i];
33747}
33748static char *f (char * (*g) (char **, int), char **p, ...)
33749{
33750  char *s;
33751  va_list v;
33752  va_start (v,p);
33753  s = g (p, va_arg (v,int));
33754  va_end (v);
33755  return s;
33756}
33757
33758/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33759   function prototypes and stuff, but not '\xHH' hex character constants.
33760   These don't provoke an error unfortunately, instead are silently treated
33761   as 'x'.  The following induces an error, until -std is added to get
33762   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33763   array size at least.  It's necessary to write '\x00'==0 to get something
33764   that's true only with -std.  */
33765int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33766
33767/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33768   inside strings and character constants.  */
33769#define FOO(x) 'x'
33770int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33771
33772int test (int i, double x);
33773struct s1 {int (*f) (int a);};
33774struct s2 {int (*f) (double a);};
33775int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33776int argc;
33777char **argv;
33778int
33779main ()
33780{
33781return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33782  ;
33783  return 0;
33784}
33785_ACEOF
33786for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33787	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33788do
33789  CC="$ac_save_CC $ac_arg"
33790  if ac_fn_c_try_compile "$LINENO"; then :
33791  ac_cv_prog_cc_c89=$ac_arg
33792fi
33793rm -f core conftest.err conftest.$ac_objext
33794  test "x$ac_cv_prog_cc_c89" != "xno" && break
33795done
33796rm -f conftest.$ac_ext
33797CC=$ac_save_CC
33798
33799fi
33800# AC_CACHE_VAL
33801case "x$ac_cv_prog_cc_c89" in
33802  x)
33803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33804$as_echo "none needed" >&6; } ;;
33805  xno)
33806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33807$as_echo "unsupported" >&6; } ;;
33808  *)
33809    CC="$CC $ac_cv_prog_cc_c89"
33810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33811$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33812esac
33813if test "x$ac_cv_prog_cc_c89" != xno; then :
33814
33815fi
33816
33817ac_ext=cpp
33818ac_cpp='$CXXCPP $CPPFLAGS'
33819ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33820ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33821ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33822
33823
33824
33825  COMPILER_NAME=C++
33826  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33827
33828  if test "x$CXX" != x; then
33829    # User has supplied compiler name already, always let that override.
33830    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33831$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33832    if test "x`basename $CXX`" = "x$CXX"; then
33833      # A command without a complete path is provided, search $PATH.
33834
33835      for ac_prog in $CXX
33836do
33837  # Extract the first word of "$ac_prog", so it can be a program name with args.
33838set dummy $ac_prog; ac_word=$2
33839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33840$as_echo_n "checking for $ac_word... " >&6; }
33841if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33842  $as_echo_n "(cached) " >&6
33843else
33844  case $POTENTIAL_CXX in
33845  [\\/]* | ?:[\\/]*)
33846  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33847  ;;
33848  *)
33849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33850for as_dir in $PATH
33851do
33852  IFS=$as_save_IFS
33853  test -z "$as_dir" && as_dir=.
33854    for ac_exec_ext in '' $ac_executable_extensions; do
33855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33856    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33858    break 2
33859  fi
33860done
33861  done
33862IFS=$as_save_IFS
33863
33864  ;;
33865esac
33866fi
33867POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33868if test -n "$POTENTIAL_CXX"; then
33869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33870$as_echo "$POTENTIAL_CXX" >&6; }
33871else
33872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33873$as_echo "no" >&6; }
33874fi
33875
33876
33877  test -n "$POTENTIAL_CXX" && break
33878done
33879
33880      if test "x$POTENTIAL_CXX" != x; then
33881        CXX=$POTENTIAL_CXX
33882      else
33883        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33884      fi
33885    else
33886      # Otherwise it might already be a complete path
33887      if test ! -x "$CXX"; then
33888        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33889      fi
33890    fi
33891  else
33892    # No user supplied value. Locate compiler ourselves.
33893
33894    # If we are cross compiling, assume cross compilation tools follows the
33895    # cross compilation standard where they are prefixed with the autoconf
33896    # standard name for the target. For example the binary
33897    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33898    # If we are not cross compiling, then the default compiler name will be
33899    # used.
33900
33901    CXX=
33902    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33903    # before checking the rest of the PATH.
33904    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33905    # step, this should not be necessary.
33906    if test -n "$TOOLCHAIN_PATH"; then
33907      PATH_save="$PATH"
33908      PATH="$TOOLCHAIN_PATH"
33909      for ac_prog in $SEARCH_LIST
33910do
33911  # Extract the first word of "$ac_prog", so it can be a program name with args.
33912set dummy $ac_prog; ac_word=$2
33913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33914$as_echo_n "checking for $ac_word... " >&6; }
33915if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33916  $as_echo_n "(cached) " >&6
33917else
33918  case $TOOLCHAIN_PATH_CXX in
33919  [\\/]* | ?:[\\/]*)
33920  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33921  ;;
33922  *)
33923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33924for as_dir in $PATH
33925do
33926  IFS=$as_save_IFS
33927  test -z "$as_dir" && as_dir=.
33928    for ac_exec_ext in '' $ac_executable_extensions; do
33929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33930    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33932    break 2
33933  fi
33934done
33935  done
33936IFS=$as_save_IFS
33937
33938  ;;
33939esac
33940fi
33941TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33942if test -n "$TOOLCHAIN_PATH_CXX"; then
33943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33944$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33945else
33946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33947$as_echo "no" >&6; }
33948fi
33949
33950
33951  test -n "$TOOLCHAIN_PATH_CXX" && break
33952done
33953
33954      CXX=$TOOLCHAIN_PATH_CXX
33955      PATH="$PATH_save"
33956    fi
33957
33958    # AC_PATH_PROGS can't be run multiple times with the same variable,
33959    # so create a new name for this run.
33960    if test "x$CXX" = x; then
33961      for ac_prog in $SEARCH_LIST
33962do
33963  # Extract the first word of "$ac_prog", so it can be a program name with args.
33964set dummy $ac_prog; ac_word=$2
33965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33966$as_echo_n "checking for $ac_word... " >&6; }
33967if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33968  $as_echo_n "(cached) " >&6
33969else
33970  case $POTENTIAL_CXX in
33971  [\\/]* | ?:[\\/]*)
33972  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33973  ;;
33974  *)
33975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33976for as_dir in $PATH
33977do
33978  IFS=$as_save_IFS
33979  test -z "$as_dir" && as_dir=.
33980    for ac_exec_ext in '' $ac_executable_extensions; do
33981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33982    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33984    break 2
33985  fi
33986done
33987  done
33988IFS=$as_save_IFS
33989
33990  ;;
33991esac
33992fi
33993POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33994if test -n "$POTENTIAL_CXX"; then
33995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33996$as_echo "$POTENTIAL_CXX" >&6; }
33997else
33998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33999$as_echo "no" >&6; }
34000fi
34001
34002
34003  test -n "$POTENTIAL_CXX" && break
34004done
34005
34006      CXX=$POTENTIAL_CXX
34007    fi
34008
34009    if test "x$CXX" = x; then
34010
34011  # Print a helpful message on how to acquire the necessary build dependency.
34012  # devkit is the help tag: freetype, cups, alsa etc
34013  MISSING_DEPENDENCY=devkit
34014
34015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34016    cygwin_help $MISSING_DEPENDENCY
34017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34018    msys_help $MISSING_DEPENDENCY
34019  else
34020    PKGHANDLER_COMMAND=
34021
34022    case $PKGHANDLER in
34023      apt-get)
34024        apt_help     $MISSING_DEPENDENCY ;;
34025      yum)
34026        yum_help     $MISSING_DEPENDENCY ;;
34027      port)
34028        port_help    $MISSING_DEPENDENCY ;;
34029      pkgutil)
34030        pkgutil_help $MISSING_DEPENDENCY ;;
34031      pkgadd)
34032        pkgadd_help  $MISSING_DEPENDENCY ;;
34033    esac
34034
34035    if test "x$PKGHANDLER_COMMAND" != x; then
34036      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34037    fi
34038  fi
34039
34040      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34041    fi
34042  fi
34043
34044  # Now we have a compiler binary in CXX. Make sure it's okay.
34045
34046  # Only process if variable expands to non-empty
34047
34048  if test "x$CXX" != x; then
34049    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34050
34051  # First separate the path from the arguments. This will split at the first
34052  # space.
34053  complete="$CXX"
34054  path="${complete%% *}"
34055  tmp="$complete EOL"
34056  arguments="${tmp#* }"
34057
34058  # Input might be given as Windows format, start by converting to
34059  # unix format.
34060  new_path=`$CYGPATH -u "$path"`
34061
34062  # Now try to locate executable using which
34063  new_path=`$WHICH "$new_path" 2> /dev/null`
34064  # bat and cmd files are not always considered executable in cygwin causing which
34065  # to not find them
34066  if test "x$new_path" = x \
34067      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34068      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34069    new_path=`$CYGPATH -u "$path"`
34070  fi
34071  if test "x$new_path" = x; then
34072    # Oops. Which didn't find the executable.
34073    # The splitting of arguments from the executable at a space might have been incorrect,
34074    # since paths with space are more likely in Windows. Give it another try with the whole
34075    # argument.
34076    path="$complete"
34077    arguments="EOL"
34078    new_path=`$CYGPATH -u "$path"`
34079    new_path=`$WHICH "$new_path" 2> /dev/null`
34080    # bat and cmd files are not always considered executable in cygwin causing which
34081    # to not find them
34082    if test "x$new_path" = x \
34083        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34084        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34085      new_path=`$CYGPATH -u "$path"`
34086    fi
34087    if test "x$new_path" = x; then
34088      # It's still not found. Now this is an unrecoverable error.
34089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34090$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34091      has_space=`$ECHO "$complete" | $GREP " "`
34092      if test "x$has_space" != x; then
34093        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34094$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34095      fi
34096      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34097    fi
34098  fi
34099
34100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34103  # "foo.exe" is OK but "foo" is an error.
34104  #
34105  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34106  # It is also a way to make sure we got the proper file name for the real test later on.
34107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34108  if test "x$test_shortpath" = x; then
34109    # Short path failed, file does not exist as specified.
34110    # Try adding .exe or .cmd
34111    if test -f "${new_path}.exe"; then
34112      input_to_shortpath="${new_path}.exe"
34113    elif test -f "${new_path}.cmd"; then
34114      input_to_shortpath="${new_path}.cmd"
34115    else
34116      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34117$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34118      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34119$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34120      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34121    fi
34122  else
34123    input_to_shortpath="$new_path"
34124  fi
34125
34126  # Call helper function which possibly converts this using DOS-style short mode.
34127  # If so, the updated path is stored in $new_path.
34128  new_path="$input_to_shortpath"
34129
34130  input_path="$input_to_shortpath"
34131  # Check if we need to convert this using DOS-style short mode. If the path
34132  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34133  # take no chances and rewrite it.
34134  # Note: m4 eats our [], so we need to use [ and ] instead.
34135  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34136  if test "x$has_forbidden_chars" != x; then
34137    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34138    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34139    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34140    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34141      # Going to short mode and back again did indeed matter. Since short mode is
34142      # case insensitive, let's make it lowercase to improve readability.
34143      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34144      # Now convert it back to Unix-style (cygpath)
34145      input_path=`$CYGPATH -u "$shortmode_path"`
34146      new_path="$input_path"
34147    fi
34148  fi
34149
34150  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34151  if test "x$test_cygdrive_prefix" = x; then
34152    # As a simple fix, exclude /usr/bin since it's not a real path.
34153    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34154      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34155      # a path prefixed by /cygdrive for fixpath to work.
34156      new_path="$CYGWIN_ROOT_PATH$input_path"
34157    fi
34158  fi
34159
34160  # remove trailing .exe if any
34161  new_path="${new_path/%.exe/}"
34162
34163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34164
34165  # First separate the path from the arguments. This will split at the first
34166  # space.
34167  complete="$CXX"
34168  path="${complete%% *}"
34169  tmp="$complete EOL"
34170  arguments="${tmp#* }"
34171
34172  # Input might be given as Windows format, start by converting to
34173  # unix format.
34174  new_path="$path"
34175
34176  windows_path="$new_path"
34177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34178    unix_path=`$CYGPATH -u "$windows_path"`
34179    new_path="$unix_path"
34180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34182    new_path="$unix_path"
34183  fi
34184
34185
34186  # Now try to locate executable using which
34187  new_path=`$WHICH "$new_path" 2> /dev/null`
34188
34189  if test "x$new_path" = x; then
34190    # Oops. Which didn't find the executable.
34191    # The splitting of arguments from the executable at a space might have been incorrect,
34192    # since paths with space are more likely in Windows. Give it another try with the whole
34193    # argument.
34194    path="$complete"
34195    arguments="EOL"
34196    new_path="$path"
34197
34198  windows_path="$new_path"
34199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34200    unix_path=`$CYGPATH -u "$windows_path"`
34201    new_path="$unix_path"
34202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34204    new_path="$unix_path"
34205  fi
34206
34207
34208    new_path=`$WHICH "$new_path" 2> /dev/null`
34209    # bat and cmd files are not always considered executable in MSYS causing which
34210    # to not find them
34211    if test "x$new_path" = x \
34212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34214      new_path="$path"
34215
34216  windows_path="$new_path"
34217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34218    unix_path=`$CYGPATH -u "$windows_path"`
34219    new_path="$unix_path"
34220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34222    new_path="$unix_path"
34223  fi
34224
34225    fi
34226
34227    if test "x$new_path" = x; then
34228      # It's still not found. Now this is an unrecoverable error.
34229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34230$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34231      has_space=`$ECHO "$complete" | $GREP " "`
34232      if test "x$has_space" != x; then
34233        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34234$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34235      fi
34236      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34237    fi
34238  fi
34239
34240  # Now new_path has a complete unix path to the binary
34241  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34242    # Keep paths in /bin as-is, but remove trailing .exe if any
34243    new_path="${new_path/%.exe/}"
34244    # Do not save /bin paths to all_fixpath_prefixes!
34245  else
34246    # Not in mixed or Windows style, start by that.
34247    new_path=`cmd //c echo $new_path`
34248
34249  input_path="$new_path"
34250  # Check if we need to convert this using DOS-style short mode. If the path
34251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34252  # take no chances and rewrite it.
34253  # Note: m4 eats our [], so we need to use [ and ] instead.
34254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34255  if test "x$has_forbidden_chars" != x; then
34256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34258  fi
34259
34260    # Output is in $new_path
34261
34262  windows_path="$new_path"
34263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264    unix_path=`$CYGPATH -u "$windows_path"`
34265    new_path="$unix_path"
34266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34268    new_path="$unix_path"
34269  fi
34270
34271    # remove trailing .exe if any
34272    new_path="${new_path/%.exe/}"
34273
34274    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34275    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34276  fi
34277
34278    else
34279      # We're on a unix platform. Hooray! :)
34280      # First separate the path from the arguments. This will split at the first
34281      # space.
34282      complete="$CXX"
34283      path="${complete%% *}"
34284      tmp="$complete EOL"
34285      arguments="${tmp#* }"
34286
34287      # Cannot rely on the command "which" here since it doesn't always work.
34288      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34289      if test -z "$is_absolute_path"; then
34290        # Path to executable is not absolute. Find it.
34291        IFS_save="$IFS"
34292        IFS=:
34293        for p in $PATH; do
34294          if test -f "$p/$path" && test -x "$p/$path"; then
34295            new_path="$p/$path"
34296            break
34297          fi
34298        done
34299        IFS="$IFS_save"
34300      else
34301        # This is an absolute path, we can use it without further modifications.
34302        new_path="$path"
34303      fi
34304
34305      if test "x$new_path" = x; then
34306        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34307$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34308        has_space=`$ECHO "$complete" | $GREP " "`
34309        if test "x$has_space" != x; then
34310          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34311$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34312        fi
34313        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34314      fi
34315    fi
34316
34317    # Now join together the path and the arguments once again
34318    if test "x$arguments" != xEOL; then
34319      new_complete="$new_path ${arguments% *}"
34320    else
34321      new_complete="$new_path"
34322    fi
34323
34324    if test "x$complete" != "x$new_complete"; then
34325      CXX="$new_complete"
34326      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34327$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34328    fi
34329  fi
34330
34331  TEST_COMPILER="$CXX"
34332
34333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34334$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34335  SYMLINK_ORIGINAL="$TEST_COMPILER"
34336
34337  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34338    # Follow a chain of symbolic links. Use readlink
34339    # where it exists, else fall back to horribly
34340    # complicated shell code.
34341    if test "x$READLINK_TESTED" != yes; then
34342      # On MacOSX there is a readlink tool with a different
34343      # purpose than the GNU readlink tool. Check the found readlink.
34344      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34345      if test "x$ISGNU" = x; then
34346        # A readlink that we do not know how to use.
34347        # Are there other non-GNU readlinks out there?
34348        READLINK_TESTED=yes
34349        READLINK=
34350      fi
34351    fi
34352
34353    if test "x$READLINK" != x; then
34354      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34355    else
34356      # Save the current directory for restoring afterwards
34357      STARTDIR=$PWD
34358      COUNTER=0
34359      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34360      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34361      cd $sym_link_dir
34362      # Use -P flag to resolve symlinks in directories.
34363      cd `$THEPWDCMD -P`
34364      sym_link_dir=`$THEPWDCMD -P`
34365      # Resolve file symlinks
34366      while test $COUNTER -lt 20; do
34367        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34368        if test "x$ISLINK" == x; then
34369          # This is not a symbolic link! We are done!
34370          break
34371        fi
34372        # Again resolve directory symlinks since the target of the just found
34373        # link could be in a different directory
34374        cd `$DIRNAME $ISLINK`
34375        sym_link_dir=`$THEPWDCMD -P`
34376        sym_link_file=`$BASENAME $ISLINK`
34377        let COUNTER=COUNTER+1
34378      done
34379      cd $STARTDIR
34380      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34381    fi
34382  fi
34383
34384  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34386$as_echo "no symlink" >&6; }
34387  else
34388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34389$as_echo "$SYMLINK_ORIGINAL" >&6; }
34390
34391    # We can't handle ccache by gcc wrappers, since we need to know if we're
34392    # using ccache. Instead ccache usage must be controlled by a configure option.
34393    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34394    if test "x$COMPILER_BASENAME" = "xccache"; then
34395      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34396$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34397      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34398    fi
34399  fi
34400
34401
34402  COMPILER=$CXX
34403  COMPILER_NAME=$COMPILER_NAME
34404
34405  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34406    # cc -V output typically looks like
34407    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34408    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34409    # Check that this is likely to be the Solaris Studio cc.
34410    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34411    if test $? -ne 0; then
34412      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34413      { $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
34414$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34415      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34416$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34417      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34418$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34419      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34420    fi
34421    # Remove usage instructions (if present), and
34422    # collapse compiler output into a single line
34423    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34424        $SED -e 's/ *[Uu]sage:.*//'`
34425    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34426        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34427  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34428    # xlc -qversion output typically looks like
34429    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34430    #     Version: 11.01.0000.0015
34431    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34432    # Check that this is likely to be the IBM XL C compiler.
34433    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34434    if test $? -ne 0; then
34435      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34436      { $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
34437$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34438      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34439$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34440      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34441$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34442      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34443    fi
34444    # Collapse compiler output into a single line
34445    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34446    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34447        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34448  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34449    # There is no specific version flag, but all output starts with a version string.
34450    # First line typically looks something like:
34451    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34452    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34453    # Check that this is likely to be Microsoft CL.EXE.
34454    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34455    if test $? -ne 0; then
34456      { $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
34457$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34458      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34459$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34460      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34461    fi
34462    # Collapse compiler output into a single line
34463    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34464    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34465        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34466  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34467    # gcc --version output typically looks like
34468    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34469    #     Copyright (C) 2013 Free Software Foundation, Inc.
34470    #     This is free software; see the source for copying conditions.  There is NO
34471    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34472    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34473    # Check that this is likely to be GCC.
34474    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34475    if test $? -ne 0; then
34476      { $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
34477$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34478      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34479$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34480      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34481    fi
34482    # Remove Copyright and legalese from version string, and
34483    # collapse into a single line
34484    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34485        $SED -e 's/ *Copyright .*//'`
34486    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34487        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34488  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34489    # clang --version output typically looks like
34490    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34491    #    clang version 3.3 (tags/RELEASE_33/final)
34492    # or
34493    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34494    #    Target: x86_64-pc-linux-gnu
34495    #    Thread model: posix
34496    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34497    # Check that this is likely to be clang
34498    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34499    if test $? -ne 0; then
34500      { $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
34501$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34502      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34503$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34504      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34505    fi
34506    # Collapse compiler output into a single line
34507    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34508    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34509        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34510  else
34511      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34512  fi
34513  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34514  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34515  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34516  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34517
34518  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34519$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34520
34521
34522  # Now that we have resolved CXX ourself, let autoconf have its go at it
34523  ac_ext=cpp
34524ac_cpp='$CXXCPP $CPPFLAGS'
34525ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34526ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34527ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34528if test -z "$CXX"; then
34529  if test -n "$CCC"; then
34530    CXX=$CCC
34531  else
34532    if test -n "$ac_tool_prefix"; then
34533  for ac_prog in $CXX
34534  do
34535    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34536set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34538$as_echo_n "checking for $ac_word... " >&6; }
34539if ${ac_cv_prog_CXX+:} false; then :
34540  $as_echo_n "(cached) " >&6
34541else
34542  if test -n "$CXX"; then
34543  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34544else
34545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34546for as_dir in $PATH
34547do
34548  IFS=$as_save_IFS
34549  test -z "$as_dir" && as_dir=.
34550    for ac_exec_ext in '' $ac_executable_extensions; do
34551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34552    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34554    break 2
34555  fi
34556done
34557  done
34558IFS=$as_save_IFS
34559
34560fi
34561fi
34562CXX=$ac_cv_prog_CXX
34563if test -n "$CXX"; then
34564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34565$as_echo "$CXX" >&6; }
34566else
34567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34568$as_echo "no" >&6; }
34569fi
34570
34571
34572    test -n "$CXX" && break
34573  done
34574fi
34575if test -z "$CXX"; then
34576  ac_ct_CXX=$CXX
34577  for ac_prog in $CXX
34578do
34579  # Extract the first word of "$ac_prog", so it can be a program name with args.
34580set dummy $ac_prog; ac_word=$2
34581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34582$as_echo_n "checking for $ac_word... " >&6; }
34583if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34584  $as_echo_n "(cached) " >&6
34585else
34586  if test -n "$ac_ct_CXX"; then
34587  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34588else
34589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34590for as_dir in $PATH
34591do
34592  IFS=$as_save_IFS
34593  test -z "$as_dir" && as_dir=.
34594    for ac_exec_ext in '' $ac_executable_extensions; do
34595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34596    ac_cv_prog_ac_ct_CXX="$ac_prog"
34597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34598    break 2
34599  fi
34600done
34601  done
34602IFS=$as_save_IFS
34603
34604fi
34605fi
34606ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34607if test -n "$ac_ct_CXX"; then
34608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34609$as_echo "$ac_ct_CXX" >&6; }
34610else
34611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34612$as_echo "no" >&6; }
34613fi
34614
34615
34616  test -n "$ac_ct_CXX" && break
34617done
34618
34619  if test "x$ac_ct_CXX" = x; then
34620    CXX="g++"
34621  else
34622    case $cross_compiling:$ac_tool_warned in
34623yes:)
34624{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34625$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34626ac_tool_warned=yes ;;
34627esac
34628    CXX=$ac_ct_CXX
34629  fi
34630fi
34631
34632  fi
34633fi
34634# Provide some information about the compiler.
34635$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34636set X $ac_compile
34637ac_compiler=$2
34638for ac_option in --version -v -V -qversion; do
34639  { { ac_try="$ac_compiler $ac_option >&5"
34640case "(($ac_try" in
34641  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34642  *) ac_try_echo=$ac_try;;
34643esac
34644eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34645$as_echo "$ac_try_echo"; } >&5
34646  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34647  ac_status=$?
34648  if test -s conftest.err; then
34649    sed '10a\
34650... rest of stderr output deleted ...
34651         10q' conftest.err >conftest.er1
34652    cat conftest.er1 >&5
34653  fi
34654  rm -f conftest.er1 conftest.err
34655  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34656  test $ac_status = 0; }
34657done
34658
34659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34660$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34661if ${ac_cv_cxx_compiler_gnu+:} false; then :
34662  $as_echo_n "(cached) " >&6
34663else
34664  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34665/* end confdefs.h.  */
34666
34667int
34668main ()
34669{
34670#ifndef __GNUC__
34671       choke me
34672#endif
34673
34674  ;
34675  return 0;
34676}
34677_ACEOF
34678if ac_fn_cxx_try_compile "$LINENO"; then :
34679  ac_compiler_gnu=yes
34680else
34681  ac_compiler_gnu=no
34682fi
34683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34684ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34685
34686fi
34687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34688$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34689if test $ac_compiler_gnu = yes; then
34690  GXX=yes
34691else
34692  GXX=
34693fi
34694ac_test_CXXFLAGS=${CXXFLAGS+set}
34695ac_save_CXXFLAGS=$CXXFLAGS
34696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34697$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34698if ${ac_cv_prog_cxx_g+:} false; then :
34699  $as_echo_n "(cached) " >&6
34700else
34701  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34702   ac_cxx_werror_flag=yes
34703   ac_cv_prog_cxx_g=no
34704   CXXFLAGS="-g"
34705   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34706/* end confdefs.h.  */
34707
34708int
34709main ()
34710{
34711
34712  ;
34713  return 0;
34714}
34715_ACEOF
34716if ac_fn_cxx_try_compile "$LINENO"; then :
34717  ac_cv_prog_cxx_g=yes
34718else
34719  CXXFLAGS=""
34720      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34721/* end confdefs.h.  */
34722
34723int
34724main ()
34725{
34726
34727  ;
34728  return 0;
34729}
34730_ACEOF
34731if ac_fn_cxx_try_compile "$LINENO"; then :
34732
34733else
34734  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34735	 CXXFLAGS="-g"
34736	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34737/* end confdefs.h.  */
34738
34739int
34740main ()
34741{
34742
34743  ;
34744  return 0;
34745}
34746_ACEOF
34747if ac_fn_cxx_try_compile "$LINENO"; then :
34748  ac_cv_prog_cxx_g=yes
34749fi
34750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34751fi
34752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34753fi
34754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34755   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34756fi
34757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34758$as_echo "$ac_cv_prog_cxx_g" >&6; }
34759if test "$ac_test_CXXFLAGS" = set; then
34760  CXXFLAGS=$ac_save_CXXFLAGS
34761elif test $ac_cv_prog_cxx_g = yes; then
34762  if test "$GXX" = yes; then
34763    CXXFLAGS="-g -O2"
34764  else
34765    CXXFLAGS="-g"
34766  fi
34767else
34768  if test "$GXX" = yes; then
34769    CXXFLAGS="-O2"
34770  else
34771    CXXFLAGS=
34772  fi
34773fi
34774ac_ext=cpp
34775ac_cpp='$CXXCPP $CPPFLAGS'
34776ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34777ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34778ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34779
34780
34781  # This is the compiler version number on the form X.Y[.Z]
34782
34783
34784
34785
34786  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34787    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34788$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34789    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34790$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34791  fi
34792
34793  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34794  if  [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34795    { $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
34796$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;}
34797  fi
34798
34799  if  [[  "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34800    { $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
34801$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34802  fi
34803
34804  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34805
34806
34807  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
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
34847
34848
34849
34850    # Execute function body
34851
34852  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34853  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34854
34855  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34856    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34857  fi
34858
34859  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34860    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34861  fi
34862
34863  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34864  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34865
34866  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34867    :
34868
34869  else
34870    :
34871
34872          { $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
34873$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34874
34875
34876  fi
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889  fi
34890
34891  #
34892  # Setup the preprocessor (CPP and CXXCPP)
34893  #
34894  ac_ext=c
34895ac_cpp='$CPP $CPPFLAGS'
34896ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34897ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34898ac_compiler_gnu=$ac_cv_c_compiler_gnu
34899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34900$as_echo_n "checking how to run the C preprocessor... " >&6; }
34901# On Suns, sometimes $CPP names a directory.
34902if test -n "$CPP" && test -d "$CPP"; then
34903  CPP=
34904fi
34905if test -z "$CPP"; then
34906  if ${ac_cv_prog_CPP+:} false; then :
34907  $as_echo_n "(cached) " >&6
34908else
34909      # Double quotes because CPP needs to be expanded
34910    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34911    do
34912      ac_preproc_ok=false
34913for ac_c_preproc_warn_flag in '' yes
34914do
34915  # Use a header file that comes with gcc, so configuring glibc
34916  # with a fresh cross-compiler works.
34917  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34918  # <limits.h> exists even on freestanding compilers.
34919  # On the NeXT, cc -E runs the code through the compiler's parser,
34920  # not just through cpp. "Syntax error" is here to catch this case.
34921  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34922/* end confdefs.h.  */
34923#ifdef __STDC__
34924# include <limits.h>
34925#else
34926# include <assert.h>
34927#endif
34928		     Syntax error
34929_ACEOF
34930if ac_fn_c_try_cpp "$LINENO"; then :
34931
34932else
34933  # Broken: fails on valid input.
34934continue
34935fi
34936rm -f conftest.err conftest.i conftest.$ac_ext
34937
34938  # OK, works on sane cases.  Now check whether nonexistent headers
34939  # can be detected and how.
34940  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34941/* end confdefs.h.  */
34942#include <ac_nonexistent.h>
34943_ACEOF
34944if ac_fn_c_try_cpp "$LINENO"; then :
34945  # Broken: success on invalid input.
34946continue
34947else
34948  # Passes both tests.
34949ac_preproc_ok=:
34950break
34951fi
34952rm -f conftest.err conftest.i conftest.$ac_ext
34953
34954done
34955# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34956rm -f conftest.i conftest.err conftest.$ac_ext
34957if $ac_preproc_ok; then :
34958  break
34959fi
34960
34961    done
34962    ac_cv_prog_CPP=$CPP
34963
34964fi
34965  CPP=$ac_cv_prog_CPP
34966else
34967  ac_cv_prog_CPP=$CPP
34968fi
34969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34970$as_echo "$CPP" >&6; }
34971ac_preproc_ok=false
34972for ac_c_preproc_warn_flag in '' yes
34973do
34974  # Use a header file that comes with gcc, so configuring glibc
34975  # with a fresh cross-compiler works.
34976  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34977  # <limits.h> exists even on freestanding compilers.
34978  # On the NeXT, cc -E runs the code through the compiler's parser,
34979  # not just through cpp. "Syntax error" is here to catch this case.
34980  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34981/* end confdefs.h.  */
34982#ifdef __STDC__
34983# include <limits.h>
34984#else
34985# include <assert.h>
34986#endif
34987		     Syntax error
34988_ACEOF
34989if ac_fn_c_try_cpp "$LINENO"; then :
34990
34991else
34992  # Broken: fails on valid input.
34993continue
34994fi
34995rm -f conftest.err conftest.i conftest.$ac_ext
34996
34997  # OK, works on sane cases.  Now check whether nonexistent headers
34998  # can be detected and how.
34999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35000/* end confdefs.h.  */
35001#include <ac_nonexistent.h>
35002_ACEOF
35003if ac_fn_c_try_cpp "$LINENO"; then :
35004  # Broken: success on invalid input.
35005continue
35006else
35007  # Passes both tests.
35008ac_preproc_ok=:
35009break
35010fi
35011rm -f conftest.err conftest.i conftest.$ac_ext
35012
35013done
35014# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35015rm -f conftest.i conftest.err conftest.$ac_ext
35016if $ac_preproc_ok; then :
35017
35018else
35019  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35020$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35021as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35022See \`config.log' for more details" "$LINENO" 5; }
35023fi
35024
35025ac_ext=cpp
35026ac_cpp='$CXXCPP $CPPFLAGS'
35027ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35028ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35029ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35030
35031
35032  # Only process if variable expands to non-empty
35033
35034  if test "x$CPP" != x; then
35035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35036
35037  # First separate the path from the arguments. This will split at the first
35038  # space.
35039  complete="$CPP"
35040  path="${complete%% *}"
35041  tmp="$complete EOL"
35042  arguments="${tmp#* }"
35043
35044  # Input might be given as Windows format, start by converting to
35045  # unix format.
35046  new_path=`$CYGPATH -u "$path"`
35047
35048  # Now try to locate executable using which
35049  new_path=`$WHICH "$new_path" 2> /dev/null`
35050  # bat and cmd files are not always considered executable in cygwin causing which
35051  # to not find them
35052  if test "x$new_path" = x \
35053      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35054      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35055    new_path=`$CYGPATH -u "$path"`
35056  fi
35057  if test "x$new_path" = x; then
35058    # Oops. Which didn't find the executable.
35059    # The splitting of arguments from the executable at a space might have been incorrect,
35060    # since paths with space are more likely in Windows. Give it another try with the whole
35061    # argument.
35062    path="$complete"
35063    arguments="EOL"
35064    new_path=`$CYGPATH -u "$path"`
35065    new_path=`$WHICH "$new_path" 2> /dev/null`
35066    # bat and cmd files are not always considered executable in cygwin causing which
35067    # to not find them
35068    if test "x$new_path" = x \
35069        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35070        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35071      new_path=`$CYGPATH -u "$path"`
35072    fi
35073    if test "x$new_path" = x; then
35074      # It's still not found. Now this is an unrecoverable error.
35075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35076$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35077      has_space=`$ECHO "$complete" | $GREP " "`
35078      if test "x$has_space" != x; then
35079        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35080$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35081      fi
35082      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35083    fi
35084  fi
35085
35086  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35087  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35088  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35089  # "foo.exe" is OK but "foo" is an error.
35090  #
35091  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35092  # It is also a way to make sure we got the proper file name for the real test later on.
35093  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35094  if test "x$test_shortpath" = x; then
35095    # Short path failed, file does not exist as specified.
35096    # Try adding .exe or .cmd
35097    if test -f "${new_path}.exe"; then
35098      input_to_shortpath="${new_path}.exe"
35099    elif test -f "${new_path}.cmd"; then
35100      input_to_shortpath="${new_path}.cmd"
35101    else
35102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35103$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35104      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35105$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35106      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35107    fi
35108  else
35109    input_to_shortpath="$new_path"
35110  fi
35111
35112  # Call helper function which possibly converts this using DOS-style short mode.
35113  # If so, the updated path is stored in $new_path.
35114  new_path="$input_to_shortpath"
35115
35116  input_path="$input_to_shortpath"
35117  # Check if we need to convert this using DOS-style short mode. If the path
35118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35119  # take no chances and rewrite it.
35120  # Note: m4 eats our [], so we need to use [ and ] instead.
35121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35122  if test "x$has_forbidden_chars" != x; then
35123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35127      # Going to short mode and back again did indeed matter. Since short mode is
35128      # case insensitive, let's make it lowercase to improve readability.
35129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35130      # Now convert it back to Unix-style (cygpath)
35131      input_path=`$CYGPATH -u "$shortmode_path"`
35132      new_path="$input_path"
35133    fi
35134  fi
35135
35136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35137  if test "x$test_cygdrive_prefix" = x; then
35138    # As a simple fix, exclude /usr/bin since it's not a real path.
35139    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35141      # a path prefixed by /cygdrive for fixpath to work.
35142      new_path="$CYGWIN_ROOT_PATH$input_path"
35143    fi
35144  fi
35145
35146  # remove trailing .exe if any
35147  new_path="${new_path/%.exe/}"
35148
35149    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35150
35151  # First separate the path from the arguments. This will split at the first
35152  # space.
35153  complete="$CPP"
35154  path="${complete%% *}"
35155  tmp="$complete EOL"
35156  arguments="${tmp#* }"
35157
35158  # Input might be given as Windows format, start by converting to
35159  # unix format.
35160  new_path="$path"
35161
35162  windows_path="$new_path"
35163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35164    unix_path=`$CYGPATH -u "$windows_path"`
35165    new_path="$unix_path"
35166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35168    new_path="$unix_path"
35169  fi
35170
35171
35172  # Now try to locate executable using which
35173  new_path=`$WHICH "$new_path" 2> /dev/null`
35174
35175  if test "x$new_path" = x; then
35176    # Oops. Which didn't find the executable.
35177    # The splitting of arguments from the executable at a space might have been incorrect,
35178    # since paths with space are more likely in Windows. Give it another try with the whole
35179    # argument.
35180    path="$complete"
35181    arguments="EOL"
35182    new_path="$path"
35183
35184  windows_path="$new_path"
35185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35186    unix_path=`$CYGPATH -u "$windows_path"`
35187    new_path="$unix_path"
35188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35190    new_path="$unix_path"
35191  fi
35192
35193
35194    new_path=`$WHICH "$new_path" 2> /dev/null`
35195    # bat and cmd files are not always considered executable in MSYS causing which
35196    # to not find them
35197    if test "x$new_path" = x \
35198        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35199        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35200      new_path="$path"
35201
35202  windows_path="$new_path"
35203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35204    unix_path=`$CYGPATH -u "$windows_path"`
35205    new_path="$unix_path"
35206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35208    new_path="$unix_path"
35209  fi
35210
35211    fi
35212
35213    if test "x$new_path" = x; then
35214      # It's still not found. Now this is an unrecoverable error.
35215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35216$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35217      has_space=`$ECHO "$complete" | $GREP " "`
35218      if test "x$has_space" != x; then
35219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35221      fi
35222      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35223    fi
35224  fi
35225
35226  # Now new_path has a complete unix path to the binary
35227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35228    # Keep paths in /bin as-is, but remove trailing .exe if any
35229    new_path="${new_path/%.exe/}"
35230    # Do not save /bin paths to all_fixpath_prefixes!
35231  else
35232    # Not in mixed or Windows style, start by that.
35233    new_path=`cmd //c echo $new_path`
35234
35235  input_path="$new_path"
35236  # Check if we need to convert this using DOS-style short mode. If the path
35237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35238  # take no chances and rewrite it.
35239  # Note: m4 eats our [], so we need to use [ and ] instead.
35240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35241  if test "x$has_forbidden_chars" != x; then
35242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35244  fi
35245
35246    # Output is in $new_path
35247
35248  windows_path="$new_path"
35249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35250    unix_path=`$CYGPATH -u "$windows_path"`
35251    new_path="$unix_path"
35252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35254    new_path="$unix_path"
35255  fi
35256
35257    # remove trailing .exe if any
35258    new_path="${new_path/%.exe/}"
35259
35260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35262  fi
35263
35264    else
35265      # We're on a unix platform. Hooray! :)
35266      # First separate the path from the arguments. This will split at the first
35267      # space.
35268      complete="$CPP"
35269      path="${complete%% *}"
35270      tmp="$complete EOL"
35271      arguments="${tmp#* }"
35272
35273      # Cannot rely on the command "which" here since it doesn't always work.
35274      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35275      if test -z "$is_absolute_path"; then
35276        # Path to executable is not absolute. Find it.
35277        IFS_save="$IFS"
35278        IFS=:
35279        for p in $PATH; do
35280          if test -f "$p/$path" && test -x "$p/$path"; then
35281            new_path="$p/$path"
35282            break
35283          fi
35284        done
35285        IFS="$IFS_save"
35286      else
35287        # This is an absolute path, we can use it without further modifications.
35288        new_path="$path"
35289      fi
35290
35291      if test "x$new_path" = x; then
35292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35293$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35294        has_space=`$ECHO "$complete" | $GREP " "`
35295        if test "x$has_space" != x; then
35296          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35298        fi
35299        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35300      fi
35301    fi
35302
35303    # Now join together the path and the arguments once again
35304    if test "x$arguments" != xEOL; then
35305      new_complete="$new_path ${arguments% *}"
35306    else
35307      new_complete="$new_path"
35308    fi
35309
35310    if test "x$complete" != "x$new_complete"; then
35311      CPP="$new_complete"
35312      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35313$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35314    fi
35315  fi
35316
35317  ac_ext=cpp
35318ac_cpp='$CXXCPP $CPPFLAGS'
35319ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35320ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35321ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35323$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35324if test -z "$CXXCPP"; then
35325  if ${ac_cv_prog_CXXCPP+:} false; then :
35326  $as_echo_n "(cached) " >&6
35327else
35328      # Double quotes because CXXCPP needs to be expanded
35329    for CXXCPP in "$CXX -E" "/lib/cpp"
35330    do
35331      ac_preproc_ok=false
35332for ac_cxx_preproc_warn_flag in '' yes
35333do
35334  # Use a header file that comes with gcc, so configuring glibc
35335  # with a fresh cross-compiler works.
35336  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35337  # <limits.h> exists even on freestanding compilers.
35338  # On the NeXT, cc -E runs the code through the compiler's parser,
35339  # not just through cpp. "Syntax error" is here to catch this case.
35340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35341/* end confdefs.h.  */
35342#ifdef __STDC__
35343# include <limits.h>
35344#else
35345# include <assert.h>
35346#endif
35347		     Syntax error
35348_ACEOF
35349if ac_fn_cxx_try_cpp "$LINENO"; then :
35350
35351else
35352  # Broken: fails on valid input.
35353continue
35354fi
35355rm -f conftest.err conftest.i conftest.$ac_ext
35356
35357  # OK, works on sane cases.  Now check whether nonexistent headers
35358  # can be detected and how.
35359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35360/* end confdefs.h.  */
35361#include <ac_nonexistent.h>
35362_ACEOF
35363if ac_fn_cxx_try_cpp "$LINENO"; then :
35364  # Broken: success on invalid input.
35365continue
35366else
35367  # Passes both tests.
35368ac_preproc_ok=:
35369break
35370fi
35371rm -f conftest.err conftest.i conftest.$ac_ext
35372
35373done
35374# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35375rm -f conftest.i conftest.err conftest.$ac_ext
35376if $ac_preproc_ok; then :
35377  break
35378fi
35379
35380    done
35381    ac_cv_prog_CXXCPP=$CXXCPP
35382
35383fi
35384  CXXCPP=$ac_cv_prog_CXXCPP
35385else
35386  ac_cv_prog_CXXCPP=$CXXCPP
35387fi
35388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35389$as_echo "$CXXCPP" >&6; }
35390ac_preproc_ok=false
35391for ac_cxx_preproc_warn_flag in '' yes
35392do
35393  # Use a header file that comes with gcc, so configuring glibc
35394  # with a fresh cross-compiler works.
35395  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35396  # <limits.h> exists even on freestanding compilers.
35397  # On the NeXT, cc -E runs the code through the compiler's parser,
35398  # not just through cpp. "Syntax error" is here to catch this case.
35399  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35400/* end confdefs.h.  */
35401#ifdef __STDC__
35402# include <limits.h>
35403#else
35404# include <assert.h>
35405#endif
35406		     Syntax error
35407_ACEOF
35408if ac_fn_cxx_try_cpp "$LINENO"; then :
35409
35410else
35411  # Broken: fails on valid input.
35412continue
35413fi
35414rm -f conftest.err conftest.i conftest.$ac_ext
35415
35416  # OK, works on sane cases.  Now check whether nonexistent headers
35417  # can be detected and how.
35418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35419/* end confdefs.h.  */
35420#include <ac_nonexistent.h>
35421_ACEOF
35422if ac_fn_cxx_try_cpp "$LINENO"; then :
35423  # Broken: success on invalid input.
35424continue
35425else
35426  # Passes both tests.
35427ac_preproc_ok=:
35428break
35429fi
35430rm -f conftest.err conftest.i conftest.$ac_ext
35431
35432done
35433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35434rm -f conftest.i conftest.err conftest.$ac_ext
35435if $ac_preproc_ok; then :
35436
35437else
35438  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35440as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35441See \`config.log' for more details" "$LINENO" 5; }
35442fi
35443
35444ac_ext=cpp
35445ac_cpp='$CXXCPP $CPPFLAGS'
35446ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35447ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35448ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35449
35450
35451  # Only process if variable expands to non-empty
35452
35453  if test "x$CXXCPP" != x; then
35454    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35455
35456  # First separate the path from the arguments. This will split at the first
35457  # space.
35458  complete="$CXXCPP"
35459  path="${complete%% *}"
35460  tmp="$complete EOL"
35461  arguments="${tmp#* }"
35462
35463  # Input might be given as Windows format, start by converting to
35464  # unix format.
35465  new_path=`$CYGPATH -u "$path"`
35466
35467  # Now try to locate executable using which
35468  new_path=`$WHICH "$new_path" 2> /dev/null`
35469  # bat and cmd files are not always considered executable in cygwin causing which
35470  # to not find them
35471  if test "x$new_path" = x \
35472      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35473      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35474    new_path=`$CYGPATH -u "$path"`
35475  fi
35476  if test "x$new_path" = x; then
35477    # Oops. Which didn't find the executable.
35478    # The splitting of arguments from the executable at a space might have been incorrect,
35479    # since paths with space are more likely in Windows. Give it another try with the whole
35480    # argument.
35481    path="$complete"
35482    arguments="EOL"
35483    new_path=`$CYGPATH -u "$path"`
35484    new_path=`$WHICH "$new_path" 2> /dev/null`
35485    # bat and cmd files are not always considered executable in cygwin causing which
35486    # to not find them
35487    if test "x$new_path" = x \
35488        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35489        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35490      new_path=`$CYGPATH -u "$path"`
35491    fi
35492    if test "x$new_path" = x; then
35493      # It's still not found. Now this is an unrecoverable error.
35494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35495$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35496      has_space=`$ECHO "$complete" | $GREP " "`
35497      if test "x$has_space" != x; then
35498        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35499$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35500      fi
35501      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35502    fi
35503  fi
35504
35505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35508  # "foo.exe" is OK but "foo" is an error.
35509  #
35510  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35511  # It is also a way to make sure we got the proper file name for the real test later on.
35512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35513  if test "x$test_shortpath" = x; then
35514    # Short path failed, file does not exist as specified.
35515    # Try adding .exe or .cmd
35516    if test -f "${new_path}.exe"; then
35517      input_to_shortpath="${new_path}.exe"
35518    elif test -f "${new_path}.cmd"; then
35519      input_to_shortpath="${new_path}.cmd"
35520    else
35521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35522$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35523      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35524$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35525      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35526    fi
35527  else
35528    input_to_shortpath="$new_path"
35529  fi
35530
35531  # Call helper function which possibly converts this using DOS-style short mode.
35532  # If so, the updated path is stored in $new_path.
35533  new_path="$input_to_shortpath"
35534
35535  input_path="$input_to_shortpath"
35536  # Check if we need to convert this using DOS-style short mode. If the path
35537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35538  # take no chances and rewrite it.
35539  # Note: m4 eats our [], so we need to use [ and ] instead.
35540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35541  if test "x$has_forbidden_chars" != x; then
35542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35546      # Going to short mode and back again did indeed matter. Since short mode is
35547      # case insensitive, let's make it lowercase to improve readability.
35548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35549      # Now convert it back to Unix-style (cygpath)
35550      input_path=`$CYGPATH -u "$shortmode_path"`
35551      new_path="$input_path"
35552    fi
35553  fi
35554
35555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35556  if test "x$test_cygdrive_prefix" = x; then
35557    # As a simple fix, exclude /usr/bin since it's not a real path.
35558    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35560      # a path prefixed by /cygdrive for fixpath to work.
35561      new_path="$CYGWIN_ROOT_PATH$input_path"
35562    fi
35563  fi
35564
35565  # remove trailing .exe if any
35566  new_path="${new_path/%.exe/}"
35567
35568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35569
35570  # First separate the path from the arguments. This will split at the first
35571  # space.
35572  complete="$CXXCPP"
35573  path="${complete%% *}"
35574  tmp="$complete EOL"
35575  arguments="${tmp#* }"
35576
35577  # Input might be given as Windows format, start by converting to
35578  # unix format.
35579  new_path="$path"
35580
35581  windows_path="$new_path"
35582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35583    unix_path=`$CYGPATH -u "$windows_path"`
35584    new_path="$unix_path"
35585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35587    new_path="$unix_path"
35588  fi
35589
35590
35591  # Now try to locate executable using which
35592  new_path=`$WHICH "$new_path" 2> /dev/null`
35593
35594  if test "x$new_path" = x; then
35595    # Oops. Which didn't find the executable.
35596    # The splitting of arguments from the executable at a space might have been incorrect,
35597    # since paths with space are more likely in Windows. Give it another try with the whole
35598    # argument.
35599    path="$complete"
35600    arguments="EOL"
35601    new_path="$path"
35602
35603  windows_path="$new_path"
35604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35605    unix_path=`$CYGPATH -u "$windows_path"`
35606    new_path="$unix_path"
35607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35609    new_path="$unix_path"
35610  fi
35611
35612
35613    new_path=`$WHICH "$new_path" 2> /dev/null`
35614    # bat and cmd files are not always considered executable in MSYS causing which
35615    # to not find them
35616    if test "x$new_path" = x \
35617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35619      new_path="$path"
35620
35621  windows_path="$new_path"
35622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35623    unix_path=`$CYGPATH -u "$windows_path"`
35624    new_path="$unix_path"
35625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35627    new_path="$unix_path"
35628  fi
35629
35630    fi
35631
35632    if test "x$new_path" = x; then
35633      # It's still not found. Now this is an unrecoverable error.
35634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35635$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35636      has_space=`$ECHO "$complete" | $GREP " "`
35637      if test "x$has_space" != x; then
35638        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35639$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35640      fi
35641      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35642    fi
35643  fi
35644
35645  # Now new_path has a complete unix path to the binary
35646  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35647    # Keep paths in /bin as-is, but remove trailing .exe if any
35648    new_path="${new_path/%.exe/}"
35649    # Do not save /bin paths to all_fixpath_prefixes!
35650  else
35651    # Not in mixed or Windows style, start by that.
35652    new_path=`cmd //c echo $new_path`
35653
35654  input_path="$new_path"
35655  # Check if we need to convert this using DOS-style short mode. If the path
35656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35657  # take no chances and rewrite it.
35658  # Note: m4 eats our [], so we need to use [ and ] instead.
35659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35660  if test "x$has_forbidden_chars" != x; then
35661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35663  fi
35664
35665    # Output is in $new_path
35666
35667  windows_path="$new_path"
35668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35669    unix_path=`$CYGPATH -u "$windows_path"`
35670    new_path="$unix_path"
35671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35673    new_path="$unix_path"
35674  fi
35675
35676    # remove trailing .exe if any
35677    new_path="${new_path/%.exe/}"
35678
35679    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35680    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35681  fi
35682
35683    else
35684      # We're on a unix platform. Hooray! :)
35685      # First separate the path from the arguments. This will split at the first
35686      # space.
35687      complete="$CXXCPP"
35688      path="${complete%% *}"
35689      tmp="$complete EOL"
35690      arguments="${tmp#* }"
35691
35692      # Cannot rely on the command "which" here since it doesn't always work.
35693      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35694      if test -z "$is_absolute_path"; then
35695        # Path to executable is not absolute. Find it.
35696        IFS_save="$IFS"
35697        IFS=:
35698        for p in $PATH; do
35699          if test -f "$p/$path" && test -x "$p/$path"; then
35700            new_path="$p/$path"
35701            break
35702          fi
35703        done
35704        IFS="$IFS_save"
35705      else
35706        # This is an absolute path, we can use it without further modifications.
35707        new_path="$path"
35708      fi
35709
35710      if test "x$new_path" = x; then
35711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35712$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35713        has_space=`$ECHO "$complete" | $GREP " "`
35714        if test "x$has_space" != x; then
35715          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35716$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35717        fi
35718        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35719      fi
35720    fi
35721
35722    # Now join together the path and the arguments once again
35723    if test "x$arguments" != xEOL; then
35724      new_complete="$new_path ${arguments% *}"
35725    else
35726      new_complete="$new_path"
35727    fi
35728
35729    if test "x$complete" != "x$new_complete"; then
35730      CXXCPP="$new_complete"
35731      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35732$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35733    fi
35734  fi
35735
35736
35737  #
35738  # Setup the linker (LD)
35739  #
35740  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35741    # In the Microsoft toolchain we have a separate LD command "link".
35742    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35743    # a cygwin program for something completely different.
35744    # Extract the first word of "link", so it can be a program name with args.
35745set dummy link; ac_word=$2
35746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35747$as_echo_n "checking for $ac_word... " >&6; }
35748if ${ac_cv_prog_LD+:} false; then :
35749  $as_echo_n "(cached) " >&6
35750else
35751  if test -n "$LD"; then
35752  ac_cv_prog_LD="$LD" # Let the user override the test.
35753else
35754  ac_prog_rejected=no
35755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35756for as_dir in $PATH
35757do
35758  IFS=$as_save_IFS
35759  test -z "$as_dir" && as_dir=.
35760    for ac_exec_ext in '' $ac_executable_extensions; do
35761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35762    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35763       ac_prog_rejected=yes
35764       continue
35765     fi
35766    ac_cv_prog_LD="link"
35767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35768    break 2
35769  fi
35770done
35771  done
35772IFS=$as_save_IFS
35773
35774if test $ac_prog_rejected = yes; then
35775  # We found a bogon in the path, so make sure we never use it.
35776  set dummy $ac_cv_prog_LD
35777  shift
35778  if test $# != 0; then
35779    # We chose a different compiler from the bogus one.
35780    # However, it has the same basename, so the bogon will be chosen
35781    # first if we set LD to just the basename; use the full file name.
35782    shift
35783    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35784  fi
35785fi
35786fi
35787fi
35788LD=$ac_cv_prog_LD
35789if test -n "$LD"; then
35790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35791$as_echo "$LD" >&6; }
35792else
35793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35794$as_echo "no" >&6; }
35795fi
35796
35797
35798
35799  # Only process if variable expands to non-empty
35800
35801  if test "x$LD" != x; then
35802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35803
35804  # First separate the path from the arguments. This will split at the first
35805  # space.
35806  complete="$LD"
35807  path="${complete%% *}"
35808  tmp="$complete EOL"
35809  arguments="${tmp#* }"
35810
35811  # Input might be given as Windows format, start by converting to
35812  # unix format.
35813  new_path=`$CYGPATH -u "$path"`
35814
35815  # Now try to locate executable using which
35816  new_path=`$WHICH "$new_path" 2> /dev/null`
35817  # bat and cmd files are not always considered executable in cygwin causing which
35818  # to not find them
35819  if test "x$new_path" = x \
35820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35822    new_path=`$CYGPATH -u "$path"`
35823  fi
35824  if test "x$new_path" = x; then
35825    # Oops. Which didn't find the executable.
35826    # The splitting of arguments from the executable at a space might have been incorrect,
35827    # since paths with space are more likely in Windows. Give it another try with the whole
35828    # argument.
35829    path="$complete"
35830    arguments="EOL"
35831    new_path=`$CYGPATH -u "$path"`
35832    new_path=`$WHICH "$new_path" 2> /dev/null`
35833    # bat and cmd files are not always considered executable in cygwin causing which
35834    # to not find them
35835    if test "x$new_path" = x \
35836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35838      new_path=`$CYGPATH -u "$path"`
35839    fi
35840    if test "x$new_path" = x; then
35841      # It's still not found. Now this is an unrecoverable error.
35842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35843$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35844      has_space=`$ECHO "$complete" | $GREP " "`
35845      if test "x$has_space" != x; then
35846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35848      fi
35849      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35850    fi
35851  fi
35852
35853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35856  # "foo.exe" is OK but "foo" is an error.
35857  #
35858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35859  # It is also a way to make sure we got the proper file name for the real test later on.
35860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35861  if test "x$test_shortpath" = x; then
35862    # Short path failed, file does not exist as specified.
35863    # Try adding .exe or .cmd
35864    if test -f "${new_path}.exe"; then
35865      input_to_shortpath="${new_path}.exe"
35866    elif test -f "${new_path}.cmd"; then
35867      input_to_shortpath="${new_path}.cmd"
35868    else
35869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35870$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35873      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35874    fi
35875  else
35876    input_to_shortpath="$new_path"
35877  fi
35878
35879  # Call helper function which possibly converts this using DOS-style short mode.
35880  # If so, the updated path is stored in $new_path.
35881  new_path="$input_to_shortpath"
35882
35883  input_path="$input_to_shortpath"
35884  # Check if we need to convert this using DOS-style short mode. If the path
35885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35886  # take no chances and rewrite it.
35887  # Note: m4 eats our [], so we need to use [ and ] instead.
35888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35889  if test "x$has_forbidden_chars" != x; then
35890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35894      # Going to short mode and back again did indeed matter. Since short mode is
35895      # case insensitive, let's make it lowercase to improve readability.
35896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35897      # Now convert it back to Unix-style (cygpath)
35898      input_path=`$CYGPATH -u "$shortmode_path"`
35899      new_path="$input_path"
35900    fi
35901  fi
35902
35903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35904  if test "x$test_cygdrive_prefix" = x; then
35905    # As a simple fix, exclude /usr/bin since it's not a real path.
35906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35908      # a path prefixed by /cygdrive for fixpath to work.
35909      new_path="$CYGWIN_ROOT_PATH$input_path"
35910    fi
35911  fi
35912
35913  # remove trailing .exe if any
35914  new_path="${new_path/%.exe/}"
35915
35916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35917
35918  # First separate the path from the arguments. This will split at the first
35919  # space.
35920  complete="$LD"
35921  path="${complete%% *}"
35922  tmp="$complete EOL"
35923  arguments="${tmp#* }"
35924
35925  # Input might be given as Windows format, start by converting to
35926  # unix format.
35927  new_path="$path"
35928
35929  windows_path="$new_path"
35930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35931    unix_path=`$CYGPATH -u "$windows_path"`
35932    new_path="$unix_path"
35933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35935    new_path="$unix_path"
35936  fi
35937
35938
35939  # Now try to locate executable using which
35940  new_path=`$WHICH "$new_path" 2> /dev/null`
35941
35942  if test "x$new_path" = x; then
35943    # Oops. Which didn't find the executable.
35944    # The splitting of arguments from the executable at a space might have been incorrect,
35945    # since paths with space are more likely in Windows. Give it another try with the whole
35946    # argument.
35947    path="$complete"
35948    arguments="EOL"
35949    new_path="$path"
35950
35951  windows_path="$new_path"
35952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35953    unix_path=`$CYGPATH -u "$windows_path"`
35954    new_path="$unix_path"
35955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35957    new_path="$unix_path"
35958  fi
35959
35960
35961    new_path=`$WHICH "$new_path" 2> /dev/null`
35962    # bat and cmd files are not always considered executable in MSYS causing which
35963    # to not find them
35964    if test "x$new_path" = x \
35965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35967      new_path="$path"
35968
35969  windows_path="$new_path"
35970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35971    unix_path=`$CYGPATH -u "$windows_path"`
35972    new_path="$unix_path"
35973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35975    new_path="$unix_path"
35976  fi
35977
35978    fi
35979
35980    if test "x$new_path" = x; then
35981      # It's still not found. Now this is an unrecoverable error.
35982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35983$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35984      has_space=`$ECHO "$complete" | $GREP " "`
35985      if test "x$has_space" != x; then
35986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35988      fi
35989      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35990    fi
35991  fi
35992
35993  # Now new_path has a complete unix path to the binary
35994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35995    # Keep paths in /bin as-is, but remove trailing .exe if any
35996    new_path="${new_path/%.exe/}"
35997    # Do not save /bin paths to all_fixpath_prefixes!
35998  else
35999    # Not in mixed or Windows style, start by that.
36000    new_path=`cmd //c echo $new_path`
36001
36002  input_path="$new_path"
36003  # Check if we need to convert this using DOS-style short mode. If the path
36004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36005  # take no chances and rewrite it.
36006  # Note: m4 eats our [], so we need to use [ and ] instead.
36007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36008  if test "x$has_forbidden_chars" != x; then
36009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36011  fi
36012
36013    # Output is in $new_path
36014
36015  windows_path="$new_path"
36016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36017    unix_path=`$CYGPATH -u "$windows_path"`
36018    new_path="$unix_path"
36019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36021    new_path="$unix_path"
36022  fi
36023
36024    # remove trailing .exe if any
36025    new_path="${new_path/%.exe/}"
36026
36027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36029  fi
36030
36031    else
36032      # We're on a unix platform. Hooray! :)
36033      # First separate the path from the arguments. This will split at the first
36034      # space.
36035      complete="$LD"
36036      path="${complete%% *}"
36037      tmp="$complete EOL"
36038      arguments="${tmp#* }"
36039
36040      # Cannot rely on the command "which" here since it doesn't always work.
36041      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36042      if test -z "$is_absolute_path"; then
36043        # Path to executable is not absolute. Find it.
36044        IFS_save="$IFS"
36045        IFS=:
36046        for p in $PATH; do
36047          if test -f "$p/$path" && test -x "$p/$path"; then
36048            new_path="$p/$path"
36049            break
36050          fi
36051        done
36052        IFS="$IFS_save"
36053      else
36054        # This is an absolute path, we can use it without further modifications.
36055        new_path="$path"
36056      fi
36057
36058      if test "x$new_path" = x; then
36059        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36060$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36061        has_space=`$ECHO "$complete" | $GREP " "`
36062        if test "x$has_space" != x; then
36063          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36065        fi
36066        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36067      fi
36068    fi
36069
36070    # Now join together the path and the arguments once again
36071    if test "x$arguments" != xEOL; then
36072      new_complete="$new_path ${arguments% *}"
36073    else
36074      new_complete="$new_path"
36075    fi
36076
36077    if test "x$complete" != "x$new_complete"; then
36078      LD="$new_complete"
36079      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36080$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36081    fi
36082  fi
36083
36084    # Verify that we indeed succeeded with this trick.
36085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36086$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36087    "$LD" --version > /dev/null
36088    if test $? -eq 0 ; then
36089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36090$as_echo "no" >&6; }
36091      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36092    else
36093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36094$as_echo "yes" >&6; }
36095    fi
36096    LDCXX="$LD"
36097  else
36098    # All other toolchains use the compiler to link.
36099    LD="$CC"
36100    LDCXX="$CXX"
36101  fi
36102
36103  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36104
36105
36106  #
36107  # Setup the assembler (AS)
36108  #
36109  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36110    # FIXME: should this really be solaris, or solstudio?
36111
36112
36113  # Publish this variable in the help.
36114
36115
36116  if [ -z "${AS+x}" ]; then
36117    # The variable is not set by user, try to locate tool using the code snippet
36118    for ac_prog in as
36119do
36120  # Extract the first word of "$ac_prog", so it can be a program name with args.
36121set dummy $ac_prog; ac_word=$2
36122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36123$as_echo_n "checking for $ac_word... " >&6; }
36124if ${ac_cv_path_AS+:} false; then :
36125  $as_echo_n "(cached) " >&6
36126else
36127  case $AS in
36128  [\\/]* | ?:[\\/]*)
36129  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36130  ;;
36131  *)
36132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36133for as_dir in $PATH
36134do
36135  IFS=$as_save_IFS
36136  test -z "$as_dir" && as_dir=.
36137    for ac_exec_ext in '' $ac_executable_extensions; do
36138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36139    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36141    break 2
36142  fi
36143done
36144  done
36145IFS=$as_save_IFS
36146
36147  ;;
36148esac
36149fi
36150AS=$ac_cv_path_AS
36151if test -n "$AS"; then
36152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36153$as_echo "$AS" >&6; }
36154else
36155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36156$as_echo "no" >&6; }
36157fi
36158
36159
36160  test -n "$AS" && break
36161done
36162
36163  else
36164    # The variable is set, but is it from the command line or the environment?
36165
36166    # Try to remove the string !AS! from our list.
36167    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36168    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36169      # If it failed, the variable was not from the command line. Ignore it,
36170      # but warn the user (except for BASH, which is always set by the calling BASH).
36171      if test "xAS" != xBASH; then
36172        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36173$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36174      fi
36175      # Try to locate tool using the code snippet
36176      for ac_prog in as
36177do
36178  # Extract the first word of "$ac_prog", so it can be a program name with args.
36179set dummy $ac_prog; ac_word=$2
36180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36181$as_echo_n "checking for $ac_word... " >&6; }
36182if ${ac_cv_path_AS+:} false; then :
36183  $as_echo_n "(cached) " >&6
36184else
36185  case $AS in
36186  [\\/]* | ?:[\\/]*)
36187  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36188  ;;
36189  *)
36190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36191for as_dir in $PATH
36192do
36193  IFS=$as_save_IFS
36194  test -z "$as_dir" && as_dir=.
36195    for ac_exec_ext in '' $ac_executable_extensions; do
36196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36197    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36199    break 2
36200  fi
36201done
36202  done
36203IFS=$as_save_IFS
36204
36205  ;;
36206esac
36207fi
36208AS=$ac_cv_path_AS
36209if test -n "$AS"; then
36210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36211$as_echo "$AS" >&6; }
36212else
36213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36214$as_echo "no" >&6; }
36215fi
36216
36217
36218  test -n "$AS" && break
36219done
36220
36221    else
36222      # If it succeeded, then it was overridden by the user. We will use it
36223      # for the tool.
36224
36225      # First remove it from the list of overridden variables, so we can test
36226      # for unknown variables in the end.
36227      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36228
36229      # Check if we try to supply an empty value
36230      if test "x$AS" = x; then
36231        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36232$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36234$as_echo_n "checking for AS... " >&6; }
36235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36236$as_echo "disabled" >&6; }
36237      else
36238        # Check if the provided tool contains a complete path.
36239        tool_specified="$AS"
36240        tool_basename="${tool_specified##*/}"
36241        if test "x$tool_basename" = "x$tool_specified"; then
36242          # A command without a complete path is provided, search $PATH.
36243          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36244$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36245          # Extract the first word of "$tool_basename", so it can be a program name with args.
36246set dummy $tool_basename; ac_word=$2
36247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36248$as_echo_n "checking for $ac_word... " >&6; }
36249if ${ac_cv_path_AS+:} false; then :
36250  $as_echo_n "(cached) " >&6
36251else
36252  case $AS in
36253  [\\/]* | ?:[\\/]*)
36254  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36255  ;;
36256  *)
36257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36258for as_dir in $PATH
36259do
36260  IFS=$as_save_IFS
36261  test -z "$as_dir" && as_dir=.
36262    for ac_exec_ext in '' $ac_executable_extensions; do
36263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36264    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36266    break 2
36267  fi
36268done
36269  done
36270IFS=$as_save_IFS
36271
36272  ;;
36273esac
36274fi
36275AS=$ac_cv_path_AS
36276if test -n "$AS"; then
36277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36278$as_echo "$AS" >&6; }
36279else
36280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36281$as_echo "no" >&6; }
36282fi
36283
36284
36285          if test "x$AS" = x; then
36286            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36287          fi
36288        else
36289          # Otherwise we believe it is a complete path. Use it as it is.
36290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36291$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36292          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36293$as_echo_n "checking for AS... " >&6; }
36294          if test ! -x "$tool_specified"; then
36295            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36296$as_echo "not found" >&6; }
36297            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36298          fi
36299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36300$as_echo "$tool_specified" >&6; }
36301        fi
36302      fi
36303    fi
36304
36305  fi
36306
36307
36308
36309  # Only process if variable expands to non-empty
36310
36311  if test "x$AS" != x; then
36312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36313
36314  # First separate the path from the arguments. This will split at the first
36315  # space.
36316  complete="$AS"
36317  path="${complete%% *}"
36318  tmp="$complete EOL"
36319  arguments="${tmp#* }"
36320
36321  # Input might be given as Windows format, start by converting to
36322  # unix format.
36323  new_path=`$CYGPATH -u "$path"`
36324
36325  # Now try to locate executable using which
36326  new_path=`$WHICH "$new_path" 2> /dev/null`
36327  # bat and cmd files are not always considered executable in cygwin causing which
36328  # to not find them
36329  if test "x$new_path" = x \
36330      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36331      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36332    new_path=`$CYGPATH -u "$path"`
36333  fi
36334  if test "x$new_path" = x; then
36335    # Oops. Which didn't find the executable.
36336    # The splitting of arguments from the executable at a space might have been incorrect,
36337    # since paths with space are more likely in Windows. Give it another try with the whole
36338    # argument.
36339    path="$complete"
36340    arguments="EOL"
36341    new_path=`$CYGPATH -u "$path"`
36342    new_path=`$WHICH "$new_path" 2> /dev/null`
36343    # bat and cmd files are not always considered executable in cygwin causing which
36344    # to not find them
36345    if test "x$new_path" = x \
36346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36348      new_path=`$CYGPATH -u "$path"`
36349    fi
36350    if test "x$new_path" = x; then
36351      # It's still not found. Now this is an unrecoverable error.
36352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36353$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36354      has_space=`$ECHO "$complete" | $GREP " "`
36355      if test "x$has_space" != x; then
36356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36358      fi
36359      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36360    fi
36361  fi
36362
36363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36366  # "foo.exe" is OK but "foo" is an error.
36367  #
36368  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36369  # It is also a way to make sure we got the proper file name for the real test later on.
36370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36371  if test "x$test_shortpath" = x; then
36372    # Short path failed, file does not exist as specified.
36373    # Try adding .exe or .cmd
36374    if test -f "${new_path}.exe"; then
36375      input_to_shortpath="${new_path}.exe"
36376    elif test -f "${new_path}.cmd"; then
36377      input_to_shortpath="${new_path}.cmd"
36378    else
36379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36380$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36383      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36384    fi
36385  else
36386    input_to_shortpath="$new_path"
36387  fi
36388
36389  # Call helper function which possibly converts this using DOS-style short mode.
36390  # If so, the updated path is stored in $new_path.
36391  new_path="$input_to_shortpath"
36392
36393  input_path="$input_to_shortpath"
36394  # Check if we need to convert this using DOS-style short mode. If the path
36395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36396  # take no chances and rewrite it.
36397  # Note: m4 eats our [], so we need to use [ and ] instead.
36398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36399  if test "x$has_forbidden_chars" != x; then
36400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36404      # Going to short mode and back again did indeed matter. Since short mode is
36405      # case insensitive, let's make it lowercase to improve readability.
36406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36407      # Now convert it back to Unix-style (cygpath)
36408      input_path=`$CYGPATH -u "$shortmode_path"`
36409      new_path="$input_path"
36410    fi
36411  fi
36412
36413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36414  if test "x$test_cygdrive_prefix" = x; then
36415    # As a simple fix, exclude /usr/bin since it's not a real path.
36416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36418      # a path prefixed by /cygdrive for fixpath to work.
36419      new_path="$CYGWIN_ROOT_PATH$input_path"
36420    fi
36421  fi
36422
36423  # remove trailing .exe if any
36424  new_path="${new_path/%.exe/}"
36425
36426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36427
36428  # First separate the path from the arguments. This will split at the first
36429  # space.
36430  complete="$AS"
36431  path="${complete%% *}"
36432  tmp="$complete EOL"
36433  arguments="${tmp#* }"
36434
36435  # Input might be given as Windows format, start by converting to
36436  # unix format.
36437  new_path="$path"
36438
36439  windows_path="$new_path"
36440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36441    unix_path=`$CYGPATH -u "$windows_path"`
36442    new_path="$unix_path"
36443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36445    new_path="$unix_path"
36446  fi
36447
36448
36449  # Now try to locate executable using which
36450  new_path=`$WHICH "$new_path" 2> /dev/null`
36451
36452  if test "x$new_path" = x; then
36453    # Oops. Which didn't find the executable.
36454    # The splitting of arguments from the executable at a space might have been incorrect,
36455    # since paths with space are more likely in Windows. Give it another try with the whole
36456    # argument.
36457    path="$complete"
36458    arguments="EOL"
36459    new_path="$path"
36460
36461  windows_path="$new_path"
36462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36463    unix_path=`$CYGPATH -u "$windows_path"`
36464    new_path="$unix_path"
36465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36467    new_path="$unix_path"
36468  fi
36469
36470
36471    new_path=`$WHICH "$new_path" 2> /dev/null`
36472    # bat and cmd files are not always considered executable in MSYS causing which
36473    # to not find them
36474    if test "x$new_path" = x \
36475        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36476        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36477      new_path="$path"
36478
36479  windows_path="$new_path"
36480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36481    unix_path=`$CYGPATH -u "$windows_path"`
36482    new_path="$unix_path"
36483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36485    new_path="$unix_path"
36486  fi
36487
36488    fi
36489
36490    if test "x$new_path" = x; then
36491      # It's still not found. Now this is an unrecoverable error.
36492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36493$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36494      has_space=`$ECHO "$complete" | $GREP " "`
36495      if test "x$has_space" != x; then
36496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36498      fi
36499      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36500    fi
36501  fi
36502
36503  # Now new_path has a complete unix path to the binary
36504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36505    # Keep paths in /bin as-is, but remove trailing .exe if any
36506    new_path="${new_path/%.exe/}"
36507    # Do not save /bin paths to all_fixpath_prefixes!
36508  else
36509    # Not in mixed or Windows style, start by that.
36510    new_path=`cmd //c echo $new_path`
36511
36512  input_path="$new_path"
36513  # Check if we need to convert this using DOS-style short mode. If the path
36514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36515  # take no chances and rewrite it.
36516  # Note: m4 eats our [], so we need to use [ and ] instead.
36517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36518  if test "x$has_forbidden_chars" != x; then
36519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36521  fi
36522
36523    # Output is in $new_path
36524
36525  windows_path="$new_path"
36526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36527    unix_path=`$CYGPATH -u "$windows_path"`
36528    new_path="$unix_path"
36529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36531    new_path="$unix_path"
36532  fi
36533
36534    # remove trailing .exe if any
36535    new_path="${new_path/%.exe/}"
36536
36537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36539  fi
36540
36541    else
36542      # We're on a unix platform. Hooray! :)
36543      # First separate the path from the arguments. This will split at the first
36544      # space.
36545      complete="$AS"
36546      path="${complete%% *}"
36547      tmp="$complete EOL"
36548      arguments="${tmp#* }"
36549
36550      # Cannot rely on the command "which" here since it doesn't always work.
36551      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36552      if test -z "$is_absolute_path"; then
36553        # Path to executable is not absolute. Find it.
36554        IFS_save="$IFS"
36555        IFS=:
36556        for p in $PATH; do
36557          if test -f "$p/$path" && test -x "$p/$path"; then
36558            new_path="$p/$path"
36559            break
36560          fi
36561        done
36562        IFS="$IFS_save"
36563      else
36564        # This is an absolute path, we can use it without further modifications.
36565        new_path="$path"
36566      fi
36567
36568      if test "x$new_path" = x; then
36569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36570$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36571        has_space=`$ECHO "$complete" | $GREP " "`
36572        if test "x$has_space" != x; then
36573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36575        fi
36576        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36577      fi
36578    fi
36579
36580    # Now join together the path and the arguments once again
36581    if test "x$arguments" != xEOL; then
36582      new_complete="$new_path ${arguments% *}"
36583    else
36584      new_complete="$new_path"
36585    fi
36586
36587    if test "x$complete" != "x$new_complete"; then
36588      AS="$new_complete"
36589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36590$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36591    fi
36592  fi
36593
36594  else
36595    # FIXME: is this correct for microsoft?
36596    AS="$CC -c"
36597  fi
36598
36599
36600  #
36601  # Setup the archiver (AR)
36602  #
36603  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36604    # The corresponding ar tool is lib.exe (used to create static libraries)
36605    # Extract the first word of "lib", so it can be a program name with args.
36606set dummy lib; ac_word=$2
36607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36608$as_echo_n "checking for $ac_word... " >&6; }
36609if ${ac_cv_prog_AR+:} false; then :
36610  $as_echo_n "(cached) " >&6
36611else
36612  if test -n "$AR"; then
36613  ac_cv_prog_AR="$AR" # Let the user override the test.
36614else
36615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36616for as_dir in $PATH
36617do
36618  IFS=$as_save_IFS
36619  test -z "$as_dir" && as_dir=.
36620    for ac_exec_ext in '' $ac_executable_extensions; do
36621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36622    ac_cv_prog_AR="lib"
36623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36624    break 2
36625  fi
36626done
36627  done
36628IFS=$as_save_IFS
36629
36630fi
36631fi
36632AR=$ac_cv_prog_AR
36633if test -n "$AR"; then
36634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36635$as_echo "$AR" >&6; }
36636else
36637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36638$as_echo "no" >&6; }
36639fi
36640
36641
36642  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36643
36644
36645  # Publish this variable in the help.
36646
36647
36648  if [ -z "${AR+x}" ]; then
36649    # The variable is not set by user, try to locate tool using the code snippet
36650    if test -n "$ac_tool_prefix"; then
36651  for ac_prog in ar gcc-ar
36652  do
36653    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36654set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36656$as_echo_n "checking for $ac_word... " >&6; }
36657if ${ac_cv_prog_AR+:} false; then :
36658  $as_echo_n "(cached) " >&6
36659else
36660  if test -n "$AR"; then
36661  ac_cv_prog_AR="$AR" # Let the user override the test.
36662else
36663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36664for as_dir in $PATH
36665do
36666  IFS=$as_save_IFS
36667  test -z "$as_dir" && as_dir=.
36668    for ac_exec_ext in '' $ac_executable_extensions; do
36669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36670    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36672    break 2
36673  fi
36674done
36675  done
36676IFS=$as_save_IFS
36677
36678fi
36679fi
36680AR=$ac_cv_prog_AR
36681if test -n "$AR"; then
36682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36683$as_echo "$AR" >&6; }
36684else
36685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36686$as_echo "no" >&6; }
36687fi
36688
36689
36690    test -n "$AR" && break
36691  done
36692fi
36693if test -z "$AR"; then
36694  ac_ct_AR=$AR
36695  for ac_prog in ar gcc-ar
36696do
36697  # Extract the first word of "$ac_prog", so it can be a program name with args.
36698set dummy $ac_prog; ac_word=$2
36699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36700$as_echo_n "checking for $ac_word... " >&6; }
36701if ${ac_cv_prog_ac_ct_AR+:} false; then :
36702  $as_echo_n "(cached) " >&6
36703else
36704  if test -n "$ac_ct_AR"; then
36705  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36706else
36707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36708for as_dir in $PATH
36709do
36710  IFS=$as_save_IFS
36711  test -z "$as_dir" && as_dir=.
36712    for ac_exec_ext in '' $ac_executable_extensions; do
36713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36714    ac_cv_prog_ac_ct_AR="$ac_prog"
36715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36716    break 2
36717  fi
36718done
36719  done
36720IFS=$as_save_IFS
36721
36722fi
36723fi
36724ac_ct_AR=$ac_cv_prog_ac_ct_AR
36725if test -n "$ac_ct_AR"; then
36726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36727$as_echo "$ac_ct_AR" >&6; }
36728else
36729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36730$as_echo "no" >&6; }
36731fi
36732
36733
36734  test -n "$ac_ct_AR" && break
36735done
36736
36737  if test "x$ac_ct_AR" = x; then
36738    AR=""
36739  else
36740    case $cross_compiling:$ac_tool_warned in
36741yes:)
36742{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36743$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36744ac_tool_warned=yes ;;
36745esac
36746    AR=$ac_ct_AR
36747  fi
36748fi
36749
36750  else
36751    # The variable is set, but is it from the command line or the environment?
36752
36753    # Try to remove the string !AR! from our list.
36754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36756      # If it failed, the variable was not from the command line. Ignore it,
36757      # but warn the user (except for BASH, which is always set by the calling BASH).
36758      if test "xAR" != xBASH; then
36759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36760$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36761      fi
36762      # Try to locate tool using the code snippet
36763      if test -n "$ac_tool_prefix"; then
36764  for ac_prog in ar gcc-ar
36765  do
36766    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36767set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36769$as_echo_n "checking for $ac_word... " >&6; }
36770if ${ac_cv_prog_AR+:} false; then :
36771  $as_echo_n "(cached) " >&6
36772else
36773  if test -n "$AR"; then
36774  ac_cv_prog_AR="$AR" # Let the user override the test.
36775else
36776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36777for as_dir in $PATH
36778do
36779  IFS=$as_save_IFS
36780  test -z "$as_dir" && as_dir=.
36781    for ac_exec_ext in '' $ac_executable_extensions; do
36782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36783    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36785    break 2
36786  fi
36787done
36788  done
36789IFS=$as_save_IFS
36790
36791fi
36792fi
36793AR=$ac_cv_prog_AR
36794if test -n "$AR"; then
36795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36796$as_echo "$AR" >&6; }
36797else
36798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36799$as_echo "no" >&6; }
36800fi
36801
36802
36803    test -n "$AR" && break
36804  done
36805fi
36806if test -z "$AR"; then
36807  ac_ct_AR=$AR
36808  for ac_prog in ar gcc-ar
36809do
36810  # Extract the first word of "$ac_prog", so it can be a program name with args.
36811set dummy $ac_prog; ac_word=$2
36812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36813$as_echo_n "checking for $ac_word... " >&6; }
36814if ${ac_cv_prog_ac_ct_AR+:} false; then :
36815  $as_echo_n "(cached) " >&6
36816else
36817  if test -n "$ac_ct_AR"; then
36818  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36819else
36820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36821for as_dir in $PATH
36822do
36823  IFS=$as_save_IFS
36824  test -z "$as_dir" && as_dir=.
36825    for ac_exec_ext in '' $ac_executable_extensions; do
36826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36827    ac_cv_prog_ac_ct_AR="$ac_prog"
36828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36829    break 2
36830  fi
36831done
36832  done
36833IFS=$as_save_IFS
36834
36835fi
36836fi
36837ac_ct_AR=$ac_cv_prog_ac_ct_AR
36838if test -n "$ac_ct_AR"; then
36839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36840$as_echo "$ac_ct_AR" >&6; }
36841else
36842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36843$as_echo "no" >&6; }
36844fi
36845
36846
36847  test -n "$ac_ct_AR" && break
36848done
36849
36850  if test "x$ac_ct_AR" = x; then
36851    AR=""
36852  else
36853    case $cross_compiling:$ac_tool_warned in
36854yes:)
36855{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36856$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36857ac_tool_warned=yes ;;
36858esac
36859    AR=$ac_ct_AR
36860  fi
36861fi
36862
36863    else
36864      # If it succeeded, then it was overridden by the user. We will use it
36865      # for the tool.
36866
36867      # First remove it from the list of overridden variables, so we can test
36868      # for unknown variables in the end.
36869      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36870
36871      # Check if we try to supply an empty value
36872      if test "x$AR" = x; then
36873        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36874$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36875        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36876$as_echo_n "checking for AR... " >&6; }
36877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36878$as_echo "disabled" >&6; }
36879      else
36880        # Check if the provided tool contains a complete path.
36881        tool_specified="$AR"
36882        tool_basename="${tool_specified##*/}"
36883        if test "x$tool_basename" = "x$tool_specified"; then
36884          # A command without a complete path is provided, search $PATH.
36885          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36886$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36887          # Extract the first word of "$tool_basename", so it can be a program name with args.
36888set dummy $tool_basename; ac_word=$2
36889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36890$as_echo_n "checking for $ac_word... " >&6; }
36891if ${ac_cv_path_AR+:} false; then :
36892  $as_echo_n "(cached) " >&6
36893else
36894  case $AR in
36895  [\\/]* | ?:[\\/]*)
36896  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36897  ;;
36898  *)
36899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36900for as_dir in $PATH
36901do
36902  IFS=$as_save_IFS
36903  test -z "$as_dir" && as_dir=.
36904    for ac_exec_ext in '' $ac_executable_extensions; do
36905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36906    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36908    break 2
36909  fi
36910done
36911  done
36912IFS=$as_save_IFS
36913
36914  ;;
36915esac
36916fi
36917AR=$ac_cv_path_AR
36918if test -n "$AR"; then
36919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36920$as_echo "$AR" >&6; }
36921else
36922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36923$as_echo "no" >&6; }
36924fi
36925
36926
36927          if test "x$AR" = x; then
36928            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36929          fi
36930        else
36931          # Otherwise we believe it is a complete path. Use it as it is.
36932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36933$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36934          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36935$as_echo_n "checking for AR... " >&6; }
36936          if test ! -x "$tool_specified"; then
36937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36938$as_echo "not found" >&6; }
36939            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36940          fi
36941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36942$as_echo "$tool_specified" >&6; }
36943        fi
36944      fi
36945    fi
36946
36947  fi
36948
36949
36950  else
36951
36952
36953  # Publish this variable in the help.
36954
36955
36956  if [ -z "${AR+x}" ]; then
36957    # The variable is not set by user, try to locate tool using the code snippet
36958    if test -n "$ac_tool_prefix"; then
36959  for ac_prog in ar
36960  do
36961    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36962set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36964$as_echo_n "checking for $ac_word... " >&6; }
36965if ${ac_cv_prog_AR+:} false; then :
36966  $as_echo_n "(cached) " >&6
36967else
36968  if test -n "$AR"; then
36969  ac_cv_prog_AR="$AR" # Let the user override the test.
36970else
36971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36972for as_dir in $PATH
36973do
36974  IFS=$as_save_IFS
36975  test -z "$as_dir" && as_dir=.
36976    for ac_exec_ext in '' $ac_executable_extensions; do
36977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36978    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36980    break 2
36981  fi
36982done
36983  done
36984IFS=$as_save_IFS
36985
36986fi
36987fi
36988AR=$ac_cv_prog_AR
36989if test -n "$AR"; then
36990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36991$as_echo "$AR" >&6; }
36992else
36993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36994$as_echo "no" >&6; }
36995fi
36996
36997
36998    test -n "$AR" && break
36999  done
37000fi
37001if test -z "$AR"; then
37002  ac_ct_AR=$AR
37003  for ac_prog in ar
37004do
37005  # Extract the first word of "$ac_prog", so it can be a program name with args.
37006set dummy $ac_prog; ac_word=$2
37007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37008$as_echo_n "checking for $ac_word... " >&6; }
37009if ${ac_cv_prog_ac_ct_AR+:} false; then :
37010  $as_echo_n "(cached) " >&6
37011else
37012  if test -n "$ac_ct_AR"; then
37013  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37014else
37015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37016for as_dir in $PATH
37017do
37018  IFS=$as_save_IFS
37019  test -z "$as_dir" && as_dir=.
37020    for ac_exec_ext in '' $ac_executable_extensions; do
37021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37022    ac_cv_prog_ac_ct_AR="$ac_prog"
37023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37024    break 2
37025  fi
37026done
37027  done
37028IFS=$as_save_IFS
37029
37030fi
37031fi
37032ac_ct_AR=$ac_cv_prog_ac_ct_AR
37033if test -n "$ac_ct_AR"; then
37034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37035$as_echo "$ac_ct_AR" >&6; }
37036else
37037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37038$as_echo "no" >&6; }
37039fi
37040
37041
37042  test -n "$ac_ct_AR" && break
37043done
37044
37045  if test "x$ac_ct_AR" = x; then
37046    AR=""
37047  else
37048    case $cross_compiling:$ac_tool_warned in
37049yes:)
37050{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37051$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37052ac_tool_warned=yes ;;
37053esac
37054    AR=$ac_ct_AR
37055  fi
37056fi
37057
37058  else
37059    # The variable is set, but is it from the command line or the environment?
37060
37061    # Try to remove the string !AR! from our list.
37062    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37063    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37064      # If it failed, the variable was not from the command line. Ignore it,
37065      # but warn the user (except for BASH, which is always set by the calling BASH).
37066      if test "xAR" != xBASH; then
37067        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37068$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37069      fi
37070      # Try to locate tool using the code snippet
37071      if test -n "$ac_tool_prefix"; then
37072  for ac_prog in ar
37073  do
37074    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37075set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37077$as_echo_n "checking for $ac_word... " >&6; }
37078if ${ac_cv_prog_AR+:} false; then :
37079  $as_echo_n "(cached) " >&6
37080else
37081  if test -n "$AR"; then
37082  ac_cv_prog_AR="$AR" # Let the user override the test.
37083else
37084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37085for as_dir in $PATH
37086do
37087  IFS=$as_save_IFS
37088  test -z "$as_dir" && as_dir=.
37089    for ac_exec_ext in '' $ac_executable_extensions; do
37090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37091    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37093    break 2
37094  fi
37095done
37096  done
37097IFS=$as_save_IFS
37098
37099fi
37100fi
37101AR=$ac_cv_prog_AR
37102if test -n "$AR"; then
37103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37104$as_echo "$AR" >&6; }
37105else
37106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37107$as_echo "no" >&6; }
37108fi
37109
37110
37111    test -n "$AR" && break
37112  done
37113fi
37114if test -z "$AR"; then
37115  ac_ct_AR=$AR
37116  for ac_prog in ar
37117do
37118  # Extract the first word of "$ac_prog", so it can be a program name with args.
37119set dummy $ac_prog; ac_word=$2
37120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37121$as_echo_n "checking for $ac_word... " >&6; }
37122if ${ac_cv_prog_ac_ct_AR+:} false; then :
37123  $as_echo_n "(cached) " >&6
37124else
37125  if test -n "$ac_ct_AR"; then
37126  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37127else
37128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37129for as_dir in $PATH
37130do
37131  IFS=$as_save_IFS
37132  test -z "$as_dir" && as_dir=.
37133    for ac_exec_ext in '' $ac_executable_extensions; do
37134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37135    ac_cv_prog_ac_ct_AR="$ac_prog"
37136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37137    break 2
37138  fi
37139done
37140  done
37141IFS=$as_save_IFS
37142
37143fi
37144fi
37145ac_ct_AR=$ac_cv_prog_ac_ct_AR
37146if test -n "$ac_ct_AR"; then
37147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37148$as_echo "$ac_ct_AR" >&6; }
37149else
37150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37151$as_echo "no" >&6; }
37152fi
37153
37154
37155  test -n "$ac_ct_AR" && break
37156done
37157
37158  if test "x$ac_ct_AR" = x; then
37159    AR=""
37160  else
37161    case $cross_compiling:$ac_tool_warned in
37162yes:)
37163{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37164$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37165ac_tool_warned=yes ;;
37166esac
37167    AR=$ac_ct_AR
37168  fi
37169fi
37170
37171    else
37172      # If it succeeded, then it was overridden by the user. We will use it
37173      # for the tool.
37174
37175      # First remove it from the list of overridden variables, so we can test
37176      # for unknown variables in the end.
37177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37178
37179      # Check if we try to supply an empty value
37180      if test "x$AR" = x; then
37181        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37182$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37183        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37184$as_echo_n "checking for AR... " >&6; }
37185        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37186$as_echo "disabled" >&6; }
37187      else
37188        # Check if the provided tool contains a complete path.
37189        tool_specified="$AR"
37190        tool_basename="${tool_specified##*/}"
37191        if test "x$tool_basename" = "x$tool_specified"; then
37192          # A command without a complete path is provided, search $PATH.
37193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37194$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37195          # Extract the first word of "$tool_basename", so it can be a program name with args.
37196set dummy $tool_basename; ac_word=$2
37197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37198$as_echo_n "checking for $ac_word... " >&6; }
37199if ${ac_cv_path_AR+:} false; then :
37200  $as_echo_n "(cached) " >&6
37201else
37202  case $AR in
37203  [\\/]* | ?:[\\/]*)
37204  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37205  ;;
37206  *)
37207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37208for as_dir in $PATH
37209do
37210  IFS=$as_save_IFS
37211  test -z "$as_dir" && as_dir=.
37212    for ac_exec_ext in '' $ac_executable_extensions; do
37213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37214    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37216    break 2
37217  fi
37218done
37219  done
37220IFS=$as_save_IFS
37221
37222  ;;
37223esac
37224fi
37225AR=$ac_cv_path_AR
37226if test -n "$AR"; then
37227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37228$as_echo "$AR" >&6; }
37229else
37230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37231$as_echo "no" >&6; }
37232fi
37233
37234
37235          if test "x$AR" = x; then
37236            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37237          fi
37238        else
37239          # Otherwise we believe it is a complete path. Use it as it is.
37240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37241$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37242          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37243$as_echo_n "checking for AR... " >&6; }
37244          if test ! -x "$tool_specified"; then
37245            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37246$as_echo "not found" >&6; }
37247            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37248          fi
37249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37250$as_echo "$tool_specified" >&6; }
37251        fi
37252      fi
37253    fi
37254
37255  fi
37256
37257
37258  fi
37259
37260  # Only process if variable expands to non-empty
37261
37262  if test "x$AR" != x; then
37263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37264
37265  # First separate the path from the arguments. This will split at the first
37266  # space.
37267  complete="$AR"
37268  path="${complete%% *}"
37269  tmp="$complete EOL"
37270  arguments="${tmp#* }"
37271
37272  # Input might be given as Windows format, start by converting to
37273  # unix format.
37274  new_path=`$CYGPATH -u "$path"`
37275
37276  # Now try to locate executable using which
37277  new_path=`$WHICH "$new_path" 2> /dev/null`
37278  # bat and cmd files are not always considered executable in cygwin causing which
37279  # to not find them
37280  if test "x$new_path" = x \
37281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37283    new_path=`$CYGPATH -u "$path"`
37284  fi
37285  if test "x$new_path" = x; then
37286    # Oops. Which didn't find the executable.
37287    # The splitting of arguments from the executable at a space might have been incorrect,
37288    # since paths with space are more likely in Windows. Give it another try with the whole
37289    # argument.
37290    path="$complete"
37291    arguments="EOL"
37292    new_path=`$CYGPATH -u "$path"`
37293    new_path=`$WHICH "$new_path" 2> /dev/null`
37294    # bat and cmd files are not always considered executable in cygwin causing which
37295    # to not find them
37296    if test "x$new_path" = x \
37297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37299      new_path=`$CYGPATH -u "$path"`
37300    fi
37301    if test "x$new_path" = x; then
37302      # It's still not found. Now this is an unrecoverable error.
37303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37304$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37305      has_space=`$ECHO "$complete" | $GREP " "`
37306      if test "x$has_space" != x; then
37307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37309      fi
37310      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37311    fi
37312  fi
37313
37314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37317  # "foo.exe" is OK but "foo" is an error.
37318  #
37319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37320  # It is also a way to make sure we got the proper file name for the real test later on.
37321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37322  if test "x$test_shortpath" = x; then
37323    # Short path failed, file does not exist as specified.
37324    # Try adding .exe or .cmd
37325    if test -f "${new_path}.exe"; then
37326      input_to_shortpath="${new_path}.exe"
37327    elif test -f "${new_path}.cmd"; then
37328      input_to_shortpath="${new_path}.cmd"
37329    else
37330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37331$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37334      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37335    fi
37336  else
37337    input_to_shortpath="$new_path"
37338  fi
37339
37340  # Call helper function which possibly converts this using DOS-style short mode.
37341  # If so, the updated path is stored in $new_path.
37342  new_path="$input_to_shortpath"
37343
37344  input_path="$input_to_shortpath"
37345  # Check if we need to convert this using DOS-style short mode. If the path
37346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37347  # take no chances and rewrite it.
37348  # Note: m4 eats our [], so we need to use [ and ] instead.
37349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37350  if test "x$has_forbidden_chars" != x; then
37351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37355      # Going to short mode and back again did indeed matter. Since short mode is
37356      # case insensitive, let's make it lowercase to improve readability.
37357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37358      # Now convert it back to Unix-style (cygpath)
37359      input_path=`$CYGPATH -u "$shortmode_path"`
37360      new_path="$input_path"
37361    fi
37362  fi
37363
37364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37365  if test "x$test_cygdrive_prefix" = x; then
37366    # As a simple fix, exclude /usr/bin since it's not a real path.
37367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37369      # a path prefixed by /cygdrive for fixpath to work.
37370      new_path="$CYGWIN_ROOT_PATH$input_path"
37371    fi
37372  fi
37373
37374  # remove trailing .exe if any
37375  new_path="${new_path/%.exe/}"
37376
37377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37378
37379  # First separate the path from the arguments. This will split at the first
37380  # space.
37381  complete="$AR"
37382  path="${complete%% *}"
37383  tmp="$complete EOL"
37384  arguments="${tmp#* }"
37385
37386  # Input might be given as Windows format, start by converting to
37387  # unix format.
37388  new_path="$path"
37389
37390  windows_path="$new_path"
37391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37392    unix_path=`$CYGPATH -u "$windows_path"`
37393    new_path="$unix_path"
37394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37396    new_path="$unix_path"
37397  fi
37398
37399
37400  # Now try to locate executable using which
37401  new_path=`$WHICH "$new_path" 2> /dev/null`
37402
37403  if test "x$new_path" = x; then
37404    # Oops. Which didn't find the executable.
37405    # The splitting of arguments from the executable at a space might have been incorrect,
37406    # since paths with space are more likely in Windows. Give it another try with the whole
37407    # argument.
37408    path="$complete"
37409    arguments="EOL"
37410    new_path="$path"
37411
37412  windows_path="$new_path"
37413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37414    unix_path=`$CYGPATH -u "$windows_path"`
37415    new_path="$unix_path"
37416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37418    new_path="$unix_path"
37419  fi
37420
37421
37422    new_path=`$WHICH "$new_path" 2> /dev/null`
37423    # bat and cmd files are not always considered executable in MSYS causing which
37424    # to not find them
37425    if test "x$new_path" = x \
37426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37428      new_path="$path"
37429
37430  windows_path="$new_path"
37431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37432    unix_path=`$CYGPATH -u "$windows_path"`
37433    new_path="$unix_path"
37434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37436    new_path="$unix_path"
37437  fi
37438
37439    fi
37440
37441    if test "x$new_path" = x; then
37442      # It's still not found. Now this is an unrecoverable error.
37443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37444$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37445      has_space=`$ECHO "$complete" | $GREP " "`
37446      if test "x$has_space" != x; then
37447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37449      fi
37450      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37451    fi
37452  fi
37453
37454  # Now new_path has a complete unix path to the binary
37455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37456    # Keep paths in /bin as-is, but remove trailing .exe if any
37457    new_path="${new_path/%.exe/}"
37458    # Do not save /bin paths to all_fixpath_prefixes!
37459  else
37460    # Not in mixed or Windows style, start by that.
37461    new_path=`cmd //c echo $new_path`
37462
37463  input_path="$new_path"
37464  # Check if we need to convert this using DOS-style short mode. If the path
37465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37466  # take no chances and rewrite it.
37467  # Note: m4 eats our [], so we need to use [ and ] instead.
37468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37469  if test "x$has_forbidden_chars" != x; then
37470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37472  fi
37473
37474    # Output is in $new_path
37475
37476  windows_path="$new_path"
37477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37478    unix_path=`$CYGPATH -u "$windows_path"`
37479    new_path="$unix_path"
37480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37482    new_path="$unix_path"
37483  fi
37484
37485    # remove trailing .exe if any
37486    new_path="${new_path/%.exe/}"
37487
37488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37490  fi
37491
37492    else
37493      # We're on a unix platform. Hooray! :)
37494      # First separate the path from the arguments. This will split at the first
37495      # space.
37496      complete="$AR"
37497      path="${complete%% *}"
37498      tmp="$complete EOL"
37499      arguments="${tmp#* }"
37500
37501      # Cannot rely on the command "which" here since it doesn't always work.
37502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37503      if test -z "$is_absolute_path"; then
37504        # Path to executable is not absolute. Find it.
37505        IFS_save="$IFS"
37506        IFS=:
37507        for p in $PATH; do
37508          if test -f "$p/$path" && test -x "$p/$path"; then
37509            new_path="$p/$path"
37510            break
37511          fi
37512        done
37513        IFS="$IFS_save"
37514      else
37515        # This is an absolute path, we can use it without further modifications.
37516        new_path="$path"
37517      fi
37518
37519      if test "x$new_path" = x; then
37520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37521$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37522        has_space=`$ECHO "$complete" | $GREP " "`
37523        if test "x$has_space" != x; then
37524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37526        fi
37527        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37528      fi
37529    fi
37530
37531    # Now join together the path and the arguments once again
37532    if test "x$arguments" != xEOL; then
37533      new_complete="$new_path ${arguments% *}"
37534    else
37535      new_complete="$new_path"
37536    fi
37537
37538    if test "x$complete" != "x$new_complete"; then
37539      AR="$new_complete"
37540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37541$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37542    fi
37543  fi
37544
37545
37546
37547  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37548
37549
37550  # Publish this variable in the help.
37551
37552
37553  if [ -z "${LIPO+x}" ]; then
37554    # The variable is not set by user, try to locate tool using the code snippet
37555    for ac_prog in lipo
37556do
37557  # Extract the first word of "$ac_prog", so it can be a program name with args.
37558set dummy $ac_prog; ac_word=$2
37559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37560$as_echo_n "checking for $ac_word... " >&6; }
37561if ${ac_cv_path_LIPO+:} false; then :
37562  $as_echo_n "(cached) " >&6
37563else
37564  case $LIPO in
37565  [\\/]* | ?:[\\/]*)
37566  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37567  ;;
37568  *)
37569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37570for as_dir in $PATH
37571do
37572  IFS=$as_save_IFS
37573  test -z "$as_dir" && as_dir=.
37574    for ac_exec_ext in '' $ac_executable_extensions; do
37575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37576    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37578    break 2
37579  fi
37580done
37581  done
37582IFS=$as_save_IFS
37583
37584  ;;
37585esac
37586fi
37587LIPO=$ac_cv_path_LIPO
37588if test -n "$LIPO"; then
37589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37590$as_echo "$LIPO" >&6; }
37591else
37592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37593$as_echo "no" >&6; }
37594fi
37595
37596
37597  test -n "$LIPO" && break
37598done
37599
37600  else
37601    # The variable is set, but is it from the command line or the environment?
37602
37603    # Try to remove the string !LIPO! from our list.
37604    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37605    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37606      # If it failed, the variable was not from the command line. Ignore it,
37607      # but warn the user (except for BASH, which is always set by the calling BASH).
37608      if test "xLIPO" != xBASH; then
37609        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37610$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37611      fi
37612      # Try to locate tool using the code snippet
37613      for ac_prog in lipo
37614do
37615  # Extract the first word of "$ac_prog", so it can be a program name with args.
37616set dummy $ac_prog; ac_word=$2
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37618$as_echo_n "checking for $ac_word... " >&6; }
37619if ${ac_cv_path_LIPO+:} false; then :
37620  $as_echo_n "(cached) " >&6
37621else
37622  case $LIPO in
37623  [\\/]* | ?:[\\/]*)
37624  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37625  ;;
37626  *)
37627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37628for as_dir in $PATH
37629do
37630  IFS=$as_save_IFS
37631  test -z "$as_dir" && as_dir=.
37632    for ac_exec_ext in '' $ac_executable_extensions; do
37633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37634    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37636    break 2
37637  fi
37638done
37639  done
37640IFS=$as_save_IFS
37641
37642  ;;
37643esac
37644fi
37645LIPO=$ac_cv_path_LIPO
37646if test -n "$LIPO"; then
37647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37648$as_echo "$LIPO" >&6; }
37649else
37650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37651$as_echo "no" >&6; }
37652fi
37653
37654
37655  test -n "$LIPO" && break
37656done
37657
37658    else
37659      # If it succeeded, then it was overridden by the user. We will use it
37660      # for the tool.
37661
37662      # First remove it from the list of overridden variables, so we can test
37663      # for unknown variables in the end.
37664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37665
37666      # Check if we try to supply an empty value
37667      if test "x$LIPO" = x; then
37668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37669$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37671$as_echo_n "checking for LIPO... " >&6; }
37672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37673$as_echo "disabled" >&6; }
37674      else
37675        # Check if the provided tool contains a complete path.
37676        tool_specified="$LIPO"
37677        tool_basename="${tool_specified##*/}"
37678        if test "x$tool_basename" = "x$tool_specified"; then
37679          # A command without a complete path is provided, search $PATH.
37680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37681$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37682          # Extract the first word of "$tool_basename", so it can be a program name with args.
37683set dummy $tool_basename; ac_word=$2
37684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37685$as_echo_n "checking for $ac_word... " >&6; }
37686if ${ac_cv_path_LIPO+:} false; then :
37687  $as_echo_n "(cached) " >&6
37688else
37689  case $LIPO in
37690  [\\/]* | ?:[\\/]*)
37691  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37692  ;;
37693  *)
37694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37695for as_dir in $PATH
37696do
37697  IFS=$as_save_IFS
37698  test -z "$as_dir" && as_dir=.
37699    for ac_exec_ext in '' $ac_executable_extensions; do
37700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37701    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37703    break 2
37704  fi
37705done
37706  done
37707IFS=$as_save_IFS
37708
37709  ;;
37710esac
37711fi
37712LIPO=$ac_cv_path_LIPO
37713if test -n "$LIPO"; then
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37715$as_echo "$LIPO" >&6; }
37716else
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718$as_echo "no" >&6; }
37719fi
37720
37721
37722          if test "x$LIPO" = x; then
37723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37724          fi
37725        else
37726          # Otherwise we believe it is a complete path. Use it as it is.
37727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37728$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37730$as_echo_n "checking for LIPO... " >&6; }
37731          if test ! -x "$tool_specified"; then
37732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37733$as_echo "not found" >&6; }
37734            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37735          fi
37736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37737$as_echo "$tool_specified" >&6; }
37738        fi
37739      fi
37740    fi
37741
37742  fi
37743
37744
37745
37746  # Only process if variable expands to non-empty
37747
37748  if test "x$LIPO" != x; then
37749    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37750
37751  # First separate the path from the arguments. This will split at the first
37752  # space.
37753  complete="$LIPO"
37754  path="${complete%% *}"
37755  tmp="$complete EOL"
37756  arguments="${tmp#* }"
37757
37758  # Input might be given as Windows format, start by converting to
37759  # unix format.
37760  new_path=`$CYGPATH -u "$path"`
37761
37762  # Now try to locate executable using which
37763  new_path=`$WHICH "$new_path" 2> /dev/null`
37764  # bat and cmd files are not always considered executable in cygwin causing which
37765  # to not find them
37766  if test "x$new_path" = x \
37767      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37768      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37769    new_path=`$CYGPATH -u "$path"`
37770  fi
37771  if test "x$new_path" = x; then
37772    # Oops. Which didn't find the executable.
37773    # The splitting of arguments from the executable at a space might have been incorrect,
37774    # since paths with space are more likely in Windows. Give it another try with the whole
37775    # argument.
37776    path="$complete"
37777    arguments="EOL"
37778    new_path=`$CYGPATH -u "$path"`
37779    new_path=`$WHICH "$new_path" 2> /dev/null`
37780    # bat and cmd files are not always considered executable in cygwin causing which
37781    # to not find them
37782    if test "x$new_path" = x \
37783        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37784        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37785      new_path=`$CYGPATH -u "$path"`
37786    fi
37787    if test "x$new_path" = x; then
37788      # It's still not found. Now this is an unrecoverable error.
37789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37790$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37791      has_space=`$ECHO "$complete" | $GREP " "`
37792      if test "x$has_space" != x; then
37793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37795      fi
37796      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37797    fi
37798  fi
37799
37800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37803  # "foo.exe" is OK but "foo" is an error.
37804  #
37805  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37806  # It is also a way to make sure we got the proper file name for the real test later on.
37807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37808  if test "x$test_shortpath" = x; then
37809    # Short path failed, file does not exist as specified.
37810    # Try adding .exe or .cmd
37811    if test -f "${new_path}.exe"; then
37812      input_to_shortpath="${new_path}.exe"
37813    elif test -f "${new_path}.cmd"; then
37814      input_to_shortpath="${new_path}.cmd"
37815    else
37816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37817$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37820      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37821    fi
37822  else
37823    input_to_shortpath="$new_path"
37824  fi
37825
37826  # Call helper function which possibly converts this using DOS-style short mode.
37827  # If so, the updated path is stored in $new_path.
37828  new_path="$input_to_shortpath"
37829
37830  input_path="$input_to_shortpath"
37831  # Check if we need to convert this using DOS-style short mode. If the path
37832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37833  # take no chances and rewrite it.
37834  # Note: m4 eats our [], so we need to use [ and ] instead.
37835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37836  if test "x$has_forbidden_chars" != x; then
37837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37841      # Going to short mode and back again did indeed matter. Since short mode is
37842      # case insensitive, let's make it lowercase to improve readability.
37843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37844      # Now convert it back to Unix-style (cygpath)
37845      input_path=`$CYGPATH -u "$shortmode_path"`
37846      new_path="$input_path"
37847    fi
37848  fi
37849
37850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37851  if test "x$test_cygdrive_prefix" = x; then
37852    # As a simple fix, exclude /usr/bin since it's not a real path.
37853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37855      # a path prefixed by /cygdrive for fixpath to work.
37856      new_path="$CYGWIN_ROOT_PATH$input_path"
37857    fi
37858  fi
37859
37860  # remove trailing .exe if any
37861  new_path="${new_path/%.exe/}"
37862
37863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37864
37865  # First separate the path from the arguments. This will split at the first
37866  # space.
37867  complete="$LIPO"
37868  path="${complete%% *}"
37869  tmp="$complete EOL"
37870  arguments="${tmp#* }"
37871
37872  # Input might be given as Windows format, start by converting to
37873  # unix format.
37874  new_path="$path"
37875
37876  windows_path="$new_path"
37877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37878    unix_path=`$CYGPATH -u "$windows_path"`
37879    new_path="$unix_path"
37880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37882    new_path="$unix_path"
37883  fi
37884
37885
37886  # Now try to locate executable using which
37887  new_path=`$WHICH "$new_path" 2> /dev/null`
37888
37889  if test "x$new_path" = x; then
37890    # Oops. Which didn't find the executable.
37891    # The splitting of arguments from the executable at a space might have been incorrect,
37892    # since paths with space are more likely in Windows. Give it another try with the whole
37893    # argument.
37894    path="$complete"
37895    arguments="EOL"
37896    new_path="$path"
37897
37898  windows_path="$new_path"
37899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37900    unix_path=`$CYGPATH -u "$windows_path"`
37901    new_path="$unix_path"
37902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37904    new_path="$unix_path"
37905  fi
37906
37907
37908    new_path=`$WHICH "$new_path" 2> /dev/null`
37909    # bat and cmd files are not always considered executable in MSYS causing which
37910    # to not find them
37911    if test "x$new_path" = x \
37912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37914      new_path="$path"
37915
37916  windows_path="$new_path"
37917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37918    unix_path=`$CYGPATH -u "$windows_path"`
37919    new_path="$unix_path"
37920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37922    new_path="$unix_path"
37923  fi
37924
37925    fi
37926
37927    if test "x$new_path" = x; then
37928      # It's still not found. Now this is an unrecoverable error.
37929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37930$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37931      has_space=`$ECHO "$complete" | $GREP " "`
37932      if test "x$has_space" != x; then
37933        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37934$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37935      fi
37936      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37937    fi
37938  fi
37939
37940  # Now new_path has a complete unix path to the binary
37941  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37942    # Keep paths in /bin as-is, but remove trailing .exe if any
37943    new_path="${new_path/%.exe/}"
37944    # Do not save /bin paths to all_fixpath_prefixes!
37945  else
37946    # Not in mixed or Windows style, start by that.
37947    new_path=`cmd //c echo $new_path`
37948
37949  input_path="$new_path"
37950  # Check if we need to convert this using DOS-style short mode. If the path
37951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37952  # take no chances and rewrite it.
37953  # Note: m4 eats our [], so we need to use [ and ] instead.
37954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37955  if test "x$has_forbidden_chars" != x; then
37956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37958  fi
37959
37960    # Output is in $new_path
37961
37962  windows_path="$new_path"
37963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37964    unix_path=`$CYGPATH -u "$windows_path"`
37965    new_path="$unix_path"
37966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37968    new_path="$unix_path"
37969  fi
37970
37971    # remove trailing .exe if any
37972    new_path="${new_path/%.exe/}"
37973
37974    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37975    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37976  fi
37977
37978    else
37979      # We're on a unix platform. Hooray! :)
37980      # First separate the path from the arguments. This will split at the first
37981      # space.
37982      complete="$LIPO"
37983      path="${complete%% *}"
37984      tmp="$complete EOL"
37985      arguments="${tmp#* }"
37986
37987      # Cannot rely on the command "which" here since it doesn't always work.
37988      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37989      if test -z "$is_absolute_path"; then
37990        # Path to executable is not absolute. Find it.
37991        IFS_save="$IFS"
37992        IFS=:
37993        for p in $PATH; do
37994          if test -f "$p/$path" && test -x "$p/$path"; then
37995            new_path="$p/$path"
37996            break
37997          fi
37998        done
37999        IFS="$IFS_save"
38000      else
38001        # This is an absolute path, we can use it without further modifications.
38002        new_path="$path"
38003      fi
38004
38005      if test "x$new_path" = x; then
38006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38007$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38008        has_space=`$ECHO "$complete" | $GREP " "`
38009        if test "x$has_space" != x; then
38010          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38011$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38012        fi
38013        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38014      fi
38015    fi
38016
38017    # Now join together the path and the arguments once again
38018    if test "x$arguments" != xEOL; then
38019      new_complete="$new_path ${arguments% *}"
38020    else
38021      new_complete="$new_path"
38022    fi
38023
38024    if test "x$complete" != "x$new_complete"; then
38025      LIPO="$new_complete"
38026      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38027$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38028    fi
38029  fi
38030
38031  fi
38032
38033  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38034    # Extract the first word of "mt", so it can be a program name with args.
38035set dummy mt; ac_word=$2
38036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38037$as_echo_n "checking for $ac_word... " >&6; }
38038if ${ac_cv_prog_MT+:} false; then :
38039  $as_echo_n "(cached) " >&6
38040else
38041  if test -n "$MT"; then
38042  ac_cv_prog_MT="$MT" # Let the user override the test.
38043else
38044  ac_prog_rejected=no
38045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38046for as_dir in $PATH
38047do
38048  IFS=$as_save_IFS
38049  test -z "$as_dir" && as_dir=.
38050    for ac_exec_ext in '' $ac_executable_extensions; do
38051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38052    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38053       ac_prog_rejected=yes
38054       continue
38055     fi
38056    ac_cv_prog_MT="mt"
38057    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38058    break 2
38059  fi
38060done
38061  done
38062IFS=$as_save_IFS
38063
38064if test $ac_prog_rejected = yes; then
38065  # We found a bogon in the path, so make sure we never use it.
38066  set dummy $ac_cv_prog_MT
38067  shift
38068  if test $# != 0; then
38069    # We chose a different compiler from the bogus one.
38070    # However, it has the same basename, so the bogon will be chosen
38071    # first if we set MT to just the basename; use the full file name.
38072    shift
38073    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38074  fi
38075fi
38076fi
38077fi
38078MT=$ac_cv_prog_MT
38079if test -n "$MT"; then
38080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38081$as_echo "$MT" >&6; }
38082else
38083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38084$as_echo "no" >&6; }
38085fi
38086
38087
38088
38089  # Only process if variable expands to non-empty
38090
38091  if test "x$MT" != x; then
38092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38093
38094  # First separate the path from the arguments. This will split at the first
38095  # space.
38096  complete="$MT"
38097  path="${complete%% *}"
38098  tmp="$complete EOL"
38099  arguments="${tmp#* }"
38100
38101  # Input might be given as Windows format, start by converting to
38102  # unix format.
38103  new_path=`$CYGPATH -u "$path"`
38104
38105  # Now try to locate executable using which
38106  new_path=`$WHICH "$new_path" 2> /dev/null`
38107  # bat and cmd files are not always considered executable in cygwin causing which
38108  # to not find them
38109  if test "x$new_path" = x \
38110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38112    new_path=`$CYGPATH -u "$path"`
38113  fi
38114  if test "x$new_path" = x; then
38115    # Oops. Which didn't find the executable.
38116    # The splitting of arguments from the executable at a space might have been incorrect,
38117    # since paths with space are more likely in Windows. Give it another try with the whole
38118    # argument.
38119    path="$complete"
38120    arguments="EOL"
38121    new_path=`$CYGPATH -u "$path"`
38122    new_path=`$WHICH "$new_path" 2> /dev/null`
38123    # bat and cmd files are not always considered executable in cygwin causing which
38124    # to not find them
38125    if test "x$new_path" = x \
38126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38128      new_path=`$CYGPATH -u "$path"`
38129    fi
38130    if test "x$new_path" = x; then
38131      # It's still not found. Now this is an unrecoverable error.
38132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38133$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38134      has_space=`$ECHO "$complete" | $GREP " "`
38135      if test "x$has_space" != x; then
38136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38138      fi
38139      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38140    fi
38141  fi
38142
38143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38146  # "foo.exe" is OK but "foo" is an error.
38147  #
38148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38149  # It is also a way to make sure we got the proper file name for the real test later on.
38150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38151  if test "x$test_shortpath" = x; then
38152    # Short path failed, file does not exist as specified.
38153    # Try adding .exe or .cmd
38154    if test -f "${new_path}.exe"; then
38155      input_to_shortpath="${new_path}.exe"
38156    elif test -f "${new_path}.cmd"; then
38157      input_to_shortpath="${new_path}.cmd"
38158    else
38159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38160$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38163      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38164    fi
38165  else
38166    input_to_shortpath="$new_path"
38167  fi
38168
38169  # Call helper function which possibly converts this using DOS-style short mode.
38170  # If so, the updated path is stored in $new_path.
38171  new_path="$input_to_shortpath"
38172
38173  input_path="$input_to_shortpath"
38174  # Check if we need to convert this using DOS-style short mode. If the path
38175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38176  # take no chances and rewrite it.
38177  # Note: m4 eats our [], so we need to use [ and ] instead.
38178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38179  if test "x$has_forbidden_chars" != x; then
38180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38184      # Going to short mode and back again did indeed matter. Since short mode is
38185      # case insensitive, let's make it lowercase to improve readability.
38186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38187      # Now convert it back to Unix-style (cygpath)
38188      input_path=`$CYGPATH -u "$shortmode_path"`
38189      new_path="$input_path"
38190    fi
38191  fi
38192
38193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38194  if test "x$test_cygdrive_prefix" = x; then
38195    # As a simple fix, exclude /usr/bin since it's not a real path.
38196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38198      # a path prefixed by /cygdrive for fixpath to work.
38199      new_path="$CYGWIN_ROOT_PATH$input_path"
38200    fi
38201  fi
38202
38203  # remove trailing .exe if any
38204  new_path="${new_path/%.exe/}"
38205
38206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38207
38208  # First separate the path from the arguments. This will split at the first
38209  # space.
38210  complete="$MT"
38211  path="${complete%% *}"
38212  tmp="$complete EOL"
38213  arguments="${tmp#* }"
38214
38215  # Input might be given as Windows format, start by converting to
38216  # unix format.
38217  new_path="$path"
38218
38219  windows_path="$new_path"
38220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38221    unix_path=`$CYGPATH -u "$windows_path"`
38222    new_path="$unix_path"
38223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38225    new_path="$unix_path"
38226  fi
38227
38228
38229  # Now try to locate executable using which
38230  new_path=`$WHICH "$new_path" 2> /dev/null`
38231
38232  if test "x$new_path" = x; then
38233    # Oops. Which didn't find the executable.
38234    # The splitting of arguments from the executable at a space might have been incorrect,
38235    # since paths with space are more likely in Windows. Give it another try with the whole
38236    # argument.
38237    path="$complete"
38238    arguments="EOL"
38239    new_path="$path"
38240
38241  windows_path="$new_path"
38242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243    unix_path=`$CYGPATH -u "$windows_path"`
38244    new_path="$unix_path"
38245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38247    new_path="$unix_path"
38248  fi
38249
38250
38251    new_path=`$WHICH "$new_path" 2> /dev/null`
38252    # bat and cmd files are not always considered executable in MSYS causing which
38253    # to not find them
38254    if test "x$new_path" = x \
38255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38257      new_path="$path"
38258
38259  windows_path="$new_path"
38260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38261    unix_path=`$CYGPATH -u "$windows_path"`
38262    new_path="$unix_path"
38263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38265    new_path="$unix_path"
38266  fi
38267
38268    fi
38269
38270    if test "x$new_path" = x; then
38271      # It's still not found. Now this is an unrecoverable error.
38272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38273$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38274      has_space=`$ECHO "$complete" | $GREP " "`
38275      if test "x$has_space" != x; then
38276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38278      fi
38279      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38280    fi
38281  fi
38282
38283  # Now new_path has a complete unix path to the binary
38284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38285    # Keep paths in /bin as-is, but remove trailing .exe if any
38286    new_path="${new_path/%.exe/}"
38287    # Do not save /bin paths to all_fixpath_prefixes!
38288  else
38289    # Not in mixed or Windows style, start by that.
38290    new_path=`cmd //c echo $new_path`
38291
38292  input_path="$new_path"
38293  # Check if we need to convert this using DOS-style short mode. If the path
38294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38295  # take no chances and rewrite it.
38296  # Note: m4 eats our [], so we need to use [ and ] instead.
38297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38298  if test "x$has_forbidden_chars" != x; then
38299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38301  fi
38302
38303    # Output is in $new_path
38304
38305  windows_path="$new_path"
38306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38307    unix_path=`$CYGPATH -u "$windows_path"`
38308    new_path="$unix_path"
38309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38311    new_path="$unix_path"
38312  fi
38313
38314    # remove trailing .exe if any
38315    new_path="${new_path/%.exe/}"
38316
38317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38319  fi
38320
38321    else
38322      # We're on a unix platform. Hooray! :)
38323      # First separate the path from the arguments. This will split at the first
38324      # space.
38325      complete="$MT"
38326      path="${complete%% *}"
38327      tmp="$complete EOL"
38328      arguments="${tmp#* }"
38329
38330      # Cannot rely on the command "which" here since it doesn't always work.
38331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38332      if test -z "$is_absolute_path"; then
38333        # Path to executable is not absolute. Find it.
38334        IFS_save="$IFS"
38335        IFS=:
38336        for p in $PATH; do
38337          if test -f "$p/$path" && test -x "$p/$path"; then
38338            new_path="$p/$path"
38339            break
38340          fi
38341        done
38342        IFS="$IFS_save"
38343      else
38344        # This is an absolute path, we can use it without further modifications.
38345        new_path="$path"
38346      fi
38347
38348      if test "x$new_path" = x; then
38349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38350$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38351        has_space=`$ECHO "$complete" | $GREP " "`
38352        if test "x$has_space" != x; then
38353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38355        fi
38356        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38357      fi
38358    fi
38359
38360    # Now join together the path and the arguments once again
38361    if test "x$arguments" != xEOL; then
38362      new_complete="$new_path ${arguments% *}"
38363    else
38364      new_complete="$new_path"
38365    fi
38366
38367    if test "x$complete" != "x$new_complete"; then
38368      MT="$new_complete"
38369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38370$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38371    fi
38372  fi
38373
38374    # Setup the resource compiler (RC)
38375    # Extract the first word of "rc", so it can be a program name with args.
38376set dummy rc; ac_word=$2
38377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38378$as_echo_n "checking for $ac_word... " >&6; }
38379if ${ac_cv_prog_RC+:} false; then :
38380  $as_echo_n "(cached) " >&6
38381else
38382  if test -n "$RC"; then
38383  ac_cv_prog_RC="$RC" # Let the user override the test.
38384else
38385  ac_prog_rejected=no
38386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38387for as_dir in $PATH
38388do
38389  IFS=$as_save_IFS
38390  test -z "$as_dir" && as_dir=.
38391    for ac_exec_ext in '' $ac_executable_extensions; do
38392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38393    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38394       ac_prog_rejected=yes
38395       continue
38396     fi
38397    ac_cv_prog_RC="rc"
38398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38399    break 2
38400  fi
38401done
38402  done
38403IFS=$as_save_IFS
38404
38405if test $ac_prog_rejected = yes; then
38406  # We found a bogon in the path, so make sure we never use it.
38407  set dummy $ac_cv_prog_RC
38408  shift
38409  if test $# != 0; then
38410    # We chose a different compiler from the bogus one.
38411    # However, it has the same basename, so the bogon will be chosen
38412    # first if we set RC to just the basename; use the full file name.
38413    shift
38414    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38415  fi
38416fi
38417fi
38418fi
38419RC=$ac_cv_prog_RC
38420if test -n "$RC"; then
38421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38422$as_echo "$RC" >&6; }
38423else
38424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38425$as_echo "no" >&6; }
38426fi
38427
38428
38429
38430  # Only process if variable expands to non-empty
38431
38432  if test "x$RC" != x; then
38433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38434
38435  # First separate the path from the arguments. This will split at the first
38436  # space.
38437  complete="$RC"
38438  path="${complete%% *}"
38439  tmp="$complete EOL"
38440  arguments="${tmp#* }"
38441
38442  # Input might be given as Windows format, start by converting to
38443  # unix format.
38444  new_path=`$CYGPATH -u "$path"`
38445
38446  # Now try to locate executable using which
38447  new_path=`$WHICH "$new_path" 2> /dev/null`
38448  # bat and cmd files are not always considered executable in cygwin causing which
38449  # to not find them
38450  if test "x$new_path" = x \
38451      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38452      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38453    new_path=`$CYGPATH -u "$path"`
38454  fi
38455  if test "x$new_path" = x; then
38456    # Oops. Which didn't find the executable.
38457    # The splitting of arguments from the executable at a space might have been incorrect,
38458    # since paths with space are more likely in Windows. Give it another try with the whole
38459    # argument.
38460    path="$complete"
38461    arguments="EOL"
38462    new_path=`$CYGPATH -u "$path"`
38463    new_path=`$WHICH "$new_path" 2> /dev/null`
38464    # bat and cmd files are not always considered executable in cygwin causing which
38465    # to not find them
38466    if test "x$new_path" = x \
38467        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38468        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38469      new_path=`$CYGPATH -u "$path"`
38470    fi
38471    if test "x$new_path" = x; then
38472      # It's still not found. Now this is an unrecoverable error.
38473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38474$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38475      has_space=`$ECHO "$complete" | $GREP " "`
38476      if test "x$has_space" != x; then
38477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38479      fi
38480      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38481    fi
38482  fi
38483
38484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38487  # "foo.exe" is OK but "foo" is an error.
38488  #
38489  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38490  # It is also a way to make sure we got the proper file name for the real test later on.
38491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38492  if test "x$test_shortpath" = x; then
38493    # Short path failed, file does not exist as specified.
38494    # Try adding .exe or .cmd
38495    if test -f "${new_path}.exe"; then
38496      input_to_shortpath="${new_path}.exe"
38497    elif test -f "${new_path}.cmd"; then
38498      input_to_shortpath="${new_path}.cmd"
38499    else
38500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38501$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38504      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38505    fi
38506  else
38507    input_to_shortpath="$new_path"
38508  fi
38509
38510  # Call helper function which possibly converts this using DOS-style short mode.
38511  # If so, the updated path is stored in $new_path.
38512  new_path="$input_to_shortpath"
38513
38514  input_path="$input_to_shortpath"
38515  # Check if we need to convert this using DOS-style short mode. If the path
38516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38517  # take no chances and rewrite it.
38518  # Note: m4 eats our [], so we need to use [ and ] instead.
38519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38520  if test "x$has_forbidden_chars" != x; then
38521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38525      # Going to short mode and back again did indeed matter. Since short mode is
38526      # case insensitive, let's make it lowercase to improve readability.
38527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38528      # Now convert it back to Unix-style (cygpath)
38529      input_path=`$CYGPATH -u "$shortmode_path"`
38530      new_path="$input_path"
38531    fi
38532  fi
38533
38534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38535  if test "x$test_cygdrive_prefix" = x; then
38536    # As a simple fix, exclude /usr/bin since it's not a real path.
38537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38539      # a path prefixed by /cygdrive for fixpath to work.
38540      new_path="$CYGWIN_ROOT_PATH$input_path"
38541    fi
38542  fi
38543
38544  # remove trailing .exe if any
38545  new_path="${new_path/%.exe/}"
38546
38547    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38548
38549  # First separate the path from the arguments. This will split at the first
38550  # space.
38551  complete="$RC"
38552  path="${complete%% *}"
38553  tmp="$complete EOL"
38554  arguments="${tmp#* }"
38555
38556  # Input might be given as Windows format, start by converting to
38557  # unix format.
38558  new_path="$path"
38559
38560  windows_path="$new_path"
38561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38562    unix_path=`$CYGPATH -u "$windows_path"`
38563    new_path="$unix_path"
38564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38566    new_path="$unix_path"
38567  fi
38568
38569
38570  # Now try to locate executable using which
38571  new_path=`$WHICH "$new_path" 2> /dev/null`
38572
38573  if test "x$new_path" = x; then
38574    # Oops. Which didn't find the executable.
38575    # The splitting of arguments from the executable at a space might have been incorrect,
38576    # since paths with space are more likely in Windows. Give it another try with the whole
38577    # argument.
38578    path="$complete"
38579    arguments="EOL"
38580    new_path="$path"
38581
38582  windows_path="$new_path"
38583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38584    unix_path=`$CYGPATH -u "$windows_path"`
38585    new_path="$unix_path"
38586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38588    new_path="$unix_path"
38589  fi
38590
38591
38592    new_path=`$WHICH "$new_path" 2> /dev/null`
38593    # bat and cmd files are not always considered executable in MSYS causing which
38594    # to not find them
38595    if test "x$new_path" = x \
38596        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38597        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38598      new_path="$path"
38599
38600  windows_path="$new_path"
38601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38602    unix_path=`$CYGPATH -u "$windows_path"`
38603    new_path="$unix_path"
38604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38606    new_path="$unix_path"
38607  fi
38608
38609    fi
38610
38611    if test "x$new_path" = x; then
38612      # It's still not found. Now this is an unrecoverable error.
38613      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38614$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38615      has_space=`$ECHO "$complete" | $GREP " "`
38616      if test "x$has_space" != x; then
38617        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38618$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38619      fi
38620      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38621    fi
38622  fi
38623
38624  # Now new_path has a complete unix path to the binary
38625  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38626    # Keep paths in /bin as-is, but remove trailing .exe if any
38627    new_path="${new_path/%.exe/}"
38628    # Do not save /bin paths to all_fixpath_prefixes!
38629  else
38630    # Not in mixed or Windows style, start by that.
38631    new_path=`cmd //c echo $new_path`
38632
38633  input_path="$new_path"
38634  # Check if we need to convert this using DOS-style short mode. If the path
38635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38636  # take no chances and rewrite it.
38637  # Note: m4 eats our [], so we need to use [ and ] instead.
38638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38639  if test "x$has_forbidden_chars" != x; then
38640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38642  fi
38643
38644    # Output is in $new_path
38645
38646  windows_path="$new_path"
38647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38648    unix_path=`$CYGPATH -u "$windows_path"`
38649    new_path="$unix_path"
38650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38652    new_path="$unix_path"
38653  fi
38654
38655    # remove trailing .exe if any
38656    new_path="${new_path/%.exe/}"
38657
38658    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38659    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38660  fi
38661
38662    else
38663      # We're on a unix platform. Hooray! :)
38664      # First separate the path from the arguments. This will split at the first
38665      # space.
38666      complete="$RC"
38667      path="${complete%% *}"
38668      tmp="$complete EOL"
38669      arguments="${tmp#* }"
38670
38671      # Cannot rely on the command "which" here since it doesn't always work.
38672      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38673      if test -z "$is_absolute_path"; then
38674        # Path to executable is not absolute. Find it.
38675        IFS_save="$IFS"
38676        IFS=:
38677        for p in $PATH; do
38678          if test -f "$p/$path" && test -x "$p/$path"; then
38679            new_path="$p/$path"
38680            break
38681          fi
38682        done
38683        IFS="$IFS_save"
38684      else
38685        # This is an absolute path, we can use it without further modifications.
38686        new_path="$path"
38687      fi
38688
38689      if test "x$new_path" = x; then
38690        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38691$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38692        has_space=`$ECHO "$complete" | $GREP " "`
38693        if test "x$has_space" != x; then
38694          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38695$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38696        fi
38697        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38698      fi
38699    fi
38700
38701    # Now join together the path and the arguments once again
38702    if test "x$arguments" != xEOL; then
38703      new_complete="$new_path ${arguments% *}"
38704    else
38705      new_complete="$new_path"
38706    fi
38707
38708    if test "x$complete" != "x$new_complete"; then
38709      RC="$new_complete"
38710      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38711$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38712    fi
38713  fi
38714
38715    # Extract the first word of "dumpbin", so it can be a program name with args.
38716set dummy dumpbin; ac_word=$2
38717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38718$as_echo_n "checking for $ac_word... " >&6; }
38719if ${ac_cv_prog_DUMPBIN+:} false; then :
38720  $as_echo_n "(cached) " >&6
38721else
38722  if test -n "$DUMPBIN"; then
38723  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38724else
38725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38726for as_dir in $PATH
38727do
38728  IFS=$as_save_IFS
38729  test -z "$as_dir" && as_dir=.
38730    for ac_exec_ext in '' $ac_executable_extensions; do
38731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38732    ac_cv_prog_DUMPBIN="dumpbin"
38733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38734    break 2
38735  fi
38736done
38737  done
38738IFS=$as_save_IFS
38739
38740fi
38741fi
38742DUMPBIN=$ac_cv_prog_DUMPBIN
38743if test -n "$DUMPBIN"; then
38744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38745$as_echo "$DUMPBIN" >&6; }
38746else
38747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38748$as_echo "no" >&6; }
38749fi
38750
38751
38752
38753  # Only process if variable expands to non-empty
38754
38755  if test "x$DUMPBIN" != x; then
38756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38757
38758  # First separate the path from the arguments. This will split at the first
38759  # space.
38760  complete="$DUMPBIN"
38761  path="${complete%% *}"
38762  tmp="$complete EOL"
38763  arguments="${tmp#* }"
38764
38765  # Input might be given as Windows format, start by converting to
38766  # unix format.
38767  new_path=`$CYGPATH -u "$path"`
38768
38769  # Now try to locate executable using which
38770  new_path=`$WHICH "$new_path" 2> /dev/null`
38771  # bat and cmd files are not always considered executable in cygwin causing which
38772  # to not find them
38773  if test "x$new_path" = x \
38774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38776    new_path=`$CYGPATH -u "$path"`
38777  fi
38778  if test "x$new_path" = x; then
38779    # Oops. Which didn't find the executable.
38780    # The splitting of arguments from the executable at a space might have been incorrect,
38781    # since paths with space are more likely in Windows. Give it another try with the whole
38782    # argument.
38783    path="$complete"
38784    arguments="EOL"
38785    new_path=`$CYGPATH -u "$path"`
38786    new_path=`$WHICH "$new_path" 2> /dev/null`
38787    # bat and cmd files are not always considered executable in cygwin causing which
38788    # to not find them
38789    if test "x$new_path" = x \
38790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38792      new_path=`$CYGPATH -u "$path"`
38793    fi
38794    if test "x$new_path" = x; then
38795      # It's still not found. Now this is an unrecoverable error.
38796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38797$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38798      has_space=`$ECHO "$complete" | $GREP " "`
38799      if test "x$has_space" != x; then
38800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38802      fi
38803      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38804    fi
38805  fi
38806
38807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38810  # "foo.exe" is OK but "foo" is an error.
38811  #
38812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38813  # It is also a way to make sure we got the proper file name for the real test later on.
38814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38815  if test "x$test_shortpath" = x; then
38816    # Short path failed, file does not exist as specified.
38817    # Try adding .exe or .cmd
38818    if test -f "${new_path}.exe"; then
38819      input_to_shortpath="${new_path}.exe"
38820    elif test -f "${new_path}.cmd"; then
38821      input_to_shortpath="${new_path}.cmd"
38822    else
38823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38824$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38827      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38828    fi
38829  else
38830    input_to_shortpath="$new_path"
38831  fi
38832
38833  # Call helper function which possibly converts this using DOS-style short mode.
38834  # If so, the updated path is stored in $new_path.
38835  new_path="$input_to_shortpath"
38836
38837  input_path="$input_to_shortpath"
38838  # Check if we need to convert this using DOS-style short mode. If the path
38839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38840  # take no chances and rewrite it.
38841  # Note: m4 eats our [], so we need to use [ and ] instead.
38842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38843  if test "x$has_forbidden_chars" != x; then
38844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38848      # Going to short mode and back again did indeed matter. Since short mode is
38849      # case insensitive, let's make it lowercase to improve readability.
38850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38851      # Now convert it back to Unix-style (cygpath)
38852      input_path=`$CYGPATH -u "$shortmode_path"`
38853      new_path="$input_path"
38854    fi
38855  fi
38856
38857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38858  if test "x$test_cygdrive_prefix" = x; then
38859    # As a simple fix, exclude /usr/bin since it's not a real path.
38860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38862      # a path prefixed by /cygdrive for fixpath to work.
38863      new_path="$CYGWIN_ROOT_PATH$input_path"
38864    fi
38865  fi
38866
38867  # remove trailing .exe if any
38868  new_path="${new_path/%.exe/}"
38869
38870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38871
38872  # First separate the path from the arguments. This will split at the first
38873  # space.
38874  complete="$DUMPBIN"
38875  path="${complete%% *}"
38876  tmp="$complete EOL"
38877  arguments="${tmp#* }"
38878
38879  # Input might be given as Windows format, start by converting to
38880  # unix format.
38881  new_path="$path"
38882
38883  windows_path="$new_path"
38884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38885    unix_path=`$CYGPATH -u "$windows_path"`
38886    new_path="$unix_path"
38887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38889    new_path="$unix_path"
38890  fi
38891
38892
38893  # Now try to locate executable using which
38894  new_path=`$WHICH "$new_path" 2> /dev/null`
38895
38896  if test "x$new_path" = x; then
38897    # Oops. Which didn't find the executable.
38898    # The splitting of arguments from the executable at a space might have been incorrect,
38899    # since paths with space are more likely in Windows. Give it another try with the whole
38900    # argument.
38901    path="$complete"
38902    arguments="EOL"
38903    new_path="$path"
38904
38905  windows_path="$new_path"
38906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38907    unix_path=`$CYGPATH -u "$windows_path"`
38908    new_path="$unix_path"
38909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38911    new_path="$unix_path"
38912  fi
38913
38914
38915    new_path=`$WHICH "$new_path" 2> /dev/null`
38916    # bat and cmd files are not always considered executable in MSYS causing which
38917    # to not find them
38918    if test "x$new_path" = x \
38919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38921      new_path="$path"
38922
38923  windows_path="$new_path"
38924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38925    unix_path=`$CYGPATH -u "$windows_path"`
38926    new_path="$unix_path"
38927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38929    new_path="$unix_path"
38930  fi
38931
38932    fi
38933
38934    if test "x$new_path" = x; then
38935      # It's still not found. Now this is an unrecoverable error.
38936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38937$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38938      has_space=`$ECHO "$complete" | $GREP " "`
38939      if test "x$has_space" != x; then
38940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38942      fi
38943      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38944    fi
38945  fi
38946
38947  # Now new_path has a complete unix path to the binary
38948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38949    # Keep paths in /bin as-is, but remove trailing .exe if any
38950    new_path="${new_path/%.exe/}"
38951    # Do not save /bin paths to all_fixpath_prefixes!
38952  else
38953    # Not in mixed or Windows style, start by that.
38954    new_path=`cmd //c echo $new_path`
38955
38956  input_path="$new_path"
38957  # Check if we need to convert this using DOS-style short mode. If the path
38958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38959  # take no chances and rewrite it.
38960  # Note: m4 eats our [], so we need to use [ and ] instead.
38961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38962  if test "x$has_forbidden_chars" != x; then
38963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38965  fi
38966
38967    # Output is in $new_path
38968
38969  windows_path="$new_path"
38970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38971    unix_path=`$CYGPATH -u "$windows_path"`
38972    new_path="$unix_path"
38973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38975    new_path="$unix_path"
38976  fi
38977
38978    # remove trailing .exe if any
38979    new_path="${new_path/%.exe/}"
38980
38981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38983  fi
38984
38985    else
38986      # We're on a unix platform. Hooray! :)
38987      # First separate the path from the arguments. This will split at the first
38988      # space.
38989      complete="$DUMPBIN"
38990      path="${complete%% *}"
38991      tmp="$complete EOL"
38992      arguments="${tmp#* }"
38993
38994      # Cannot rely on the command "which" here since it doesn't always work.
38995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38996      if test -z "$is_absolute_path"; then
38997        # Path to executable is not absolute. Find it.
38998        IFS_save="$IFS"
38999        IFS=:
39000        for p in $PATH; do
39001          if test -f "$p/$path" && test -x "$p/$path"; then
39002            new_path="$p/$path"
39003            break
39004          fi
39005        done
39006        IFS="$IFS_save"
39007      else
39008        # This is an absolute path, we can use it without further modifications.
39009        new_path="$path"
39010      fi
39011
39012      if test "x$new_path" = x; then
39013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39014$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39015        has_space=`$ECHO "$complete" | $GREP " "`
39016        if test "x$has_space" != x; then
39017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39019        fi
39020        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39021      fi
39022    fi
39023
39024    # Now join together the path and the arguments once again
39025    if test "x$arguments" != xEOL; then
39026      new_complete="$new_path ${arguments% *}"
39027    else
39028      new_complete="$new_path"
39029    fi
39030
39031    if test "x$complete" != "x$new_complete"; then
39032      DUMPBIN="$new_complete"
39033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39034$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39035    fi
39036  fi
39037
39038    # We need to check for 'msbuild.exe' because at the place where we expect to
39039    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39040    # won't find the 'msbuild.exe' executable in that case (and the
39041    # 'ac_executable_extensions' is unusable due to performance reasons).
39042    # Notice that we intentionally don't fix up the path to MSBUILD because we
39043    # will call it in a DOS shell during freetype detection on Windows (see
39044    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39045    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39046set dummy msbuild.exe; ac_word=$2
39047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39048$as_echo_n "checking for $ac_word... " >&6; }
39049if ${ac_cv_prog_MSBUILD+:} false; then :
39050  $as_echo_n "(cached) " >&6
39051else
39052  if test -n "$MSBUILD"; then
39053  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39054else
39055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39056for as_dir in $PATH
39057do
39058  IFS=$as_save_IFS
39059  test -z "$as_dir" && as_dir=.
39060    for ac_exec_ext in '' $ac_executable_extensions; do
39061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39062    ac_cv_prog_MSBUILD="msbuild.exe"
39063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39064    break 2
39065  fi
39066done
39067  done
39068IFS=$as_save_IFS
39069
39070fi
39071fi
39072MSBUILD=$ac_cv_prog_MSBUILD
39073if test -n "$MSBUILD"; then
39074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39075$as_echo "$MSBUILD" >&6; }
39076else
39077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39078$as_echo "no" >&6; }
39079fi
39080
39081
39082  fi
39083
39084  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39085
39086
39087  # Publish this variable in the help.
39088
39089
39090  if [ -z "${STRIP+x}" ]; then
39091    # The variable is not set by user, try to locate tool using the code snippet
39092    for ac_prog in strip
39093do
39094  # Extract the first word of "$ac_prog", so it can be a program name with args.
39095set dummy $ac_prog; ac_word=$2
39096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39097$as_echo_n "checking for $ac_word... " >&6; }
39098if ${ac_cv_path_STRIP+:} false; then :
39099  $as_echo_n "(cached) " >&6
39100else
39101  case $STRIP in
39102  [\\/]* | ?:[\\/]*)
39103  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39104  ;;
39105  *)
39106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39107for as_dir in $PATH
39108do
39109  IFS=$as_save_IFS
39110  test -z "$as_dir" && as_dir=.
39111    for ac_exec_ext in '' $ac_executable_extensions; do
39112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39113    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39115    break 2
39116  fi
39117done
39118  done
39119IFS=$as_save_IFS
39120
39121  ;;
39122esac
39123fi
39124STRIP=$ac_cv_path_STRIP
39125if test -n "$STRIP"; then
39126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39127$as_echo "$STRIP" >&6; }
39128else
39129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39130$as_echo "no" >&6; }
39131fi
39132
39133
39134  test -n "$STRIP" && break
39135done
39136
39137  else
39138    # The variable is set, but is it from the command line or the environment?
39139
39140    # Try to remove the string !STRIP! from our list.
39141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39143      # If it failed, the variable was not from the command line. Ignore it,
39144      # but warn the user (except for BASH, which is always set by the calling BASH).
39145      if test "xSTRIP" != xBASH; then
39146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39147$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39148      fi
39149      # Try to locate tool using the code snippet
39150      for ac_prog in strip
39151do
39152  # Extract the first word of "$ac_prog", so it can be a program name with args.
39153set dummy $ac_prog; ac_word=$2
39154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39155$as_echo_n "checking for $ac_word... " >&6; }
39156if ${ac_cv_path_STRIP+:} false; then :
39157  $as_echo_n "(cached) " >&6
39158else
39159  case $STRIP in
39160  [\\/]* | ?:[\\/]*)
39161  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39162  ;;
39163  *)
39164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39165for as_dir in $PATH
39166do
39167  IFS=$as_save_IFS
39168  test -z "$as_dir" && as_dir=.
39169    for ac_exec_ext in '' $ac_executable_extensions; do
39170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39171    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39173    break 2
39174  fi
39175done
39176  done
39177IFS=$as_save_IFS
39178
39179  ;;
39180esac
39181fi
39182STRIP=$ac_cv_path_STRIP
39183if test -n "$STRIP"; then
39184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39185$as_echo "$STRIP" >&6; }
39186else
39187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39188$as_echo "no" >&6; }
39189fi
39190
39191
39192  test -n "$STRIP" && break
39193done
39194
39195    else
39196      # If it succeeded, then it was overridden by the user. We will use it
39197      # for the tool.
39198
39199      # First remove it from the list of overridden variables, so we can test
39200      # for unknown variables in the end.
39201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39202
39203      # Check if we try to supply an empty value
39204      if test "x$STRIP" = x; then
39205        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39206$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39207        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39208$as_echo_n "checking for STRIP... " >&6; }
39209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39210$as_echo "disabled" >&6; }
39211      else
39212        # Check if the provided tool contains a complete path.
39213        tool_specified="$STRIP"
39214        tool_basename="${tool_specified##*/}"
39215        if test "x$tool_basename" = "x$tool_specified"; then
39216          # A command without a complete path is provided, search $PATH.
39217          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39218$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39219          # Extract the first word of "$tool_basename", so it can be a program name with args.
39220set dummy $tool_basename; ac_word=$2
39221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39222$as_echo_n "checking for $ac_word... " >&6; }
39223if ${ac_cv_path_STRIP+:} false; then :
39224  $as_echo_n "(cached) " >&6
39225else
39226  case $STRIP in
39227  [\\/]* | ?:[\\/]*)
39228  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39229  ;;
39230  *)
39231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39232for as_dir in $PATH
39233do
39234  IFS=$as_save_IFS
39235  test -z "$as_dir" && as_dir=.
39236    for ac_exec_ext in '' $ac_executable_extensions; do
39237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39238    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39240    break 2
39241  fi
39242done
39243  done
39244IFS=$as_save_IFS
39245
39246  ;;
39247esac
39248fi
39249STRIP=$ac_cv_path_STRIP
39250if test -n "$STRIP"; then
39251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39252$as_echo "$STRIP" >&6; }
39253else
39254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39255$as_echo "no" >&6; }
39256fi
39257
39258
39259          if test "x$STRIP" = x; then
39260            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39261          fi
39262        else
39263          # Otherwise we believe it is a complete path. Use it as it is.
39264          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39265$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39266          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39267$as_echo_n "checking for STRIP... " >&6; }
39268          if test ! -x "$tool_specified"; then
39269            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39270$as_echo "not found" >&6; }
39271            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39272          fi
39273          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39274$as_echo "$tool_specified" >&6; }
39275        fi
39276      fi
39277    fi
39278
39279  fi
39280
39281
39282
39283  # Only process if variable expands to non-empty
39284
39285  if test "x$STRIP" != x; then
39286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39287
39288  # First separate the path from the arguments. This will split at the first
39289  # space.
39290  complete="$STRIP"
39291  path="${complete%% *}"
39292  tmp="$complete EOL"
39293  arguments="${tmp#* }"
39294
39295  # Input might be given as Windows format, start by converting to
39296  # unix format.
39297  new_path=`$CYGPATH -u "$path"`
39298
39299  # Now try to locate executable using which
39300  new_path=`$WHICH "$new_path" 2> /dev/null`
39301  # bat and cmd files are not always considered executable in cygwin causing which
39302  # to not find them
39303  if test "x$new_path" = x \
39304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39306    new_path=`$CYGPATH -u "$path"`
39307  fi
39308  if test "x$new_path" = x; then
39309    # Oops. Which didn't find the executable.
39310    # The splitting of arguments from the executable at a space might have been incorrect,
39311    # since paths with space are more likely in Windows. Give it another try with the whole
39312    # argument.
39313    path="$complete"
39314    arguments="EOL"
39315    new_path=`$CYGPATH -u "$path"`
39316    new_path=`$WHICH "$new_path" 2> /dev/null`
39317    # bat and cmd files are not always considered executable in cygwin causing which
39318    # to not find them
39319    if test "x$new_path" = x \
39320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39322      new_path=`$CYGPATH -u "$path"`
39323    fi
39324    if test "x$new_path" = x; then
39325      # It's still not found. Now this is an unrecoverable error.
39326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39327$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39328      has_space=`$ECHO "$complete" | $GREP " "`
39329      if test "x$has_space" != x; then
39330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39332      fi
39333      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39334    fi
39335  fi
39336
39337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39340  # "foo.exe" is OK but "foo" is an error.
39341  #
39342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39343  # It is also a way to make sure we got the proper file name for the real test later on.
39344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39345  if test "x$test_shortpath" = x; then
39346    # Short path failed, file does not exist as specified.
39347    # Try adding .exe or .cmd
39348    if test -f "${new_path}.exe"; then
39349      input_to_shortpath="${new_path}.exe"
39350    elif test -f "${new_path}.cmd"; then
39351      input_to_shortpath="${new_path}.cmd"
39352    else
39353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39354$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39357      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39358    fi
39359  else
39360    input_to_shortpath="$new_path"
39361  fi
39362
39363  # Call helper function which possibly converts this using DOS-style short mode.
39364  # If so, the updated path is stored in $new_path.
39365  new_path="$input_to_shortpath"
39366
39367  input_path="$input_to_shortpath"
39368  # Check if we need to convert this using DOS-style short mode. If the path
39369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39370  # take no chances and rewrite it.
39371  # Note: m4 eats our [], so we need to use [ and ] instead.
39372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39373  if test "x$has_forbidden_chars" != x; then
39374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39378      # Going to short mode and back again did indeed matter. Since short mode is
39379      # case insensitive, let's make it lowercase to improve readability.
39380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39381      # Now convert it back to Unix-style (cygpath)
39382      input_path=`$CYGPATH -u "$shortmode_path"`
39383      new_path="$input_path"
39384    fi
39385  fi
39386
39387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39388  if test "x$test_cygdrive_prefix" = x; then
39389    # As a simple fix, exclude /usr/bin since it's not a real path.
39390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39392      # a path prefixed by /cygdrive for fixpath to work.
39393      new_path="$CYGWIN_ROOT_PATH$input_path"
39394    fi
39395  fi
39396
39397  # remove trailing .exe if any
39398  new_path="${new_path/%.exe/}"
39399
39400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39401
39402  # First separate the path from the arguments. This will split at the first
39403  # space.
39404  complete="$STRIP"
39405  path="${complete%% *}"
39406  tmp="$complete EOL"
39407  arguments="${tmp#* }"
39408
39409  # Input might be given as Windows format, start by converting to
39410  # unix format.
39411  new_path="$path"
39412
39413  windows_path="$new_path"
39414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39415    unix_path=`$CYGPATH -u "$windows_path"`
39416    new_path="$unix_path"
39417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39419    new_path="$unix_path"
39420  fi
39421
39422
39423  # Now try to locate executable using which
39424  new_path=`$WHICH "$new_path" 2> /dev/null`
39425
39426  if test "x$new_path" = x; then
39427    # Oops. Which didn't find the executable.
39428    # The splitting of arguments from the executable at a space might have been incorrect,
39429    # since paths with space are more likely in Windows. Give it another try with the whole
39430    # argument.
39431    path="$complete"
39432    arguments="EOL"
39433    new_path="$path"
39434
39435  windows_path="$new_path"
39436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39437    unix_path=`$CYGPATH -u "$windows_path"`
39438    new_path="$unix_path"
39439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39441    new_path="$unix_path"
39442  fi
39443
39444
39445    new_path=`$WHICH "$new_path" 2> /dev/null`
39446    # bat and cmd files are not always considered executable in MSYS causing which
39447    # to not find them
39448    if test "x$new_path" = x \
39449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39451      new_path="$path"
39452
39453  windows_path="$new_path"
39454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39455    unix_path=`$CYGPATH -u "$windows_path"`
39456    new_path="$unix_path"
39457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39459    new_path="$unix_path"
39460  fi
39461
39462    fi
39463
39464    if test "x$new_path" = x; then
39465      # It's still not found. Now this is an unrecoverable error.
39466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39467$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39468      has_space=`$ECHO "$complete" | $GREP " "`
39469      if test "x$has_space" != x; then
39470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39472      fi
39473      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39474    fi
39475  fi
39476
39477  # Now new_path has a complete unix path to the binary
39478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39479    # Keep paths in /bin as-is, but remove trailing .exe if any
39480    new_path="${new_path/%.exe/}"
39481    # Do not save /bin paths to all_fixpath_prefixes!
39482  else
39483    # Not in mixed or Windows style, start by that.
39484    new_path=`cmd //c echo $new_path`
39485
39486  input_path="$new_path"
39487  # Check if we need to convert this using DOS-style short mode. If the path
39488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39489  # take no chances and rewrite it.
39490  # Note: m4 eats our [], so we need to use [ and ] instead.
39491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39492  if test "x$has_forbidden_chars" != x; then
39493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39495  fi
39496
39497    # Output is in $new_path
39498
39499  windows_path="$new_path"
39500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39501    unix_path=`$CYGPATH -u "$windows_path"`
39502    new_path="$unix_path"
39503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39505    new_path="$unix_path"
39506  fi
39507
39508    # remove trailing .exe if any
39509    new_path="${new_path/%.exe/}"
39510
39511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39513  fi
39514
39515    else
39516      # We're on a unix platform. Hooray! :)
39517      # First separate the path from the arguments. This will split at the first
39518      # space.
39519      complete="$STRIP"
39520      path="${complete%% *}"
39521      tmp="$complete EOL"
39522      arguments="${tmp#* }"
39523
39524      # Cannot rely on the command "which" here since it doesn't always work.
39525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39526      if test -z "$is_absolute_path"; then
39527        # Path to executable is not absolute. Find it.
39528        IFS_save="$IFS"
39529        IFS=:
39530        for p in $PATH; do
39531          if test -f "$p/$path" && test -x "$p/$path"; then
39532            new_path="$p/$path"
39533            break
39534          fi
39535        done
39536        IFS="$IFS_save"
39537      else
39538        # This is an absolute path, we can use it without further modifications.
39539        new_path="$path"
39540      fi
39541
39542      if test "x$new_path" = x; then
39543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39544$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39545        has_space=`$ECHO "$complete" | $GREP " "`
39546        if test "x$has_space" != x; then
39547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39549        fi
39550        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39551      fi
39552    fi
39553
39554    # Now join together the path and the arguments once again
39555    if test "x$arguments" != xEOL; then
39556      new_complete="$new_path ${arguments% *}"
39557    else
39558      new_complete="$new_path"
39559    fi
39560
39561    if test "x$complete" != "x$new_complete"; then
39562      STRIP="$new_complete"
39563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39564$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39565    fi
39566  fi
39567
39568
39569
39570  # Publish this variable in the help.
39571
39572
39573  if [ -z "${NM+x}" ]; then
39574    # The variable is not set by user, try to locate tool using the code snippet
39575    for ac_prog in nm
39576do
39577  # Extract the first word of "$ac_prog", so it can be a program name with args.
39578set dummy $ac_prog; ac_word=$2
39579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39580$as_echo_n "checking for $ac_word... " >&6; }
39581if ${ac_cv_path_NM+:} false; then :
39582  $as_echo_n "(cached) " >&6
39583else
39584  case $NM in
39585  [\\/]* | ?:[\\/]*)
39586  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39587  ;;
39588  *)
39589  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39590for as_dir in $PATH
39591do
39592  IFS=$as_save_IFS
39593  test -z "$as_dir" && as_dir=.
39594    for ac_exec_ext in '' $ac_executable_extensions; do
39595  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39596    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39597    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39598    break 2
39599  fi
39600done
39601  done
39602IFS=$as_save_IFS
39603
39604  ;;
39605esac
39606fi
39607NM=$ac_cv_path_NM
39608if test -n "$NM"; then
39609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39610$as_echo "$NM" >&6; }
39611else
39612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39613$as_echo "no" >&6; }
39614fi
39615
39616
39617  test -n "$NM" && break
39618done
39619
39620  else
39621    # The variable is set, but is it from the command line or the environment?
39622
39623    # Try to remove the string !NM! from our list.
39624    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39625    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39626      # If it failed, the variable was not from the command line. Ignore it,
39627      # but warn the user (except for BASH, which is always set by the calling BASH).
39628      if test "xNM" != xBASH; then
39629        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39630$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39631      fi
39632      # Try to locate tool using the code snippet
39633      for ac_prog in nm
39634do
39635  # Extract the first word of "$ac_prog", so it can be a program name with args.
39636set dummy $ac_prog; ac_word=$2
39637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39638$as_echo_n "checking for $ac_word... " >&6; }
39639if ${ac_cv_path_NM+:} false; then :
39640  $as_echo_n "(cached) " >&6
39641else
39642  case $NM in
39643  [\\/]* | ?:[\\/]*)
39644  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39645  ;;
39646  *)
39647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39648for as_dir in $PATH
39649do
39650  IFS=$as_save_IFS
39651  test -z "$as_dir" && as_dir=.
39652    for ac_exec_ext in '' $ac_executable_extensions; do
39653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39654    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39656    break 2
39657  fi
39658done
39659  done
39660IFS=$as_save_IFS
39661
39662  ;;
39663esac
39664fi
39665NM=$ac_cv_path_NM
39666if test -n "$NM"; then
39667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39668$as_echo "$NM" >&6; }
39669else
39670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39671$as_echo "no" >&6; }
39672fi
39673
39674
39675  test -n "$NM" && break
39676done
39677
39678    else
39679      # If it succeeded, then it was overridden by the user. We will use it
39680      # for the tool.
39681
39682      # First remove it from the list of overridden variables, so we can test
39683      # for unknown variables in the end.
39684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39685
39686      # Check if we try to supply an empty value
39687      if test "x$NM" = x; then
39688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39689$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39691$as_echo_n "checking for NM... " >&6; }
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39693$as_echo "disabled" >&6; }
39694      else
39695        # Check if the provided tool contains a complete path.
39696        tool_specified="$NM"
39697        tool_basename="${tool_specified##*/}"
39698        if test "x$tool_basename" = "x$tool_specified"; then
39699          # A command without a complete path is provided, search $PATH.
39700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39701$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39702          # Extract the first word of "$tool_basename", so it can be a program name with args.
39703set dummy $tool_basename; ac_word=$2
39704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39705$as_echo_n "checking for $ac_word... " >&6; }
39706if ${ac_cv_path_NM+:} false; then :
39707  $as_echo_n "(cached) " >&6
39708else
39709  case $NM in
39710  [\\/]* | ?:[\\/]*)
39711  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39712  ;;
39713  *)
39714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39715for as_dir in $PATH
39716do
39717  IFS=$as_save_IFS
39718  test -z "$as_dir" && as_dir=.
39719    for ac_exec_ext in '' $ac_executable_extensions; do
39720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39721    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39723    break 2
39724  fi
39725done
39726  done
39727IFS=$as_save_IFS
39728
39729  ;;
39730esac
39731fi
39732NM=$ac_cv_path_NM
39733if test -n "$NM"; then
39734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39735$as_echo "$NM" >&6; }
39736else
39737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39738$as_echo "no" >&6; }
39739fi
39740
39741
39742          if test "x$NM" = x; then
39743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39744          fi
39745        else
39746          # Otherwise we believe it is a complete path. Use it as it is.
39747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39748$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39750$as_echo_n "checking for NM... " >&6; }
39751          if test ! -x "$tool_specified"; then
39752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39753$as_echo "not found" >&6; }
39754            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39755          fi
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39757$as_echo "$tool_specified" >&6; }
39758        fi
39759      fi
39760    fi
39761
39762  fi
39763
39764
39765
39766  # Only process if variable expands to non-empty
39767
39768  if test "x$NM" != x; then
39769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39770
39771  # First separate the path from the arguments. This will split at the first
39772  # space.
39773  complete="$NM"
39774  path="${complete%% *}"
39775  tmp="$complete EOL"
39776  arguments="${tmp#* }"
39777
39778  # Input might be given as Windows format, start by converting to
39779  # unix format.
39780  new_path=`$CYGPATH -u "$path"`
39781
39782  # Now try to locate executable using which
39783  new_path=`$WHICH "$new_path" 2> /dev/null`
39784  # bat and cmd files are not always considered executable in cygwin causing which
39785  # to not find them
39786  if test "x$new_path" = x \
39787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39789    new_path=`$CYGPATH -u "$path"`
39790  fi
39791  if test "x$new_path" = x; then
39792    # Oops. Which didn't find the executable.
39793    # The splitting of arguments from the executable at a space might have been incorrect,
39794    # since paths with space are more likely in Windows. Give it another try with the whole
39795    # argument.
39796    path="$complete"
39797    arguments="EOL"
39798    new_path=`$CYGPATH -u "$path"`
39799    new_path=`$WHICH "$new_path" 2> /dev/null`
39800    # bat and cmd files are not always considered executable in cygwin causing which
39801    # to not find them
39802    if test "x$new_path" = x \
39803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39805      new_path=`$CYGPATH -u "$path"`
39806    fi
39807    if test "x$new_path" = x; then
39808      # It's still not found. Now this is an unrecoverable error.
39809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39810$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39811      has_space=`$ECHO "$complete" | $GREP " "`
39812      if test "x$has_space" != x; then
39813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39815      fi
39816      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39817    fi
39818  fi
39819
39820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39823  # "foo.exe" is OK but "foo" is an error.
39824  #
39825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39826  # It is also a way to make sure we got the proper file name for the real test later on.
39827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39828  if test "x$test_shortpath" = x; then
39829    # Short path failed, file does not exist as specified.
39830    # Try adding .exe or .cmd
39831    if test -f "${new_path}.exe"; then
39832      input_to_shortpath="${new_path}.exe"
39833    elif test -f "${new_path}.cmd"; then
39834      input_to_shortpath="${new_path}.cmd"
39835    else
39836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39837$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39840      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39841    fi
39842  else
39843    input_to_shortpath="$new_path"
39844  fi
39845
39846  # Call helper function which possibly converts this using DOS-style short mode.
39847  # If so, the updated path is stored in $new_path.
39848  new_path="$input_to_shortpath"
39849
39850  input_path="$input_to_shortpath"
39851  # Check if we need to convert this using DOS-style short mode. If the path
39852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39853  # take no chances and rewrite it.
39854  # Note: m4 eats our [], so we need to use [ and ] instead.
39855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39856  if test "x$has_forbidden_chars" != x; then
39857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39861      # Going to short mode and back again did indeed matter. Since short mode is
39862      # case insensitive, let's make it lowercase to improve readability.
39863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39864      # Now convert it back to Unix-style (cygpath)
39865      input_path=`$CYGPATH -u "$shortmode_path"`
39866      new_path="$input_path"
39867    fi
39868  fi
39869
39870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39871  if test "x$test_cygdrive_prefix" = x; then
39872    # As a simple fix, exclude /usr/bin since it's not a real path.
39873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39875      # a path prefixed by /cygdrive for fixpath to work.
39876      new_path="$CYGWIN_ROOT_PATH$input_path"
39877    fi
39878  fi
39879
39880  # remove trailing .exe if any
39881  new_path="${new_path/%.exe/}"
39882
39883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39884
39885  # First separate the path from the arguments. This will split at the first
39886  # space.
39887  complete="$NM"
39888  path="${complete%% *}"
39889  tmp="$complete EOL"
39890  arguments="${tmp#* }"
39891
39892  # Input might be given as Windows format, start by converting to
39893  # unix format.
39894  new_path="$path"
39895
39896  windows_path="$new_path"
39897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39898    unix_path=`$CYGPATH -u "$windows_path"`
39899    new_path="$unix_path"
39900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39902    new_path="$unix_path"
39903  fi
39904
39905
39906  # Now try to locate executable using which
39907  new_path=`$WHICH "$new_path" 2> /dev/null`
39908
39909  if test "x$new_path" = x; then
39910    # Oops. Which didn't find the executable.
39911    # The splitting of arguments from the executable at a space might have been incorrect,
39912    # since paths with space are more likely in Windows. Give it another try with the whole
39913    # argument.
39914    path="$complete"
39915    arguments="EOL"
39916    new_path="$path"
39917
39918  windows_path="$new_path"
39919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39920    unix_path=`$CYGPATH -u "$windows_path"`
39921    new_path="$unix_path"
39922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39924    new_path="$unix_path"
39925  fi
39926
39927
39928    new_path=`$WHICH "$new_path" 2> /dev/null`
39929    # bat and cmd files are not always considered executable in MSYS causing which
39930    # to not find them
39931    if test "x$new_path" = x \
39932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39934      new_path="$path"
39935
39936  windows_path="$new_path"
39937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39938    unix_path=`$CYGPATH -u "$windows_path"`
39939    new_path="$unix_path"
39940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39942    new_path="$unix_path"
39943  fi
39944
39945    fi
39946
39947    if test "x$new_path" = x; then
39948      # It's still not found. Now this is an unrecoverable error.
39949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39950$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39951      has_space=`$ECHO "$complete" | $GREP " "`
39952      if test "x$has_space" != x; then
39953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39955      fi
39956      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39957    fi
39958  fi
39959
39960  # Now new_path has a complete unix path to the binary
39961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39962    # Keep paths in /bin as-is, but remove trailing .exe if any
39963    new_path="${new_path/%.exe/}"
39964    # Do not save /bin paths to all_fixpath_prefixes!
39965  else
39966    # Not in mixed or Windows style, start by that.
39967    new_path=`cmd //c echo $new_path`
39968
39969  input_path="$new_path"
39970  # Check if we need to convert this using DOS-style short mode. If the path
39971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39972  # take no chances and rewrite it.
39973  # Note: m4 eats our [], so we need to use [ and ] instead.
39974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39975  if test "x$has_forbidden_chars" != x; then
39976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39978  fi
39979
39980    # Output is in $new_path
39981
39982  windows_path="$new_path"
39983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39984    unix_path=`$CYGPATH -u "$windows_path"`
39985    new_path="$unix_path"
39986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39988    new_path="$unix_path"
39989  fi
39990
39991    # remove trailing .exe if any
39992    new_path="${new_path/%.exe/}"
39993
39994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39996  fi
39997
39998    else
39999      # We're on a unix platform. Hooray! :)
40000      # First separate the path from the arguments. This will split at the first
40001      # space.
40002      complete="$NM"
40003      path="${complete%% *}"
40004      tmp="$complete EOL"
40005      arguments="${tmp#* }"
40006
40007      # Cannot rely on the command "which" here since it doesn't always work.
40008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40009      if test -z "$is_absolute_path"; then
40010        # Path to executable is not absolute. Find it.
40011        IFS_save="$IFS"
40012        IFS=:
40013        for p in $PATH; do
40014          if test -f "$p/$path" && test -x "$p/$path"; then
40015            new_path="$p/$path"
40016            break
40017          fi
40018        done
40019        IFS="$IFS_save"
40020      else
40021        # This is an absolute path, we can use it without further modifications.
40022        new_path="$path"
40023      fi
40024
40025      if test "x$new_path" = x; then
40026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40027$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40028        has_space=`$ECHO "$complete" | $GREP " "`
40029        if test "x$has_space" != x; then
40030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40032        fi
40033        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40034      fi
40035    fi
40036
40037    # Now join together the path and the arguments once again
40038    if test "x$arguments" != xEOL; then
40039      new_complete="$new_path ${arguments% *}"
40040    else
40041      new_complete="$new_path"
40042    fi
40043
40044    if test "x$complete" != "x$new_complete"; then
40045      NM="$new_complete"
40046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40047$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40048    fi
40049  fi
40050
40051
40052
40053  # Publish this variable in the help.
40054
40055
40056  if [ -z "${GNM+x}" ]; then
40057    # The variable is not set by user, try to locate tool using the code snippet
40058    for ac_prog in gnm
40059do
40060  # Extract the first word of "$ac_prog", so it can be a program name with args.
40061set dummy $ac_prog; ac_word=$2
40062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40063$as_echo_n "checking for $ac_word... " >&6; }
40064if ${ac_cv_path_GNM+:} false; then :
40065  $as_echo_n "(cached) " >&6
40066else
40067  case $GNM in
40068  [\\/]* | ?:[\\/]*)
40069  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40070  ;;
40071  *)
40072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40073for as_dir in $PATH
40074do
40075  IFS=$as_save_IFS
40076  test -z "$as_dir" && as_dir=.
40077    for ac_exec_ext in '' $ac_executable_extensions; do
40078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40079    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40081    break 2
40082  fi
40083done
40084  done
40085IFS=$as_save_IFS
40086
40087  ;;
40088esac
40089fi
40090GNM=$ac_cv_path_GNM
40091if test -n "$GNM"; then
40092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40093$as_echo "$GNM" >&6; }
40094else
40095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40096$as_echo "no" >&6; }
40097fi
40098
40099
40100  test -n "$GNM" && break
40101done
40102
40103  else
40104    # The variable is set, but is it from the command line or the environment?
40105
40106    # Try to remove the string !GNM! from our list.
40107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40109      # If it failed, the variable was not from the command line. Ignore it,
40110      # but warn the user (except for BASH, which is always set by the calling BASH).
40111      if test "xGNM" != xBASH; then
40112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40113$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40114      fi
40115      # Try to locate tool using the code snippet
40116      for ac_prog in gnm
40117do
40118  # Extract the first word of "$ac_prog", so it can be a program name with args.
40119set dummy $ac_prog; ac_word=$2
40120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40121$as_echo_n "checking for $ac_word... " >&6; }
40122if ${ac_cv_path_GNM+:} false; then :
40123  $as_echo_n "(cached) " >&6
40124else
40125  case $GNM in
40126  [\\/]* | ?:[\\/]*)
40127  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40128  ;;
40129  *)
40130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40131for as_dir in $PATH
40132do
40133  IFS=$as_save_IFS
40134  test -z "$as_dir" && as_dir=.
40135    for ac_exec_ext in '' $ac_executable_extensions; do
40136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40137    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40139    break 2
40140  fi
40141done
40142  done
40143IFS=$as_save_IFS
40144
40145  ;;
40146esac
40147fi
40148GNM=$ac_cv_path_GNM
40149if test -n "$GNM"; then
40150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40151$as_echo "$GNM" >&6; }
40152else
40153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40154$as_echo "no" >&6; }
40155fi
40156
40157
40158  test -n "$GNM" && break
40159done
40160
40161    else
40162      # If it succeeded, then it was overridden by the user. We will use it
40163      # for the tool.
40164
40165      # First remove it from the list of overridden variables, so we can test
40166      # for unknown variables in the end.
40167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40168
40169      # Check if we try to supply an empty value
40170      if test "x$GNM" = x; then
40171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40172$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40174$as_echo_n "checking for GNM... " >&6; }
40175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40176$as_echo "disabled" >&6; }
40177      else
40178        # Check if the provided tool contains a complete path.
40179        tool_specified="$GNM"
40180        tool_basename="${tool_specified##*/}"
40181        if test "x$tool_basename" = "x$tool_specified"; then
40182          # A command without a complete path is provided, search $PATH.
40183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40184$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40185          # Extract the first word of "$tool_basename", so it can be a program name with args.
40186set dummy $tool_basename; ac_word=$2
40187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40188$as_echo_n "checking for $ac_word... " >&6; }
40189if ${ac_cv_path_GNM+:} false; then :
40190  $as_echo_n "(cached) " >&6
40191else
40192  case $GNM in
40193  [\\/]* | ?:[\\/]*)
40194  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40195  ;;
40196  *)
40197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40198for as_dir in $PATH
40199do
40200  IFS=$as_save_IFS
40201  test -z "$as_dir" && as_dir=.
40202    for ac_exec_ext in '' $ac_executable_extensions; do
40203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40204    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40206    break 2
40207  fi
40208done
40209  done
40210IFS=$as_save_IFS
40211
40212  ;;
40213esac
40214fi
40215GNM=$ac_cv_path_GNM
40216if test -n "$GNM"; then
40217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40218$as_echo "$GNM" >&6; }
40219else
40220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40221$as_echo "no" >&6; }
40222fi
40223
40224
40225          if test "x$GNM" = x; then
40226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40227          fi
40228        else
40229          # Otherwise we believe it is a complete path. Use it as it is.
40230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40231$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40233$as_echo_n "checking for GNM... " >&6; }
40234          if test ! -x "$tool_specified"; then
40235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40236$as_echo "not found" >&6; }
40237            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40238          fi
40239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40240$as_echo "$tool_specified" >&6; }
40241        fi
40242      fi
40243    fi
40244
40245  fi
40246
40247
40248
40249  # Only process if variable expands to non-empty
40250
40251  if test "x$GNM" != x; then
40252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40253
40254  # First separate the path from the arguments. This will split at the first
40255  # space.
40256  complete="$GNM"
40257  path="${complete%% *}"
40258  tmp="$complete EOL"
40259  arguments="${tmp#* }"
40260
40261  # Input might be given as Windows format, start by converting to
40262  # unix format.
40263  new_path=`$CYGPATH -u "$path"`
40264
40265  # Now try to locate executable using which
40266  new_path=`$WHICH "$new_path" 2> /dev/null`
40267  # bat and cmd files are not always considered executable in cygwin causing which
40268  # to not find them
40269  if test "x$new_path" = x \
40270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40272    new_path=`$CYGPATH -u "$path"`
40273  fi
40274  if test "x$new_path" = x; then
40275    # Oops. Which didn't find the executable.
40276    # The splitting of arguments from the executable at a space might have been incorrect,
40277    # since paths with space are more likely in Windows. Give it another try with the whole
40278    # argument.
40279    path="$complete"
40280    arguments="EOL"
40281    new_path=`$CYGPATH -u "$path"`
40282    new_path=`$WHICH "$new_path" 2> /dev/null`
40283    # bat and cmd files are not always considered executable in cygwin causing which
40284    # to not find them
40285    if test "x$new_path" = x \
40286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40288      new_path=`$CYGPATH -u "$path"`
40289    fi
40290    if test "x$new_path" = x; then
40291      # It's still not found. Now this is an unrecoverable error.
40292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40293$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40294      has_space=`$ECHO "$complete" | $GREP " "`
40295      if test "x$has_space" != x; then
40296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40298      fi
40299      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40300    fi
40301  fi
40302
40303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40306  # "foo.exe" is OK but "foo" is an error.
40307  #
40308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40309  # It is also a way to make sure we got the proper file name for the real test later on.
40310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40311  if test "x$test_shortpath" = x; then
40312    # Short path failed, file does not exist as specified.
40313    # Try adding .exe or .cmd
40314    if test -f "${new_path}.exe"; then
40315      input_to_shortpath="${new_path}.exe"
40316    elif test -f "${new_path}.cmd"; then
40317      input_to_shortpath="${new_path}.cmd"
40318    else
40319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40320$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40323      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40324    fi
40325  else
40326    input_to_shortpath="$new_path"
40327  fi
40328
40329  # Call helper function which possibly converts this using DOS-style short mode.
40330  # If so, the updated path is stored in $new_path.
40331  new_path="$input_to_shortpath"
40332
40333  input_path="$input_to_shortpath"
40334  # Check if we need to convert this using DOS-style short mode. If the path
40335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40336  # take no chances and rewrite it.
40337  # Note: m4 eats our [], so we need to use [ and ] instead.
40338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40339  if test "x$has_forbidden_chars" != x; then
40340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40344      # Going to short mode and back again did indeed matter. Since short mode is
40345      # case insensitive, let's make it lowercase to improve readability.
40346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40347      # Now convert it back to Unix-style (cygpath)
40348      input_path=`$CYGPATH -u "$shortmode_path"`
40349      new_path="$input_path"
40350    fi
40351  fi
40352
40353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40354  if test "x$test_cygdrive_prefix" = x; then
40355    # As a simple fix, exclude /usr/bin since it's not a real path.
40356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40358      # a path prefixed by /cygdrive for fixpath to work.
40359      new_path="$CYGWIN_ROOT_PATH$input_path"
40360    fi
40361  fi
40362
40363  # remove trailing .exe if any
40364  new_path="${new_path/%.exe/}"
40365
40366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40367
40368  # First separate the path from the arguments. This will split at the first
40369  # space.
40370  complete="$GNM"
40371  path="${complete%% *}"
40372  tmp="$complete EOL"
40373  arguments="${tmp#* }"
40374
40375  # Input might be given as Windows format, start by converting to
40376  # unix format.
40377  new_path="$path"
40378
40379  windows_path="$new_path"
40380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40381    unix_path=`$CYGPATH -u "$windows_path"`
40382    new_path="$unix_path"
40383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40385    new_path="$unix_path"
40386  fi
40387
40388
40389  # Now try to locate executable using which
40390  new_path=`$WHICH "$new_path" 2> /dev/null`
40391
40392  if test "x$new_path" = x; then
40393    # Oops. Which didn't find the executable.
40394    # The splitting of arguments from the executable at a space might have been incorrect,
40395    # since paths with space are more likely in Windows. Give it another try with the whole
40396    # argument.
40397    path="$complete"
40398    arguments="EOL"
40399    new_path="$path"
40400
40401  windows_path="$new_path"
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403    unix_path=`$CYGPATH -u "$windows_path"`
40404    new_path="$unix_path"
40405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40407    new_path="$unix_path"
40408  fi
40409
40410
40411    new_path=`$WHICH "$new_path" 2> /dev/null`
40412    # bat and cmd files are not always considered executable in MSYS causing which
40413    # to not find them
40414    if test "x$new_path" = x \
40415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40417      new_path="$path"
40418
40419  windows_path="$new_path"
40420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40421    unix_path=`$CYGPATH -u "$windows_path"`
40422    new_path="$unix_path"
40423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40425    new_path="$unix_path"
40426  fi
40427
40428    fi
40429
40430    if test "x$new_path" = x; then
40431      # It's still not found. Now this is an unrecoverable error.
40432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40433$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40434      has_space=`$ECHO "$complete" | $GREP " "`
40435      if test "x$has_space" != x; then
40436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40438      fi
40439      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40440    fi
40441  fi
40442
40443  # Now new_path has a complete unix path to the binary
40444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40445    # Keep paths in /bin as-is, but remove trailing .exe if any
40446    new_path="${new_path/%.exe/}"
40447    # Do not save /bin paths to all_fixpath_prefixes!
40448  else
40449    # Not in mixed or Windows style, start by that.
40450    new_path=`cmd //c echo $new_path`
40451
40452  input_path="$new_path"
40453  # Check if we need to convert this using DOS-style short mode. If the path
40454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40455  # take no chances and rewrite it.
40456  # Note: m4 eats our [], so we need to use [ and ] instead.
40457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40458  if test "x$has_forbidden_chars" != x; then
40459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40461  fi
40462
40463    # Output is in $new_path
40464
40465  windows_path="$new_path"
40466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40467    unix_path=`$CYGPATH -u "$windows_path"`
40468    new_path="$unix_path"
40469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40471    new_path="$unix_path"
40472  fi
40473
40474    # remove trailing .exe if any
40475    new_path="${new_path/%.exe/}"
40476
40477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40479  fi
40480
40481    else
40482      # We're on a unix platform. Hooray! :)
40483      # First separate the path from the arguments. This will split at the first
40484      # space.
40485      complete="$GNM"
40486      path="${complete%% *}"
40487      tmp="$complete EOL"
40488      arguments="${tmp#* }"
40489
40490      # Cannot rely on the command "which" here since it doesn't always work.
40491      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40492      if test -z "$is_absolute_path"; then
40493        # Path to executable is not absolute. Find it.
40494        IFS_save="$IFS"
40495        IFS=:
40496        for p in $PATH; do
40497          if test -f "$p/$path" && test -x "$p/$path"; then
40498            new_path="$p/$path"
40499            break
40500          fi
40501        done
40502        IFS="$IFS_save"
40503      else
40504        # This is an absolute path, we can use it without further modifications.
40505        new_path="$path"
40506      fi
40507
40508      if test "x$new_path" = x; then
40509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40510$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40511        has_space=`$ECHO "$complete" | $GREP " "`
40512        if test "x$has_space" != x; then
40513          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40514$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40515        fi
40516        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40517      fi
40518    fi
40519
40520    # Now join together the path and the arguments once again
40521    if test "x$arguments" != xEOL; then
40522      new_complete="$new_path ${arguments% *}"
40523    else
40524      new_complete="$new_path"
40525    fi
40526
40527    if test "x$complete" != "x$new_complete"; then
40528      GNM="$new_complete"
40529      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40530$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40531    fi
40532  fi
40533
40534  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40535    # FIXME: we should unify this with the solaris case above.
40536
40537
40538  # Publish this variable in the help.
40539
40540
40541  if [ -z "${STRIP+x}" ]; then
40542    # The variable is not set by user, try to locate tool using the code snippet
40543    if test -n "$ac_tool_prefix"; then
40544  for ac_prog in strip
40545  do
40546    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40549$as_echo_n "checking for $ac_word... " >&6; }
40550if ${ac_cv_prog_STRIP+:} false; then :
40551  $as_echo_n "(cached) " >&6
40552else
40553  if test -n "$STRIP"; then
40554  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40555else
40556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40557for as_dir in $PATH
40558do
40559  IFS=$as_save_IFS
40560  test -z "$as_dir" && as_dir=.
40561    for ac_exec_ext in '' $ac_executable_extensions; do
40562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40563    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40565    break 2
40566  fi
40567done
40568  done
40569IFS=$as_save_IFS
40570
40571fi
40572fi
40573STRIP=$ac_cv_prog_STRIP
40574if test -n "$STRIP"; then
40575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40576$as_echo "$STRIP" >&6; }
40577else
40578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40579$as_echo "no" >&6; }
40580fi
40581
40582
40583    test -n "$STRIP" && break
40584  done
40585fi
40586if test -z "$STRIP"; then
40587  ac_ct_STRIP=$STRIP
40588  for ac_prog in strip
40589do
40590  # Extract the first word of "$ac_prog", so it can be a program name with args.
40591set dummy $ac_prog; ac_word=$2
40592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40593$as_echo_n "checking for $ac_word... " >&6; }
40594if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40595  $as_echo_n "(cached) " >&6
40596else
40597  if test -n "$ac_ct_STRIP"; then
40598  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40599else
40600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40601for as_dir in $PATH
40602do
40603  IFS=$as_save_IFS
40604  test -z "$as_dir" && as_dir=.
40605    for ac_exec_ext in '' $ac_executable_extensions; do
40606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40607    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40609    break 2
40610  fi
40611done
40612  done
40613IFS=$as_save_IFS
40614
40615fi
40616fi
40617ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40618if test -n "$ac_ct_STRIP"; then
40619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40620$as_echo "$ac_ct_STRIP" >&6; }
40621else
40622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40623$as_echo "no" >&6; }
40624fi
40625
40626
40627  test -n "$ac_ct_STRIP" && break
40628done
40629
40630  if test "x$ac_ct_STRIP" = x; then
40631    STRIP=""
40632  else
40633    case $cross_compiling:$ac_tool_warned in
40634yes:)
40635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40637ac_tool_warned=yes ;;
40638esac
40639    STRIP=$ac_ct_STRIP
40640  fi
40641fi
40642
40643  else
40644    # The variable is set, but is it from the command line or the environment?
40645
40646    # Try to remove the string !STRIP! from our list.
40647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40649      # If it failed, the variable was not from the command line. Ignore it,
40650      # but warn the user (except for BASH, which is always set by the calling BASH).
40651      if test "xSTRIP" != xBASH; then
40652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40653$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40654      fi
40655      # Try to locate tool using the code snippet
40656      if test -n "$ac_tool_prefix"; then
40657  for ac_prog in strip
40658  do
40659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40662$as_echo_n "checking for $ac_word... " >&6; }
40663if ${ac_cv_prog_STRIP+:} false; then :
40664  $as_echo_n "(cached) " >&6
40665else
40666  if test -n "$STRIP"; then
40667  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40668else
40669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40670for as_dir in $PATH
40671do
40672  IFS=$as_save_IFS
40673  test -z "$as_dir" && as_dir=.
40674    for ac_exec_ext in '' $ac_executable_extensions; do
40675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40676    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40678    break 2
40679  fi
40680done
40681  done
40682IFS=$as_save_IFS
40683
40684fi
40685fi
40686STRIP=$ac_cv_prog_STRIP
40687if test -n "$STRIP"; then
40688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40689$as_echo "$STRIP" >&6; }
40690else
40691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40692$as_echo "no" >&6; }
40693fi
40694
40695
40696    test -n "$STRIP" && break
40697  done
40698fi
40699if test -z "$STRIP"; then
40700  ac_ct_STRIP=$STRIP
40701  for ac_prog in strip
40702do
40703  # Extract the first word of "$ac_prog", so it can be a program name with args.
40704set dummy $ac_prog; ac_word=$2
40705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40706$as_echo_n "checking for $ac_word... " >&6; }
40707if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40708  $as_echo_n "(cached) " >&6
40709else
40710  if test -n "$ac_ct_STRIP"; then
40711  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40712else
40713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40714for as_dir in $PATH
40715do
40716  IFS=$as_save_IFS
40717  test -z "$as_dir" && as_dir=.
40718    for ac_exec_ext in '' $ac_executable_extensions; do
40719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40720    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40722    break 2
40723  fi
40724done
40725  done
40726IFS=$as_save_IFS
40727
40728fi
40729fi
40730ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40731if test -n "$ac_ct_STRIP"; then
40732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40733$as_echo "$ac_ct_STRIP" >&6; }
40734else
40735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40736$as_echo "no" >&6; }
40737fi
40738
40739
40740  test -n "$ac_ct_STRIP" && break
40741done
40742
40743  if test "x$ac_ct_STRIP" = x; then
40744    STRIP=""
40745  else
40746    case $cross_compiling:$ac_tool_warned in
40747yes:)
40748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40750ac_tool_warned=yes ;;
40751esac
40752    STRIP=$ac_ct_STRIP
40753  fi
40754fi
40755
40756    else
40757      # If it succeeded, then it was overridden by the user. We will use it
40758      # for the tool.
40759
40760      # First remove it from the list of overridden variables, so we can test
40761      # for unknown variables in the end.
40762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40763
40764      # Check if we try to supply an empty value
40765      if test "x$STRIP" = x; then
40766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40767$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40769$as_echo_n "checking for STRIP... " >&6; }
40770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40771$as_echo "disabled" >&6; }
40772      else
40773        # Check if the provided tool contains a complete path.
40774        tool_specified="$STRIP"
40775        tool_basename="${tool_specified##*/}"
40776        if test "x$tool_basename" = "x$tool_specified"; then
40777          # A command without a complete path is provided, search $PATH.
40778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40779$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40780          # Extract the first word of "$tool_basename", so it can be a program name with args.
40781set dummy $tool_basename; ac_word=$2
40782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40783$as_echo_n "checking for $ac_word... " >&6; }
40784if ${ac_cv_path_STRIP+:} false; then :
40785  $as_echo_n "(cached) " >&6
40786else
40787  case $STRIP in
40788  [\\/]* | ?:[\\/]*)
40789  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40790  ;;
40791  *)
40792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40793for as_dir in $PATH
40794do
40795  IFS=$as_save_IFS
40796  test -z "$as_dir" && as_dir=.
40797    for ac_exec_ext in '' $ac_executable_extensions; do
40798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40799    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40801    break 2
40802  fi
40803done
40804  done
40805IFS=$as_save_IFS
40806
40807  ;;
40808esac
40809fi
40810STRIP=$ac_cv_path_STRIP
40811if test -n "$STRIP"; then
40812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40813$as_echo "$STRIP" >&6; }
40814else
40815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40816$as_echo "no" >&6; }
40817fi
40818
40819
40820          if test "x$STRIP" = x; then
40821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40822          fi
40823        else
40824          # Otherwise we believe it is a complete path. Use it as it is.
40825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40826$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40828$as_echo_n "checking for STRIP... " >&6; }
40829          if test ! -x "$tool_specified"; then
40830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40831$as_echo "not found" >&6; }
40832            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40833          fi
40834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40835$as_echo "$tool_specified" >&6; }
40836        fi
40837      fi
40838    fi
40839
40840  fi
40841
40842
40843
40844  # Only process if variable expands to non-empty
40845
40846  if test "x$STRIP" != x; then
40847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40848
40849  # First separate the path from the arguments. This will split at the first
40850  # space.
40851  complete="$STRIP"
40852  path="${complete%% *}"
40853  tmp="$complete EOL"
40854  arguments="${tmp#* }"
40855
40856  # Input might be given as Windows format, start by converting to
40857  # unix format.
40858  new_path=`$CYGPATH -u "$path"`
40859
40860  # Now try to locate executable using which
40861  new_path=`$WHICH "$new_path" 2> /dev/null`
40862  # bat and cmd files are not always considered executable in cygwin causing which
40863  # to not find them
40864  if test "x$new_path" = x \
40865      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40866      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40867    new_path=`$CYGPATH -u "$path"`
40868  fi
40869  if test "x$new_path" = x; then
40870    # Oops. Which didn't find the executable.
40871    # The splitting of arguments from the executable at a space might have been incorrect,
40872    # since paths with space are more likely in Windows. Give it another try with the whole
40873    # argument.
40874    path="$complete"
40875    arguments="EOL"
40876    new_path=`$CYGPATH -u "$path"`
40877    new_path=`$WHICH "$new_path" 2> /dev/null`
40878    # bat and cmd files are not always considered executable in cygwin causing which
40879    # to not find them
40880    if test "x$new_path" = x \
40881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40883      new_path=`$CYGPATH -u "$path"`
40884    fi
40885    if test "x$new_path" = x; then
40886      # It's still not found. Now this is an unrecoverable error.
40887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40888$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40889      has_space=`$ECHO "$complete" | $GREP " "`
40890      if test "x$has_space" != x; then
40891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40893      fi
40894      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40895    fi
40896  fi
40897
40898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40901  # "foo.exe" is OK but "foo" is an error.
40902  #
40903  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40904  # It is also a way to make sure we got the proper file name for the real test later on.
40905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40906  if test "x$test_shortpath" = x; then
40907    # Short path failed, file does not exist as specified.
40908    # Try adding .exe or .cmd
40909    if test -f "${new_path}.exe"; then
40910      input_to_shortpath="${new_path}.exe"
40911    elif test -f "${new_path}.cmd"; then
40912      input_to_shortpath="${new_path}.cmd"
40913    else
40914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40915$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40916      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40917$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40918      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40919    fi
40920  else
40921    input_to_shortpath="$new_path"
40922  fi
40923
40924  # Call helper function which possibly converts this using DOS-style short mode.
40925  # If so, the updated path is stored in $new_path.
40926  new_path="$input_to_shortpath"
40927
40928  input_path="$input_to_shortpath"
40929  # Check if we need to convert this using DOS-style short mode. If the path
40930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40931  # take no chances and rewrite it.
40932  # Note: m4 eats our [], so we need to use [ and ] instead.
40933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40934  if test "x$has_forbidden_chars" != x; then
40935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40936    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40937    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40938    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40939      # Going to short mode and back again did indeed matter. Since short mode is
40940      # case insensitive, let's make it lowercase to improve readability.
40941      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40942      # Now convert it back to Unix-style (cygpath)
40943      input_path=`$CYGPATH -u "$shortmode_path"`
40944      new_path="$input_path"
40945    fi
40946  fi
40947
40948  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40949  if test "x$test_cygdrive_prefix" = x; then
40950    # As a simple fix, exclude /usr/bin since it's not a real path.
40951    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40952      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40953      # a path prefixed by /cygdrive for fixpath to work.
40954      new_path="$CYGWIN_ROOT_PATH$input_path"
40955    fi
40956  fi
40957
40958  # remove trailing .exe if any
40959  new_path="${new_path/%.exe/}"
40960
40961    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40962
40963  # First separate the path from the arguments. This will split at the first
40964  # space.
40965  complete="$STRIP"
40966  path="${complete%% *}"
40967  tmp="$complete EOL"
40968  arguments="${tmp#* }"
40969
40970  # Input might be given as Windows format, start by converting to
40971  # unix format.
40972  new_path="$path"
40973
40974  windows_path="$new_path"
40975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40976    unix_path=`$CYGPATH -u "$windows_path"`
40977    new_path="$unix_path"
40978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40980    new_path="$unix_path"
40981  fi
40982
40983
40984  # Now try to locate executable using which
40985  new_path=`$WHICH "$new_path" 2> /dev/null`
40986
40987  if test "x$new_path" = x; then
40988    # Oops. Which didn't find the executable.
40989    # The splitting of arguments from the executable at a space might have been incorrect,
40990    # since paths with space are more likely in Windows. Give it another try with the whole
40991    # argument.
40992    path="$complete"
40993    arguments="EOL"
40994    new_path="$path"
40995
40996  windows_path="$new_path"
40997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40998    unix_path=`$CYGPATH -u "$windows_path"`
40999    new_path="$unix_path"
41000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41002    new_path="$unix_path"
41003  fi
41004
41005
41006    new_path=`$WHICH "$new_path" 2> /dev/null`
41007    # bat and cmd files are not always considered executable in MSYS causing which
41008    # to not find them
41009    if test "x$new_path" = x \
41010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41012      new_path="$path"
41013
41014  windows_path="$new_path"
41015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41016    unix_path=`$CYGPATH -u "$windows_path"`
41017    new_path="$unix_path"
41018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41020    new_path="$unix_path"
41021  fi
41022
41023    fi
41024
41025    if test "x$new_path" = x; then
41026      # It's still not found. Now this is an unrecoverable error.
41027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41028$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41029      has_space=`$ECHO "$complete" | $GREP " "`
41030      if test "x$has_space" != x; then
41031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41033      fi
41034      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41035    fi
41036  fi
41037
41038  # Now new_path has a complete unix path to the binary
41039  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41040    # Keep paths in /bin as-is, but remove trailing .exe if any
41041    new_path="${new_path/%.exe/}"
41042    # Do not save /bin paths to all_fixpath_prefixes!
41043  else
41044    # Not in mixed or Windows style, start by that.
41045    new_path=`cmd //c echo $new_path`
41046
41047  input_path="$new_path"
41048  # Check if we need to convert this using DOS-style short mode. If the path
41049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41050  # take no chances and rewrite it.
41051  # Note: m4 eats our [], so we need to use [ and ] instead.
41052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41053  if test "x$has_forbidden_chars" != x; then
41054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41056  fi
41057
41058    # Output is in $new_path
41059
41060  windows_path="$new_path"
41061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41062    unix_path=`$CYGPATH -u "$windows_path"`
41063    new_path="$unix_path"
41064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41066    new_path="$unix_path"
41067  fi
41068
41069    # remove trailing .exe if any
41070    new_path="${new_path/%.exe/}"
41071
41072    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41073    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41074  fi
41075
41076    else
41077      # We're on a unix platform. Hooray! :)
41078      # First separate the path from the arguments. This will split at the first
41079      # space.
41080      complete="$STRIP"
41081      path="${complete%% *}"
41082      tmp="$complete EOL"
41083      arguments="${tmp#* }"
41084
41085      # Cannot rely on the command "which" here since it doesn't always work.
41086      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41087      if test -z "$is_absolute_path"; then
41088        # Path to executable is not absolute. Find it.
41089        IFS_save="$IFS"
41090        IFS=:
41091        for p in $PATH; do
41092          if test -f "$p/$path" && test -x "$p/$path"; then
41093            new_path="$p/$path"
41094            break
41095          fi
41096        done
41097        IFS="$IFS_save"
41098      else
41099        # This is an absolute path, we can use it without further modifications.
41100        new_path="$path"
41101      fi
41102
41103      if test "x$new_path" = x; then
41104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41105$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41106        has_space=`$ECHO "$complete" | $GREP " "`
41107        if test "x$has_space" != x; then
41108          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41109$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41110        fi
41111        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41112      fi
41113    fi
41114
41115    # Now join together the path and the arguments once again
41116    if test "x$arguments" != xEOL; then
41117      new_complete="$new_path ${arguments% *}"
41118    else
41119      new_complete="$new_path"
41120    fi
41121
41122    if test "x$complete" != "x$new_complete"; then
41123      STRIP="$new_complete"
41124      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41125$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41126    fi
41127  fi
41128
41129    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41130
41131
41132  # Publish this variable in the help.
41133
41134
41135  if [ -z "${NM+x}" ]; then
41136    # The variable is not set by user, try to locate tool using the code snippet
41137    if test -n "$ac_tool_prefix"; then
41138  for ac_prog in nm gcc-nm
41139  do
41140    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41141set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41143$as_echo_n "checking for $ac_word... " >&6; }
41144if ${ac_cv_prog_NM+:} false; then :
41145  $as_echo_n "(cached) " >&6
41146else
41147  if test -n "$NM"; then
41148  ac_cv_prog_NM="$NM" # Let the user override the test.
41149else
41150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41151for as_dir in $PATH
41152do
41153  IFS=$as_save_IFS
41154  test -z "$as_dir" && as_dir=.
41155    for ac_exec_ext in '' $ac_executable_extensions; do
41156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41157    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41159    break 2
41160  fi
41161done
41162  done
41163IFS=$as_save_IFS
41164
41165fi
41166fi
41167NM=$ac_cv_prog_NM
41168if test -n "$NM"; then
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41170$as_echo "$NM" >&6; }
41171else
41172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41173$as_echo "no" >&6; }
41174fi
41175
41176
41177    test -n "$NM" && break
41178  done
41179fi
41180if test -z "$NM"; then
41181  ac_ct_NM=$NM
41182  for ac_prog in nm gcc-nm
41183do
41184  # Extract the first word of "$ac_prog", so it can be a program name with args.
41185set dummy $ac_prog; ac_word=$2
41186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41187$as_echo_n "checking for $ac_word... " >&6; }
41188if ${ac_cv_prog_ac_ct_NM+:} false; then :
41189  $as_echo_n "(cached) " >&6
41190else
41191  if test -n "$ac_ct_NM"; then
41192  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41193else
41194as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41195for as_dir in $PATH
41196do
41197  IFS=$as_save_IFS
41198  test -z "$as_dir" && as_dir=.
41199    for ac_exec_ext in '' $ac_executable_extensions; do
41200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41201    ac_cv_prog_ac_ct_NM="$ac_prog"
41202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41203    break 2
41204  fi
41205done
41206  done
41207IFS=$as_save_IFS
41208
41209fi
41210fi
41211ac_ct_NM=$ac_cv_prog_ac_ct_NM
41212if test -n "$ac_ct_NM"; then
41213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41214$as_echo "$ac_ct_NM" >&6; }
41215else
41216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41217$as_echo "no" >&6; }
41218fi
41219
41220
41221  test -n "$ac_ct_NM" && break
41222done
41223
41224  if test "x$ac_ct_NM" = x; then
41225    NM=""
41226  else
41227    case $cross_compiling:$ac_tool_warned in
41228yes:)
41229{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41230$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41231ac_tool_warned=yes ;;
41232esac
41233    NM=$ac_ct_NM
41234  fi
41235fi
41236
41237  else
41238    # The variable is set, but is it from the command line or the environment?
41239
41240    # Try to remove the string !NM! from our list.
41241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41243      # If it failed, the variable was not from the command line. Ignore it,
41244      # but warn the user (except for BASH, which is always set by the calling BASH).
41245      if test "xNM" != xBASH; then
41246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41247$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41248      fi
41249      # Try to locate tool using the code snippet
41250      if test -n "$ac_tool_prefix"; then
41251  for ac_prog in nm gcc-nm
41252  do
41253    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41254set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41256$as_echo_n "checking for $ac_word... " >&6; }
41257if ${ac_cv_prog_NM+:} false; then :
41258  $as_echo_n "(cached) " >&6
41259else
41260  if test -n "$NM"; then
41261  ac_cv_prog_NM="$NM" # Let the user override the test.
41262else
41263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41264for as_dir in $PATH
41265do
41266  IFS=$as_save_IFS
41267  test -z "$as_dir" && as_dir=.
41268    for ac_exec_ext in '' $ac_executable_extensions; do
41269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41270    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41272    break 2
41273  fi
41274done
41275  done
41276IFS=$as_save_IFS
41277
41278fi
41279fi
41280NM=$ac_cv_prog_NM
41281if test -n "$NM"; then
41282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41283$as_echo "$NM" >&6; }
41284else
41285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41286$as_echo "no" >&6; }
41287fi
41288
41289
41290    test -n "$NM" && break
41291  done
41292fi
41293if test -z "$NM"; then
41294  ac_ct_NM=$NM
41295  for ac_prog in nm gcc-nm
41296do
41297  # Extract the first word of "$ac_prog", so it can be a program name with args.
41298set dummy $ac_prog; ac_word=$2
41299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41300$as_echo_n "checking for $ac_word... " >&6; }
41301if ${ac_cv_prog_ac_ct_NM+:} false; then :
41302  $as_echo_n "(cached) " >&6
41303else
41304  if test -n "$ac_ct_NM"; then
41305  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41306else
41307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41308for as_dir in $PATH
41309do
41310  IFS=$as_save_IFS
41311  test -z "$as_dir" && as_dir=.
41312    for ac_exec_ext in '' $ac_executable_extensions; do
41313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41314    ac_cv_prog_ac_ct_NM="$ac_prog"
41315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41316    break 2
41317  fi
41318done
41319  done
41320IFS=$as_save_IFS
41321
41322fi
41323fi
41324ac_ct_NM=$ac_cv_prog_ac_ct_NM
41325if test -n "$ac_ct_NM"; then
41326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41327$as_echo "$ac_ct_NM" >&6; }
41328else
41329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41330$as_echo "no" >&6; }
41331fi
41332
41333
41334  test -n "$ac_ct_NM" && break
41335done
41336
41337  if test "x$ac_ct_NM" = x; then
41338    NM=""
41339  else
41340    case $cross_compiling:$ac_tool_warned in
41341yes:)
41342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41344ac_tool_warned=yes ;;
41345esac
41346    NM=$ac_ct_NM
41347  fi
41348fi
41349
41350    else
41351      # If it succeeded, then it was overridden by the user. We will use it
41352      # for the tool.
41353
41354      # First remove it from the list of overridden variables, so we can test
41355      # for unknown variables in the end.
41356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41357
41358      # Check if we try to supply an empty value
41359      if test "x$NM" = x; then
41360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41361$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41363$as_echo_n "checking for NM... " >&6; }
41364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41365$as_echo "disabled" >&6; }
41366      else
41367        # Check if the provided tool contains a complete path.
41368        tool_specified="$NM"
41369        tool_basename="${tool_specified##*/}"
41370        if test "x$tool_basename" = "x$tool_specified"; then
41371          # A command without a complete path is provided, search $PATH.
41372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41373$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41374          # Extract the first word of "$tool_basename", so it can be a program name with args.
41375set dummy $tool_basename; ac_word=$2
41376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41377$as_echo_n "checking for $ac_word... " >&6; }
41378if ${ac_cv_path_NM+:} false; then :
41379  $as_echo_n "(cached) " >&6
41380else
41381  case $NM in
41382  [\\/]* | ?:[\\/]*)
41383  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41384  ;;
41385  *)
41386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41387for as_dir in $PATH
41388do
41389  IFS=$as_save_IFS
41390  test -z "$as_dir" && as_dir=.
41391    for ac_exec_ext in '' $ac_executable_extensions; do
41392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41393    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41395    break 2
41396  fi
41397done
41398  done
41399IFS=$as_save_IFS
41400
41401  ;;
41402esac
41403fi
41404NM=$ac_cv_path_NM
41405if test -n "$NM"; then
41406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41407$as_echo "$NM" >&6; }
41408else
41409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41410$as_echo "no" >&6; }
41411fi
41412
41413
41414          if test "x$NM" = x; then
41415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41416          fi
41417        else
41418          # Otherwise we believe it is a complete path. Use it as it is.
41419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41420$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41422$as_echo_n "checking for NM... " >&6; }
41423          if test ! -x "$tool_specified"; then
41424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41425$as_echo "not found" >&6; }
41426            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41427          fi
41428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41429$as_echo "$tool_specified" >&6; }
41430        fi
41431      fi
41432    fi
41433
41434  fi
41435
41436
41437    else
41438
41439
41440  # Publish this variable in the help.
41441
41442
41443  if [ -z "${NM+x}" ]; then
41444    # The variable is not set by user, try to locate tool using the code snippet
41445    if test -n "$ac_tool_prefix"; then
41446  for ac_prog in nm
41447  do
41448    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41449set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41451$as_echo_n "checking for $ac_word... " >&6; }
41452if ${ac_cv_prog_NM+:} false; then :
41453  $as_echo_n "(cached) " >&6
41454else
41455  if test -n "$NM"; then
41456  ac_cv_prog_NM="$NM" # Let the user override the test.
41457else
41458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41459for as_dir in $PATH
41460do
41461  IFS=$as_save_IFS
41462  test -z "$as_dir" && as_dir=.
41463    for ac_exec_ext in '' $ac_executable_extensions; do
41464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41465    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41467    break 2
41468  fi
41469done
41470  done
41471IFS=$as_save_IFS
41472
41473fi
41474fi
41475NM=$ac_cv_prog_NM
41476if test -n "$NM"; then
41477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41478$as_echo "$NM" >&6; }
41479else
41480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41481$as_echo "no" >&6; }
41482fi
41483
41484
41485    test -n "$NM" && break
41486  done
41487fi
41488if test -z "$NM"; then
41489  ac_ct_NM=$NM
41490  for ac_prog in nm
41491do
41492  # Extract the first word of "$ac_prog", so it can be a program name with args.
41493set dummy $ac_prog; ac_word=$2
41494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41495$as_echo_n "checking for $ac_word... " >&6; }
41496if ${ac_cv_prog_ac_ct_NM+:} false; then :
41497  $as_echo_n "(cached) " >&6
41498else
41499  if test -n "$ac_ct_NM"; then
41500  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41501else
41502as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41503for as_dir in $PATH
41504do
41505  IFS=$as_save_IFS
41506  test -z "$as_dir" && as_dir=.
41507    for ac_exec_ext in '' $ac_executable_extensions; do
41508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41509    ac_cv_prog_ac_ct_NM="$ac_prog"
41510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41511    break 2
41512  fi
41513done
41514  done
41515IFS=$as_save_IFS
41516
41517fi
41518fi
41519ac_ct_NM=$ac_cv_prog_ac_ct_NM
41520if test -n "$ac_ct_NM"; then
41521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41522$as_echo "$ac_ct_NM" >&6; }
41523else
41524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41525$as_echo "no" >&6; }
41526fi
41527
41528
41529  test -n "$ac_ct_NM" && break
41530done
41531
41532  if test "x$ac_ct_NM" = x; then
41533    NM=""
41534  else
41535    case $cross_compiling:$ac_tool_warned in
41536yes:)
41537{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41538$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41539ac_tool_warned=yes ;;
41540esac
41541    NM=$ac_ct_NM
41542  fi
41543fi
41544
41545  else
41546    # The variable is set, but is it from the command line or the environment?
41547
41548    # Try to remove the string !NM! from our list.
41549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41551      # If it failed, the variable was not from the command line. Ignore it,
41552      # but warn the user (except for BASH, which is always set by the calling BASH).
41553      if test "xNM" != xBASH; then
41554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41555$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41556      fi
41557      # Try to locate tool using the code snippet
41558      if test -n "$ac_tool_prefix"; then
41559  for ac_prog in nm
41560  do
41561    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41562set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41564$as_echo_n "checking for $ac_word... " >&6; }
41565if ${ac_cv_prog_NM+:} false; then :
41566  $as_echo_n "(cached) " >&6
41567else
41568  if test -n "$NM"; then
41569  ac_cv_prog_NM="$NM" # Let the user override the test.
41570else
41571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41572for as_dir in $PATH
41573do
41574  IFS=$as_save_IFS
41575  test -z "$as_dir" && as_dir=.
41576    for ac_exec_ext in '' $ac_executable_extensions; do
41577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41578    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41580    break 2
41581  fi
41582done
41583  done
41584IFS=$as_save_IFS
41585
41586fi
41587fi
41588NM=$ac_cv_prog_NM
41589if test -n "$NM"; then
41590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41591$as_echo "$NM" >&6; }
41592else
41593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41594$as_echo "no" >&6; }
41595fi
41596
41597
41598    test -n "$NM" && break
41599  done
41600fi
41601if test -z "$NM"; then
41602  ac_ct_NM=$NM
41603  for ac_prog in nm
41604do
41605  # Extract the first word of "$ac_prog", so it can be a program name with args.
41606set dummy $ac_prog; ac_word=$2
41607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41608$as_echo_n "checking for $ac_word... " >&6; }
41609if ${ac_cv_prog_ac_ct_NM+:} false; then :
41610  $as_echo_n "(cached) " >&6
41611else
41612  if test -n "$ac_ct_NM"; then
41613  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41614else
41615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41616for as_dir in $PATH
41617do
41618  IFS=$as_save_IFS
41619  test -z "$as_dir" && as_dir=.
41620    for ac_exec_ext in '' $ac_executable_extensions; do
41621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41622    ac_cv_prog_ac_ct_NM="$ac_prog"
41623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41624    break 2
41625  fi
41626done
41627  done
41628IFS=$as_save_IFS
41629
41630fi
41631fi
41632ac_ct_NM=$ac_cv_prog_ac_ct_NM
41633if test -n "$ac_ct_NM"; then
41634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41635$as_echo "$ac_ct_NM" >&6; }
41636else
41637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41638$as_echo "no" >&6; }
41639fi
41640
41641
41642  test -n "$ac_ct_NM" && break
41643done
41644
41645  if test "x$ac_ct_NM" = x; then
41646    NM=""
41647  else
41648    case $cross_compiling:$ac_tool_warned in
41649yes:)
41650{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41651$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41652ac_tool_warned=yes ;;
41653esac
41654    NM=$ac_ct_NM
41655  fi
41656fi
41657
41658    else
41659      # If it succeeded, then it was overridden by the user. We will use it
41660      # for the tool.
41661
41662      # First remove it from the list of overridden variables, so we can test
41663      # for unknown variables in the end.
41664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41665
41666      # Check if we try to supply an empty value
41667      if test "x$NM" = x; then
41668        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41669$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41670        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41671$as_echo_n "checking for NM... " >&6; }
41672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41673$as_echo "disabled" >&6; }
41674      else
41675        # Check if the provided tool contains a complete path.
41676        tool_specified="$NM"
41677        tool_basename="${tool_specified##*/}"
41678        if test "x$tool_basename" = "x$tool_specified"; then
41679          # A command without a complete path is provided, search $PATH.
41680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41681$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41682          # Extract the first word of "$tool_basename", so it can be a program name with args.
41683set dummy $tool_basename; ac_word=$2
41684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41685$as_echo_n "checking for $ac_word... " >&6; }
41686if ${ac_cv_path_NM+:} false; then :
41687  $as_echo_n "(cached) " >&6
41688else
41689  case $NM in
41690  [\\/]* | ?:[\\/]*)
41691  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41692  ;;
41693  *)
41694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41695for as_dir in $PATH
41696do
41697  IFS=$as_save_IFS
41698  test -z "$as_dir" && as_dir=.
41699    for ac_exec_ext in '' $ac_executable_extensions; do
41700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41701    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41703    break 2
41704  fi
41705done
41706  done
41707IFS=$as_save_IFS
41708
41709  ;;
41710esac
41711fi
41712NM=$ac_cv_path_NM
41713if test -n "$NM"; then
41714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41715$as_echo "$NM" >&6; }
41716else
41717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41718$as_echo "no" >&6; }
41719fi
41720
41721
41722          if test "x$NM" = x; then
41723            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41724          fi
41725        else
41726          # Otherwise we believe it is a complete path. Use it as it is.
41727          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41728$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41729          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41730$as_echo_n "checking for NM... " >&6; }
41731          if test ! -x "$tool_specified"; then
41732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41733$as_echo "not found" >&6; }
41734            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41735          fi
41736          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41737$as_echo "$tool_specified" >&6; }
41738        fi
41739      fi
41740    fi
41741
41742  fi
41743
41744
41745    fi
41746
41747  # Only process if variable expands to non-empty
41748
41749  if test "x$NM" != x; then
41750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41751
41752  # First separate the path from the arguments. This will split at the first
41753  # space.
41754  complete="$NM"
41755  path="${complete%% *}"
41756  tmp="$complete EOL"
41757  arguments="${tmp#* }"
41758
41759  # Input might be given as Windows format, start by converting to
41760  # unix format.
41761  new_path=`$CYGPATH -u "$path"`
41762
41763  # Now try to locate executable using which
41764  new_path=`$WHICH "$new_path" 2> /dev/null`
41765  # bat and cmd files are not always considered executable in cygwin causing which
41766  # to not find them
41767  if test "x$new_path" = x \
41768      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41769      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41770    new_path=`$CYGPATH -u "$path"`
41771  fi
41772  if test "x$new_path" = x; then
41773    # Oops. Which didn't find the executable.
41774    # The splitting of arguments from the executable at a space might have been incorrect,
41775    # since paths with space are more likely in Windows. Give it another try with the whole
41776    # argument.
41777    path="$complete"
41778    arguments="EOL"
41779    new_path=`$CYGPATH -u "$path"`
41780    new_path=`$WHICH "$new_path" 2> /dev/null`
41781    # bat and cmd files are not always considered executable in cygwin causing which
41782    # to not find them
41783    if test "x$new_path" = x \
41784        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41785        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41786      new_path=`$CYGPATH -u "$path"`
41787    fi
41788    if test "x$new_path" = x; then
41789      # It's still not found. Now this is an unrecoverable error.
41790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41791$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41792      has_space=`$ECHO "$complete" | $GREP " "`
41793      if test "x$has_space" != x; then
41794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41796      fi
41797      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41798    fi
41799  fi
41800
41801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41804  # "foo.exe" is OK but "foo" is an error.
41805  #
41806  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41807  # It is also a way to make sure we got the proper file name for the real test later on.
41808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41809  if test "x$test_shortpath" = x; then
41810    # Short path failed, file does not exist as specified.
41811    # Try adding .exe or .cmd
41812    if test -f "${new_path}.exe"; then
41813      input_to_shortpath="${new_path}.exe"
41814    elif test -f "${new_path}.cmd"; then
41815      input_to_shortpath="${new_path}.cmd"
41816    else
41817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41818$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41821      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41822    fi
41823  else
41824    input_to_shortpath="$new_path"
41825  fi
41826
41827  # Call helper function which possibly converts this using DOS-style short mode.
41828  # If so, the updated path is stored in $new_path.
41829  new_path="$input_to_shortpath"
41830
41831  input_path="$input_to_shortpath"
41832  # Check if we need to convert this using DOS-style short mode. If the path
41833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41834  # take no chances and rewrite it.
41835  # Note: m4 eats our [], so we need to use [ and ] instead.
41836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41837  if test "x$has_forbidden_chars" != x; then
41838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41842      # Going to short mode and back again did indeed matter. Since short mode is
41843      # case insensitive, let's make it lowercase to improve readability.
41844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41845      # Now convert it back to Unix-style (cygpath)
41846      input_path=`$CYGPATH -u "$shortmode_path"`
41847      new_path="$input_path"
41848    fi
41849  fi
41850
41851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41852  if test "x$test_cygdrive_prefix" = x; then
41853    # As a simple fix, exclude /usr/bin since it's not a real path.
41854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41856      # a path prefixed by /cygdrive for fixpath to work.
41857      new_path="$CYGWIN_ROOT_PATH$input_path"
41858    fi
41859  fi
41860
41861  # remove trailing .exe if any
41862  new_path="${new_path/%.exe/}"
41863
41864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41865
41866  # First separate the path from the arguments. This will split at the first
41867  # space.
41868  complete="$NM"
41869  path="${complete%% *}"
41870  tmp="$complete EOL"
41871  arguments="${tmp#* }"
41872
41873  # Input might be given as Windows format, start by converting to
41874  # unix format.
41875  new_path="$path"
41876
41877  windows_path="$new_path"
41878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41879    unix_path=`$CYGPATH -u "$windows_path"`
41880    new_path="$unix_path"
41881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41883    new_path="$unix_path"
41884  fi
41885
41886
41887  # Now try to locate executable using which
41888  new_path=`$WHICH "$new_path" 2> /dev/null`
41889
41890  if test "x$new_path" = x; then
41891    # Oops. Which didn't find the executable.
41892    # The splitting of arguments from the executable at a space might have been incorrect,
41893    # since paths with space are more likely in Windows. Give it another try with the whole
41894    # argument.
41895    path="$complete"
41896    arguments="EOL"
41897    new_path="$path"
41898
41899  windows_path="$new_path"
41900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41901    unix_path=`$CYGPATH -u "$windows_path"`
41902    new_path="$unix_path"
41903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41905    new_path="$unix_path"
41906  fi
41907
41908
41909    new_path=`$WHICH "$new_path" 2> /dev/null`
41910    # bat and cmd files are not always considered executable in MSYS causing which
41911    # to not find them
41912    if test "x$new_path" = x \
41913        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41914        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41915      new_path="$path"
41916
41917  windows_path="$new_path"
41918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41919    unix_path=`$CYGPATH -u "$windows_path"`
41920    new_path="$unix_path"
41921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41923    new_path="$unix_path"
41924  fi
41925
41926    fi
41927
41928    if test "x$new_path" = x; then
41929      # It's still not found. Now this is an unrecoverable error.
41930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41931$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41932      has_space=`$ECHO "$complete" | $GREP " "`
41933      if test "x$has_space" != x; then
41934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41936      fi
41937      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41938    fi
41939  fi
41940
41941  # Now new_path has a complete unix path to the binary
41942  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41943    # Keep paths in /bin as-is, but remove trailing .exe if any
41944    new_path="${new_path/%.exe/}"
41945    # Do not save /bin paths to all_fixpath_prefixes!
41946  else
41947    # Not in mixed or Windows style, start by that.
41948    new_path=`cmd //c echo $new_path`
41949
41950  input_path="$new_path"
41951  # Check if we need to convert this using DOS-style short mode. If the path
41952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41953  # take no chances and rewrite it.
41954  # Note: m4 eats our [], so we need to use [ and ] instead.
41955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41956  if test "x$has_forbidden_chars" != x; then
41957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41959  fi
41960
41961    # Output is in $new_path
41962
41963  windows_path="$new_path"
41964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41965    unix_path=`$CYGPATH -u "$windows_path"`
41966    new_path="$unix_path"
41967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41969    new_path="$unix_path"
41970  fi
41971
41972    # remove trailing .exe if any
41973    new_path="${new_path/%.exe/}"
41974
41975    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41976    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41977  fi
41978
41979    else
41980      # We're on a unix platform. Hooray! :)
41981      # First separate the path from the arguments. This will split at the first
41982      # space.
41983      complete="$NM"
41984      path="${complete%% *}"
41985      tmp="$complete EOL"
41986      arguments="${tmp#* }"
41987
41988      # Cannot rely on the command "which" here since it doesn't always work.
41989      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41990      if test -z "$is_absolute_path"; then
41991        # Path to executable is not absolute. Find it.
41992        IFS_save="$IFS"
41993        IFS=:
41994        for p in $PATH; do
41995          if test -f "$p/$path" && test -x "$p/$path"; then
41996            new_path="$p/$path"
41997            break
41998          fi
41999        done
42000        IFS="$IFS_save"
42001      else
42002        # This is an absolute path, we can use it without further modifications.
42003        new_path="$path"
42004      fi
42005
42006      if test "x$new_path" = x; then
42007        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42008$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42009        has_space=`$ECHO "$complete" | $GREP " "`
42010        if test "x$has_space" != x; then
42011          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42012$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42013        fi
42014        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42015      fi
42016    fi
42017
42018    # Now join together the path and the arguments once again
42019    if test "x$arguments" != xEOL; then
42020      new_complete="$new_path ${arguments% *}"
42021    else
42022      new_complete="$new_path"
42023    fi
42024
42025    if test "x$complete" != "x$new_complete"; then
42026      NM="$new_complete"
42027      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42028$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42029    fi
42030  fi
42031
42032    GNM="$NM"
42033
42034  fi
42035
42036  # objcopy is used for moving debug symbols to separate files when
42037  # full debug symbols are enabled.
42038  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42039
42040
42041  # Publish this variable in the help.
42042
42043
42044  if [ -z "${OBJCOPY+x}" ]; then
42045    # The variable is not set by user, try to locate tool using the code snippet
42046    if test -n "$ac_tool_prefix"; then
42047  for ac_prog in gobjcopy objcopy
42048  do
42049    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42050set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42052$as_echo_n "checking for $ac_word... " >&6; }
42053if ${ac_cv_prog_OBJCOPY+:} false; then :
42054  $as_echo_n "(cached) " >&6
42055else
42056  if test -n "$OBJCOPY"; then
42057  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42058else
42059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42060for as_dir in $PATH
42061do
42062  IFS=$as_save_IFS
42063  test -z "$as_dir" && as_dir=.
42064    for ac_exec_ext in '' $ac_executable_extensions; do
42065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42066    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42068    break 2
42069  fi
42070done
42071  done
42072IFS=$as_save_IFS
42073
42074fi
42075fi
42076OBJCOPY=$ac_cv_prog_OBJCOPY
42077if test -n "$OBJCOPY"; then
42078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42079$as_echo "$OBJCOPY" >&6; }
42080else
42081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42082$as_echo "no" >&6; }
42083fi
42084
42085
42086    test -n "$OBJCOPY" && break
42087  done
42088fi
42089if test -z "$OBJCOPY"; then
42090  ac_ct_OBJCOPY=$OBJCOPY
42091  for ac_prog in gobjcopy objcopy
42092do
42093  # Extract the first word of "$ac_prog", so it can be a program name with args.
42094set dummy $ac_prog; ac_word=$2
42095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42096$as_echo_n "checking for $ac_word... " >&6; }
42097if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42098  $as_echo_n "(cached) " >&6
42099else
42100  if test -n "$ac_ct_OBJCOPY"; then
42101  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42102else
42103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42104for as_dir in $PATH
42105do
42106  IFS=$as_save_IFS
42107  test -z "$as_dir" && as_dir=.
42108    for ac_exec_ext in '' $ac_executable_extensions; do
42109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42110    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42112    break 2
42113  fi
42114done
42115  done
42116IFS=$as_save_IFS
42117
42118fi
42119fi
42120ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42121if test -n "$ac_ct_OBJCOPY"; then
42122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42123$as_echo "$ac_ct_OBJCOPY" >&6; }
42124else
42125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42126$as_echo "no" >&6; }
42127fi
42128
42129
42130  test -n "$ac_ct_OBJCOPY" && break
42131done
42132
42133  if test "x$ac_ct_OBJCOPY" = x; then
42134    OBJCOPY=""
42135  else
42136    case $cross_compiling:$ac_tool_warned in
42137yes:)
42138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42140ac_tool_warned=yes ;;
42141esac
42142    OBJCOPY=$ac_ct_OBJCOPY
42143  fi
42144fi
42145
42146  else
42147    # The variable is set, but is it from the command line or the environment?
42148
42149    # Try to remove the string !OBJCOPY! from our list.
42150    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42151    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42152      # If it failed, the variable was not from the command line. Ignore it,
42153      # but warn the user (except for BASH, which is always set by the calling BASH).
42154      if test "xOBJCOPY" != xBASH; then
42155        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42156$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42157      fi
42158      # Try to locate tool using the code snippet
42159      if test -n "$ac_tool_prefix"; then
42160  for ac_prog in gobjcopy objcopy
42161  do
42162    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42163set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42165$as_echo_n "checking for $ac_word... " >&6; }
42166if ${ac_cv_prog_OBJCOPY+:} false; then :
42167  $as_echo_n "(cached) " >&6
42168else
42169  if test -n "$OBJCOPY"; then
42170  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42171else
42172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42173for as_dir in $PATH
42174do
42175  IFS=$as_save_IFS
42176  test -z "$as_dir" && as_dir=.
42177    for ac_exec_ext in '' $ac_executable_extensions; do
42178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42179    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42181    break 2
42182  fi
42183done
42184  done
42185IFS=$as_save_IFS
42186
42187fi
42188fi
42189OBJCOPY=$ac_cv_prog_OBJCOPY
42190if test -n "$OBJCOPY"; then
42191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42192$as_echo "$OBJCOPY" >&6; }
42193else
42194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42195$as_echo "no" >&6; }
42196fi
42197
42198
42199    test -n "$OBJCOPY" && break
42200  done
42201fi
42202if test -z "$OBJCOPY"; then
42203  ac_ct_OBJCOPY=$OBJCOPY
42204  for ac_prog in gobjcopy objcopy
42205do
42206  # Extract the first word of "$ac_prog", so it can be a program name with args.
42207set dummy $ac_prog; ac_word=$2
42208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42209$as_echo_n "checking for $ac_word... " >&6; }
42210if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42211  $as_echo_n "(cached) " >&6
42212else
42213  if test -n "$ac_ct_OBJCOPY"; then
42214  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42215else
42216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42217for as_dir in $PATH
42218do
42219  IFS=$as_save_IFS
42220  test -z "$as_dir" && as_dir=.
42221    for ac_exec_ext in '' $ac_executable_extensions; do
42222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42223    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42225    break 2
42226  fi
42227done
42228  done
42229IFS=$as_save_IFS
42230
42231fi
42232fi
42233ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42234if test -n "$ac_ct_OBJCOPY"; then
42235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42236$as_echo "$ac_ct_OBJCOPY" >&6; }
42237else
42238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42239$as_echo "no" >&6; }
42240fi
42241
42242
42243  test -n "$ac_ct_OBJCOPY" && break
42244done
42245
42246  if test "x$ac_ct_OBJCOPY" = x; then
42247    OBJCOPY=""
42248  else
42249    case $cross_compiling:$ac_tool_warned in
42250yes:)
42251{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42252$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42253ac_tool_warned=yes ;;
42254esac
42255    OBJCOPY=$ac_ct_OBJCOPY
42256  fi
42257fi
42258
42259    else
42260      # If it succeeded, then it was overridden by the user. We will use it
42261      # for the tool.
42262
42263      # First remove it from the list of overridden variables, so we can test
42264      # for unknown variables in the end.
42265      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42266
42267      # Check if we try to supply an empty value
42268      if test "x$OBJCOPY" = x; then
42269        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42270$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42271        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42272$as_echo_n "checking for OBJCOPY... " >&6; }
42273        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42274$as_echo "disabled" >&6; }
42275      else
42276        # Check if the provided tool contains a complete path.
42277        tool_specified="$OBJCOPY"
42278        tool_basename="${tool_specified##*/}"
42279        if test "x$tool_basename" = "x$tool_specified"; then
42280          # A command without a complete path is provided, search $PATH.
42281          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42282$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42283          # Extract the first word of "$tool_basename", so it can be a program name with args.
42284set dummy $tool_basename; ac_word=$2
42285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42286$as_echo_n "checking for $ac_word... " >&6; }
42287if ${ac_cv_path_OBJCOPY+:} false; then :
42288  $as_echo_n "(cached) " >&6
42289else
42290  case $OBJCOPY in
42291  [\\/]* | ?:[\\/]*)
42292  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42293  ;;
42294  *)
42295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42296for as_dir in $PATH
42297do
42298  IFS=$as_save_IFS
42299  test -z "$as_dir" && as_dir=.
42300    for ac_exec_ext in '' $ac_executable_extensions; do
42301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42302    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42304    break 2
42305  fi
42306done
42307  done
42308IFS=$as_save_IFS
42309
42310  ;;
42311esac
42312fi
42313OBJCOPY=$ac_cv_path_OBJCOPY
42314if test -n "$OBJCOPY"; then
42315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42316$as_echo "$OBJCOPY" >&6; }
42317else
42318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42319$as_echo "no" >&6; }
42320fi
42321
42322
42323          if test "x$OBJCOPY" = x; then
42324            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42325          fi
42326        else
42327          # Otherwise we believe it is a complete path. Use it as it is.
42328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42329$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42330          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42331$as_echo_n "checking for OBJCOPY... " >&6; }
42332          if test ! -x "$tool_specified"; then
42333            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42334$as_echo "not found" >&6; }
42335            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42336          fi
42337          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42338$as_echo "$tool_specified" >&6; }
42339        fi
42340      fi
42341    fi
42342
42343  fi
42344
42345
42346    # Only call fixup if objcopy was found.
42347    if test -n "$OBJCOPY"; then
42348
42349  # Only process if variable expands to non-empty
42350
42351  if test "x$OBJCOPY" != x; then
42352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42353
42354  # First separate the path from the arguments. This will split at the first
42355  # space.
42356  complete="$OBJCOPY"
42357  path="${complete%% *}"
42358  tmp="$complete EOL"
42359  arguments="${tmp#* }"
42360
42361  # Input might be given as Windows format, start by converting to
42362  # unix format.
42363  new_path=`$CYGPATH -u "$path"`
42364
42365  # Now try to locate executable using which
42366  new_path=`$WHICH "$new_path" 2> /dev/null`
42367  # bat and cmd files are not always considered executable in cygwin causing which
42368  # to not find them
42369  if test "x$new_path" = x \
42370      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42371      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42372    new_path=`$CYGPATH -u "$path"`
42373  fi
42374  if test "x$new_path" = x; then
42375    # Oops. Which didn't find the executable.
42376    # The splitting of arguments from the executable at a space might have been incorrect,
42377    # since paths with space are more likely in Windows. Give it another try with the whole
42378    # argument.
42379    path="$complete"
42380    arguments="EOL"
42381    new_path=`$CYGPATH -u "$path"`
42382    new_path=`$WHICH "$new_path" 2> /dev/null`
42383    # bat and cmd files are not always considered executable in cygwin causing which
42384    # to not find them
42385    if test "x$new_path" = x \
42386        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42387        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42388      new_path=`$CYGPATH -u "$path"`
42389    fi
42390    if test "x$new_path" = x; then
42391      # It's still not found. Now this is an unrecoverable error.
42392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42393$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42394      has_space=`$ECHO "$complete" | $GREP " "`
42395      if test "x$has_space" != x; then
42396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42398      fi
42399      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42400    fi
42401  fi
42402
42403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42406  # "foo.exe" is OK but "foo" is an error.
42407  #
42408  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42409  # It is also a way to make sure we got the proper file name for the real test later on.
42410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42411  if test "x$test_shortpath" = x; then
42412    # Short path failed, file does not exist as specified.
42413    # Try adding .exe or .cmd
42414    if test -f "${new_path}.exe"; then
42415      input_to_shortpath="${new_path}.exe"
42416    elif test -f "${new_path}.cmd"; then
42417      input_to_shortpath="${new_path}.cmd"
42418    else
42419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42420$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42421      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42422$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42423      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42424    fi
42425  else
42426    input_to_shortpath="$new_path"
42427  fi
42428
42429  # Call helper function which possibly converts this using DOS-style short mode.
42430  # If so, the updated path is stored in $new_path.
42431  new_path="$input_to_shortpath"
42432
42433  input_path="$input_to_shortpath"
42434  # Check if we need to convert this using DOS-style short mode. If the path
42435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42436  # take no chances and rewrite it.
42437  # Note: m4 eats our [], so we need to use [ and ] instead.
42438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42439  if test "x$has_forbidden_chars" != x; then
42440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42444      # Going to short mode and back again did indeed matter. Since short mode is
42445      # case insensitive, let's make it lowercase to improve readability.
42446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42447      # Now convert it back to Unix-style (cygpath)
42448      input_path=`$CYGPATH -u "$shortmode_path"`
42449      new_path="$input_path"
42450    fi
42451  fi
42452
42453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42454  if test "x$test_cygdrive_prefix" = x; then
42455    # As a simple fix, exclude /usr/bin since it's not a real path.
42456    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42458      # a path prefixed by /cygdrive for fixpath to work.
42459      new_path="$CYGWIN_ROOT_PATH$input_path"
42460    fi
42461  fi
42462
42463  # remove trailing .exe if any
42464  new_path="${new_path/%.exe/}"
42465
42466    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42467
42468  # First separate the path from the arguments. This will split at the first
42469  # space.
42470  complete="$OBJCOPY"
42471  path="${complete%% *}"
42472  tmp="$complete EOL"
42473  arguments="${tmp#* }"
42474
42475  # Input might be given as Windows format, start by converting to
42476  # unix format.
42477  new_path="$path"
42478
42479  windows_path="$new_path"
42480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42481    unix_path=`$CYGPATH -u "$windows_path"`
42482    new_path="$unix_path"
42483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42485    new_path="$unix_path"
42486  fi
42487
42488
42489  # Now try to locate executable using which
42490  new_path=`$WHICH "$new_path" 2> /dev/null`
42491
42492  if test "x$new_path" = x; then
42493    # Oops. Which didn't find the executable.
42494    # The splitting of arguments from the executable at a space might have been incorrect,
42495    # since paths with space are more likely in Windows. Give it another try with the whole
42496    # argument.
42497    path="$complete"
42498    arguments="EOL"
42499    new_path="$path"
42500
42501  windows_path="$new_path"
42502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42503    unix_path=`$CYGPATH -u "$windows_path"`
42504    new_path="$unix_path"
42505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42507    new_path="$unix_path"
42508  fi
42509
42510
42511    new_path=`$WHICH "$new_path" 2> /dev/null`
42512    # bat and cmd files are not always considered executable in MSYS causing which
42513    # to not find them
42514    if test "x$new_path" = x \
42515        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42516        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42517      new_path="$path"
42518
42519  windows_path="$new_path"
42520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42521    unix_path=`$CYGPATH -u "$windows_path"`
42522    new_path="$unix_path"
42523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42525    new_path="$unix_path"
42526  fi
42527
42528    fi
42529
42530    if test "x$new_path" = x; then
42531      # It's still not found. Now this is an unrecoverable error.
42532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42533$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42534      has_space=`$ECHO "$complete" | $GREP " "`
42535      if test "x$has_space" != x; then
42536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42538      fi
42539      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42540    fi
42541  fi
42542
42543  # Now new_path has a complete unix path to the binary
42544  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42545    # Keep paths in /bin as-is, but remove trailing .exe if any
42546    new_path="${new_path/%.exe/}"
42547    # Do not save /bin paths to all_fixpath_prefixes!
42548  else
42549    # Not in mixed or Windows style, start by that.
42550    new_path=`cmd //c echo $new_path`
42551
42552  input_path="$new_path"
42553  # Check if we need to convert this using DOS-style short mode. If the path
42554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42555  # take no chances and rewrite it.
42556  # Note: m4 eats our [], so we need to use [ and ] instead.
42557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42558  if test "x$has_forbidden_chars" != x; then
42559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42560    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42561  fi
42562
42563    # Output is in $new_path
42564
42565  windows_path="$new_path"
42566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42567    unix_path=`$CYGPATH -u "$windows_path"`
42568    new_path="$unix_path"
42569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42571    new_path="$unix_path"
42572  fi
42573
42574    # remove trailing .exe if any
42575    new_path="${new_path/%.exe/}"
42576
42577    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42578    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42579  fi
42580
42581    else
42582      # We're on a unix platform. Hooray! :)
42583      # First separate the path from the arguments. This will split at the first
42584      # space.
42585      complete="$OBJCOPY"
42586      path="${complete%% *}"
42587      tmp="$complete EOL"
42588      arguments="${tmp#* }"
42589
42590      # Cannot rely on the command "which" here since it doesn't always work.
42591      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42592      if test -z "$is_absolute_path"; then
42593        # Path to executable is not absolute. Find it.
42594        IFS_save="$IFS"
42595        IFS=:
42596        for p in $PATH; do
42597          if test -f "$p/$path" && test -x "$p/$path"; then
42598            new_path="$p/$path"
42599            break
42600          fi
42601        done
42602        IFS="$IFS_save"
42603      else
42604        # This is an absolute path, we can use it without further modifications.
42605        new_path="$path"
42606      fi
42607
42608      if test "x$new_path" = x; then
42609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42610$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42611        has_space=`$ECHO "$complete" | $GREP " "`
42612        if test "x$has_space" != x; then
42613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42615        fi
42616        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42617      fi
42618    fi
42619
42620    # Now join together the path and the arguments once again
42621    if test "x$arguments" != xEOL; then
42622      new_complete="$new_path ${arguments% *}"
42623    else
42624      new_complete="$new_path"
42625    fi
42626
42627    if test "x$complete" != "x$new_complete"; then
42628      OBJCOPY="$new_complete"
42629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42630$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42631    fi
42632  fi
42633
42634      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42635        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42636        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42637        # - version number is last blank separate word on first line
42638        # - version number formats that have been seen:
42639        #   - <major>.<minor>
42640        #   - <major>.<minor>.<micro>
42641        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42642        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42643         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42644              -e 's/.* //' \
42645              -e '/^[01]\./b bad' \
42646              -e '/^2\./{' \
42647              -e '  s/^2\.//' \
42648              -e '  /^[0-9]$/b bad' \
42649              -e '  /^[0-9]\./b bad' \
42650              -e '  /^1[0-9]$/b bad' \
42651              -e '  /^1[0-9]\./b bad' \
42652              -e '  /^20\./b bad' \
42653              -e '  /^21\.0$/b bad' \
42654              -e '  /^21\.0\./b bad' \
42655              -e '}' \
42656              -e ':good' \
42657              -e 's/.*/VALID_VERSION/p' \
42658              -e 'q' \
42659              -e ':bad' \
42660              -e 's/.*/BAD_VERSION/p' \
42661              -e 'q'`
42662        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42663          OBJCOPY=
42664          { $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
42665$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42666          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42667$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42668          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42669$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42670          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42671$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42672          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42673$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42674        fi
42675      fi
42676    fi
42677  fi
42678
42679
42680
42681  # Publish this variable in the help.
42682
42683
42684  if [ -z "${OBJDUMP+x}" ]; then
42685    # The variable is not set by user, try to locate tool using the code snippet
42686    if test -n "$ac_tool_prefix"; then
42687  for ac_prog in gobjdump objdump
42688  do
42689    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42690set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42692$as_echo_n "checking for $ac_word... " >&6; }
42693if ${ac_cv_prog_OBJDUMP+:} false; then :
42694  $as_echo_n "(cached) " >&6
42695else
42696  if test -n "$OBJDUMP"; then
42697  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42698else
42699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42700for as_dir in $PATH
42701do
42702  IFS=$as_save_IFS
42703  test -z "$as_dir" && as_dir=.
42704    for ac_exec_ext in '' $ac_executable_extensions; do
42705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42706    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42708    break 2
42709  fi
42710done
42711  done
42712IFS=$as_save_IFS
42713
42714fi
42715fi
42716OBJDUMP=$ac_cv_prog_OBJDUMP
42717if test -n "$OBJDUMP"; then
42718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42719$as_echo "$OBJDUMP" >&6; }
42720else
42721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42722$as_echo "no" >&6; }
42723fi
42724
42725
42726    test -n "$OBJDUMP" && break
42727  done
42728fi
42729if test -z "$OBJDUMP"; then
42730  ac_ct_OBJDUMP=$OBJDUMP
42731  for ac_prog in gobjdump objdump
42732do
42733  # Extract the first word of "$ac_prog", so it can be a program name with args.
42734set dummy $ac_prog; ac_word=$2
42735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42736$as_echo_n "checking for $ac_word... " >&6; }
42737if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42738  $as_echo_n "(cached) " >&6
42739else
42740  if test -n "$ac_ct_OBJDUMP"; then
42741  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42742else
42743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42744for as_dir in $PATH
42745do
42746  IFS=$as_save_IFS
42747  test -z "$as_dir" && as_dir=.
42748    for ac_exec_ext in '' $ac_executable_extensions; do
42749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42750    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42752    break 2
42753  fi
42754done
42755  done
42756IFS=$as_save_IFS
42757
42758fi
42759fi
42760ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42761if test -n "$ac_ct_OBJDUMP"; then
42762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42763$as_echo "$ac_ct_OBJDUMP" >&6; }
42764else
42765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42766$as_echo "no" >&6; }
42767fi
42768
42769
42770  test -n "$ac_ct_OBJDUMP" && break
42771done
42772
42773  if test "x$ac_ct_OBJDUMP" = x; then
42774    OBJDUMP=""
42775  else
42776    case $cross_compiling:$ac_tool_warned in
42777yes:)
42778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42780ac_tool_warned=yes ;;
42781esac
42782    OBJDUMP=$ac_ct_OBJDUMP
42783  fi
42784fi
42785
42786  else
42787    # The variable is set, but is it from the command line or the environment?
42788
42789    # Try to remove the string !OBJDUMP! from our list.
42790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42792      # If it failed, the variable was not from the command line. Ignore it,
42793      # but warn the user (except for BASH, which is always set by the calling BASH).
42794      if test "xOBJDUMP" != xBASH; then
42795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42796$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42797      fi
42798      # Try to locate tool using the code snippet
42799      if test -n "$ac_tool_prefix"; then
42800  for ac_prog in gobjdump objdump
42801  do
42802    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42805$as_echo_n "checking for $ac_word... " >&6; }
42806if ${ac_cv_prog_OBJDUMP+:} false; then :
42807  $as_echo_n "(cached) " >&6
42808else
42809  if test -n "$OBJDUMP"; then
42810  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42811else
42812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42813for as_dir in $PATH
42814do
42815  IFS=$as_save_IFS
42816  test -z "$as_dir" && as_dir=.
42817    for ac_exec_ext in '' $ac_executable_extensions; do
42818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42819    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42821    break 2
42822  fi
42823done
42824  done
42825IFS=$as_save_IFS
42826
42827fi
42828fi
42829OBJDUMP=$ac_cv_prog_OBJDUMP
42830if test -n "$OBJDUMP"; then
42831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42832$as_echo "$OBJDUMP" >&6; }
42833else
42834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42835$as_echo "no" >&6; }
42836fi
42837
42838
42839    test -n "$OBJDUMP" && break
42840  done
42841fi
42842if test -z "$OBJDUMP"; then
42843  ac_ct_OBJDUMP=$OBJDUMP
42844  for ac_prog in gobjdump objdump
42845do
42846  # Extract the first word of "$ac_prog", so it can be a program name with args.
42847set dummy $ac_prog; ac_word=$2
42848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42849$as_echo_n "checking for $ac_word... " >&6; }
42850if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42851  $as_echo_n "(cached) " >&6
42852else
42853  if test -n "$ac_ct_OBJDUMP"; then
42854  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42855else
42856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42857for as_dir in $PATH
42858do
42859  IFS=$as_save_IFS
42860  test -z "$as_dir" && as_dir=.
42861    for ac_exec_ext in '' $ac_executable_extensions; do
42862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42863    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42865    break 2
42866  fi
42867done
42868  done
42869IFS=$as_save_IFS
42870
42871fi
42872fi
42873ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42874if test -n "$ac_ct_OBJDUMP"; then
42875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42876$as_echo "$ac_ct_OBJDUMP" >&6; }
42877else
42878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42879$as_echo "no" >&6; }
42880fi
42881
42882
42883  test -n "$ac_ct_OBJDUMP" && break
42884done
42885
42886  if test "x$ac_ct_OBJDUMP" = x; then
42887    OBJDUMP=""
42888  else
42889    case $cross_compiling:$ac_tool_warned in
42890yes:)
42891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42893ac_tool_warned=yes ;;
42894esac
42895    OBJDUMP=$ac_ct_OBJDUMP
42896  fi
42897fi
42898
42899    else
42900      # If it succeeded, then it was overridden by the user. We will use it
42901      # for the tool.
42902
42903      # First remove it from the list of overridden variables, so we can test
42904      # for unknown variables in the end.
42905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42906
42907      # Check if we try to supply an empty value
42908      if test "x$OBJDUMP" = x; then
42909        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42910$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42912$as_echo_n "checking for OBJDUMP... " >&6; }
42913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42914$as_echo "disabled" >&6; }
42915      else
42916        # Check if the provided tool contains a complete path.
42917        tool_specified="$OBJDUMP"
42918        tool_basename="${tool_specified##*/}"
42919        if test "x$tool_basename" = "x$tool_specified"; then
42920          # A command without a complete path is provided, search $PATH.
42921          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42922$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42923          # Extract the first word of "$tool_basename", so it can be a program name with args.
42924set dummy $tool_basename; ac_word=$2
42925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42926$as_echo_n "checking for $ac_word... " >&6; }
42927if ${ac_cv_path_OBJDUMP+:} false; then :
42928  $as_echo_n "(cached) " >&6
42929else
42930  case $OBJDUMP in
42931  [\\/]* | ?:[\\/]*)
42932  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42933  ;;
42934  *)
42935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42936for as_dir in $PATH
42937do
42938  IFS=$as_save_IFS
42939  test -z "$as_dir" && as_dir=.
42940    for ac_exec_ext in '' $ac_executable_extensions; do
42941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42942    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42944    break 2
42945  fi
42946done
42947  done
42948IFS=$as_save_IFS
42949
42950  ;;
42951esac
42952fi
42953OBJDUMP=$ac_cv_path_OBJDUMP
42954if test -n "$OBJDUMP"; then
42955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42956$as_echo "$OBJDUMP" >&6; }
42957else
42958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42959$as_echo "no" >&6; }
42960fi
42961
42962
42963          if test "x$OBJDUMP" = x; then
42964            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42965          fi
42966        else
42967          # Otherwise we believe it is a complete path. Use it as it is.
42968          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42969$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42970          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42971$as_echo_n "checking for OBJDUMP... " >&6; }
42972          if test ! -x "$tool_specified"; then
42973            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42974$as_echo "not found" >&6; }
42975            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42976          fi
42977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42978$as_echo "$tool_specified" >&6; }
42979        fi
42980      fi
42981    fi
42982
42983  fi
42984
42985
42986  if test "x$OBJDUMP" != x; then
42987    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
42988    # bails if argument is missing.
42989
42990  # Only process if variable expands to non-empty
42991
42992  if test "x$OBJDUMP" != x; then
42993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42994
42995  # First separate the path from the arguments. This will split at the first
42996  # space.
42997  complete="$OBJDUMP"
42998  path="${complete%% *}"
42999  tmp="$complete EOL"
43000  arguments="${tmp#* }"
43001
43002  # Input might be given as Windows format, start by converting to
43003  # unix format.
43004  new_path=`$CYGPATH -u "$path"`
43005
43006  # Now try to locate executable using which
43007  new_path=`$WHICH "$new_path" 2> /dev/null`
43008  # bat and cmd files are not always considered executable in cygwin causing which
43009  # to not find them
43010  if test "x$new_path" = x \
43011      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43012      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43013    new_path=`$CYGPATH -u "$path"`
43014  fi
43015  if test "x$new_path" = x; then
43016    # Oops. Which didn't find the executable.
43017    # The splitting of arguments from the executable at a space might have been incorrect,
43018    # since paths with space are more likely in Windows. Give it another try with the whole
43019    # argument.
43020    path="$complete"
43021    arguments="EOL"
43022    new_path=`$CYGPATH -u "$path"`
43023    new_path=`$WHICH "$new_path" 2> /dev/null`
43024    # bat and cmd files are not always considered executable in cygwin causing which
43025    # to not find them
43026    if test "x$new_path" = x \
43027        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43028        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43029      new_path=`$CYGPATH -u "$path"`
43030    fi
43031    if test "x$new_path" = x; then
43032      # It's still not found. Now this is an unrecoverable error.
43033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43034$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43035      has_space=`$ECHO "$complete" | $GREP " "`
43036      if test "x$has_space" != x; then
43037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43039      fi
43040      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43041    fi
43042  fi
43043
43044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43047  # "foo.exe" is OK but "foo" is an error.
43048  #
43049  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43050  # It is also a way to make sure we got the proper file name for the real test later on.
43051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43052  if test "x$test_shortpath" = x; then
43053    # Short path failed, file does not exist as specified.
43054    # Try adding .exe or .cmd
43055    if test -f "${new_path}.exe"; then
43056      input_to_shortpath="${new_path}.exe"
43057    elif test -f "${new_path}.cmd"; then
43058      input_to_shortpath="${new_path}.cmd"
43059    else
43060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43061$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43062      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43063$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43064      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43065    fi
43066  else
43067    input_to_shortpath="$new_path"
43068  fi
43069
43070  # Call helper function which possibly converts this using DOS-style short mode.
43071  # If so, the updated path is stored in $new_path.
43072  new_path="$input_to_shortpath"
43073
43074  input_path="$input_to_shortpath"
43075  # Check if we need to convert this using DOS-style short mode. If the path
43076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43077  # take no chances and rewrite it.
43078  # Note: m4 eats our [], so we need to use [ and ] instead.
43079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43080  if test "x$has_forbidden_chars" != x; then
43081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43082    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43083    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43084    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43085      # Going to short mode and back again did indeed matter. Since short mode is
43086      # case insensitive, let's make it lowercase to improve readability.
43087      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43088      # Now convert it back to Unix-style (cygpath)
43089      input_path=`$CYGPATH -u "$shortmode_path"`
43090      new_path="$input_path"
43091    fi
43092  fi
43093
43094  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43095  if test "x$test_cygdrive_prefix" = x; then
43096    # As a simple fix, exclude /usr/bin since it's not a real path.
43097    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43098      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43099      # a path prefixed by /cygdrive for fixpath to work.
43100      new_path="$CYGWIN_ROOT_PATH$input_path"
43101    fi
43102  fi
43103
43104  # remove trailing .exe if any
43105  new_path="${new_path/%.exe/}"
43106
43107    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43108
43109  # First separate the path from the arguments. This will split at the first
43110  # space.
43111  complete="$OBJDUMP"
43112  path="${complete%% *}"
43113  tmp="$complete EOL"
43114  arguments="${tmp#* }"
43115
43116  # Input might be given as Windows format, start by converting to
43117  # unix format.
43118  new_path="$path"
43119
43120  windows_path="$new_path"
43121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43122    unix_path=`$CYGPATH -u "$windows_path"`
43123    new_path="$unix_path"
43124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43126    new_path="$unix_path"
43127  fi
43128
43129
43130  # Now try to locate executable using which
43131  new_path=`$WHICH "$new_path" 2> /dev/null`
43132
43133  if test "x$new_path" = x; then
43134    # Oops. Which didn't find the executable.
43135    # The splitting of arguments from the executable at a space might have been incorrect,
43136    # since paths with space are more likely in Windows. Give it another try with the whole
43137    # argument.
43138    path="$complete"
43139    arguments="EOL"
43140    new_path="$path"
43141
43142  windows_path="$new_path"
43143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43144    unix_path=`$CYGPATH -u "$windows_path"`
43145    new_path="$unix_path"
43146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43148    new_path="$unix_path"
43149  fi
43150
43151
43152    new_path=`$WHICH "$new_path" 2> /dev/null`
43153    # bat and cmd files are not always considered executable in MSYS causing which
43154    # to not find them
43155    if test "x$new_path" = x \
43156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43158      new_path="$path"
43159
43160  windows_path="$new_path"
43161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43162    unix_path=`$CYGPATH -u "$windows_path"`
43163    new_path="$unix_path"
43164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43166    new_path="$unix_path"
43167  fi
43168
43169    fi
43170
43171    if test "x$new_path" = x; then
43172      # It's still not found. Now this is an unrecoverable error.
43173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43174$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43175      has_space=`$ECHO "$complete" | $GREP " "`
43176      if test "x$has_space" != x; then
43177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43179      fi
43180      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43181    fi
43182  fi
43183
43184  # Now new_path has a complete unix path to the binary
43185  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43186    # Keep paths in /bin as-is, but remove trailing .exe if any
43187    new_path="${new_path/%.exe/}"
43188    # Do not save /bin paths to all_fixpath_prefixes!
43189  else
43190    # Not in mixed or Windows style, start by that.
43191    new_path=`cmd //c echo $new_path`
43192
43193  input_path="$new_path"
43194  # Check if we need to convert this using DOS-style short mode. If the path
43195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43196  # take no chances and rewrite it.
43197  # Note: m4 eats our [], so we need to use [ and ] instead.
43198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43199  if test "x$has_forbidden_chars" != x; then
43200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43202  fi
43203
43204    # Output is in $new_path
43205
43206  windows_path="$new_path"
43207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43208    unix_path=`$CYGPATH -u "$windows_path"`
43209    new_path="$unix_path"
43210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43211    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43212    new_path="$unix_path"
43213  fi
43214
43215    # remove trailing .exe if any
43216    new_path="${new_path/%.exe/}"
43217
43218    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43219    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43220  fi
43221
43222    else
43223      # We're on a unix platform. Hooray! :)
43224      # First separate the path from the arguments. This will split at the first
43225      # space.
43226      complete="$OBJDUMP"
43227      path="${complete%% *}"
43228      tmp="$complete EOL"
43229      arguments="${tmp#* }"
43230
43231      # Cannot rely on the command "which" here since it doesn't always work.
43232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43233      if test -z "$is_absolute_path"; then
43234        # Path to executable is not absolute. Find it.
43235        IFS_save="$IFS"
43236        IFS=:
43237        for p in $PATH; do
43238          if test -f "$p/$path" && test -x "$p/$path"; then
43239            new_path="$p/$path"
43240            break
43241          fi
43242        done
43243        IFS="$IFS_save"
43244      else
43245        # This is an absolute path, we can use it without further modifications.
43246        new_path="$path"
43247      fi
43248
43249      if test "x$new_path" = x; then
43250        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43251$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43252        has_space=`$ECHO "$complete" | $GREP " "`
43253        if test "x$has_space" != x; then
43254          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43255$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43256        fi
43257        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43258      fi
43259    fi
43260
43261    # Now join together the path and the arguments once again
43262    if test "x$arguments" != xEOL; then
43263      new_complete="$new_path ${arguments% *}"
43264    else
43265      new_complete="$new_path"
43266    fi
43267
43268    if test "x$complete" != "x$new_complete"; then
43269      OBJDUMP="$new_complete"
43270      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43271$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43272    fi
43273  fi
43274
43275  fi
43276
43277
43278  # Restore old path.
43279  PATH="$OLD_PATH"
43280
43281  # Restore the flags to the user specified values.
43282  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43283  CFLAGS="$ORG_CFLAGS"
43284  CXXFLAGS="$ORG_CXXFLAGS"
43285
43286
43287# Finally do some processing after the detection phase
43288
43289  if test "x$COMPILE_TYPE" = "xcross"; then
43290    # Now we need to find a C/C++ compiler that can build executables for the
43291    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43292    # used once. Also, we need to do this without adding a tools dir to the
43293    # path, otherwise we might pick up cross-compilers which don't use standard
43294    # naming.
43295
43296    OLDPATH="$PATH"
43297
43298
43299# Check whether --with-build-devkit was given.
43300if test "${with_build_devkit+set}" = set; then :
43301  withval=$with_build_devkit;
43302fi
43303
43304    if test "x$with_build_devkit" = "xyes"; then
43305      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43306    elif test -n "$with_build_devkit"; then
43307      if test ! -d "$with_build_devkit"; then
43308        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43309      else
43310
43311  # Only process if variable expands to non-empty
43312
43313  if test "x$with_build_devkit" != x; then
43314    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43315
43316  # Input might be given as Windows format, start by converting to
43317  # unix format.
43318  path="$with_build_devkit"
43319  new_path=`$CYGPATH -u "$path"`
43320
43321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43324  # "foo.exe" is OK but "foo" is an error.
43325  #
43326  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43327  # It is also a way to make sure we got the proper file name for the real test later on.
43328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43329  if test "x$test_shortpath" = x; then
43330    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43331$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43332    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43333  fi
43334
43335  # Call helper function which possibly converts this using DOS-style short mode.
43336  # If so, the updated path is stored in $new_path.
43337
43338  input_path="$new_path"
43339  # Check if we need to convert this using DOS-style short mode. If the path
43340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43341  # take no chances and rewrite it.
43342  # Note: m4 eats our [], so we need to use [ and ] instead.
43343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43344  if test "x$has_forbidden_chars" != x; then
43345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43349      # Going to short mode and back again did indeed matter. Since short mode is
43350      # case insensitive, let's make it lowercase to improve readability.
43351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43352      # Now convert it back to Unix-style (cygpath)
43353      input_path=`$CYGPATH -u "$shortmode_path"`
43354      new_path="$input_path"
43355    fi
43356  fi
43357
43358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43359  if test "x$test_cygdrive_prefix" = x; then
43360    # As a simple fix, exclude /usr/bin since it's not a real path.
43361    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43363      # a path prefixed by /cygdrive for fixpath to work.
43364      new_path="$CYGWIN_ROOT_PATH$input_path"
43365    fi
43366  fi
43367
43368
43369  if test "x$path" != "x$new_path"; then
43370    with_build_devkit="$new_path"
43371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43372$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43373  fi
43374
43375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43376
43377  path="$with_build_devkit"
43378  has_colon=`$ECHO $path | $GREP ^.:`
43379  new_path="$path"
43380  if test "x$has_colon" = x; then
43381    # Not in mixed or Windows style, start by that.
43382    new_path=`cmd //c echo $path`
43383  fi
43384
43385
43386  input_path="$new_path"
43387  # Check if we need to convert this using DOS-style short mode. If the path
43388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43389  # take no chances and rewrite it.
43390  # Note: m4 eats our [], so we need to use [ and ] instead.
43391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43392  if test "x$has_forbidden_chars" != x; then
43393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43395  fi
43396
43397
43398  windows_path="$new_path"
43399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43400    unix_path=`$CYGPATH -u "$windows_path"`
43401    new_path="$unix_path"
43402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43404    new_path="$unix_path"
43405  fi
43406
43407  if test "x$path" != "x$new_path"; then
43408    with_build_devkit="$new_path"
43409    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43410$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43411  fi
43412
43413  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43414  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43415
43416    else
43417      # We're on a unix platform. Hooray! :)
43418      path="$with_build_devkit"
43419      has_space=`$ECHO "$path" | $GREP " "`
43420      if test "x$has_space" != x; then
43421        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43422$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43423        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43424      fi
43425
43426      # Use eval to expand a potential ~
43427      eval path="$path"
43428      if test ! -f "$path" && test ! -d "$path"; then
43429        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43430      fi
43431
43432      if test -d "$path"; then
43433        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43434      else
43435        dir="`$DIRNAME "$path"`"
43436        base="`$BASENAME "$path"`"
43437        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43438      fi
43439    fi
43440  fi
43441
43442        BUILD_DEVKIT_ROOT="$with_build_devkit"
43443        # Check for a meta data info file in the root of the devkit
43444        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43445          # Process devkit.info so that existing devkit variables are not
43446          # modified by this
43447          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43448              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43449              -e "s/\$host/\$build/g" \
43450              $BUILD_DEVKIT_ROOT/devkit.info \
43451              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43452          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43453          # This potentially sets the following:
43454          # A descriptive name of the devkit
43455
43456  if test "x$BUILD_DEVKIT_NAME" = x; then
43457    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43458  fi
43459
43460          # Corresponds to --with-extra-path
43461
43462  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43463    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43464  fi
43465
43466          # Corresponds to --with-toolchain-path
43467
43468  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43469    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43470  fi
43471
43472          # Corresponds to --with-sysroot
43473
43474  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43475    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43476  fi
43477
43478          # Skip the Window specific parts
43479        fi
43480
43481        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43482$as_echo_n "checking for build platform devkit... " >&6; }
43483        if test "x$BUILD_DEVKIT_NAME" != x; then
43484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43485$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43486        else
43487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43488$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43489        fi
43490
43491        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43492
43493  if test "x$BUILD_SYSROOT" != "x"; then
43494    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43495      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43496        # Solaris Studio does not have a concept of sysroot. Instead we must
43497        # make sure the default include and lib dirs are appended to each
43498        # compile and link command line. Must also add -I-xbuiltin to enable
43499        # inlining of system functions and intrinsics.
43500        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43501        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43502            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43503            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43504      fi
43505    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43506      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43507      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43508    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43509      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43510      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43511    fi
43512    # Propagate the sysroot args to hotspot
43513    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43514    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43515    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43516    # The global CFLAGS and LDFLAGS variables need these for configure to function
43517    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43518    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43519    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43520    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43521  fi
43522
43523  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43524    # We also need -iframework<path>/System/Library/Frameworks
43525    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43526    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43527    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43528    # set this here so it doesn't have to be peppered throughout the forest
43529    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43530    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43531  fi
43532
43533
43534
43535
43536
43537         # Fallback default of just /bin if DEVKIT_PATH is not defined
43538        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43539          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43540        fi
43541        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43542      fi
43543    fi
43544
43545    # FIXME: we should list the discovered compilers as an exclude pattern!
43546    # If we do that, we can do this detection before POST_DETECTION, and still
43547    # find the build compilers in the tools dir, if needed.
43548
43549
43550
43551  # Publish this variable in the help.
43552
43553
43554  if [ -z "${BUILD_CC+x}" ]; then
43555    # The variable is not set by user, try to locate tool using the code snippet
43556    for ac_prog in cl cc gcc
43557do
43558  # Extract the first word of "$ac_prog", so it can be a program name with args.
43559set dummy $ac_prog; ac_word=$2
43560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43561$as_echo_n "checking for $ac_word... " >&6; }
43562if ${ac_cv_path_BUILD_CC+:} false; then :
43563  $as_echo_n "(cached) " >&6
43564else
43565  case $BUILD_CC in
43566  [\\/]* | ?:[\\/]*)
43567  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43568  ;;
43569  *)
43570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43571for as_dir in $PATH
43572do
43573  IFS=$as_save_IFS
43574  test -z "$as_dir" && as_dir=.
43575    for ac_exec_ext in '' $ac_executable_extensions; do
43576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43577    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43579    break 2
43580  fi
43581done
43582  done
43583IFS=$as_save_IFS
43584
43585  ;;
43586esac
43587fi
43588BUILD_CC=$ac_cv_path_BUILD_CC
43589if test -n "$BUILD_CC"; then
43590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43591$as_echo "$BUILD_CC" >&6; }
43592else
43593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43594$as_echo "no" >&6; }
43595fi
43596
43597
43598  test -n "$BUILD_CC" && break
43599done
43600
43601  else
43602    # The variable is set, but is it from the command line or the environment?
43603
43604    # Try to remove the string !BUILD_CC! from our list.
43605    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43606    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43607      # If it failed, the variable was not from the command line. Ignore it,
43608      # but warn the user (except for BASH, which is always set by the calling BASH).
43609      if test "xBUILD_CC" != xBASH; then
43610        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43611$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43612      fi
43613      # Try to locate tool using the code snippet
43614      for ac_prog in cl cc gcc
43615do
43616  # Extract the first word of "$ac_prog", so it can be a program name with args.
43617set dummy $ac_prog; ac_word=$2
43618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43619$as_echo_n "checking for $ac_word... " >&6; }
43620if ${ac_cv_path_BUILD_CC+:} false; then :
43621  $as_echo_n "(cached) " >&6
43622else
43623  case $BUILD_CC in
43624  [\\/]* | ?:[\\/]*)
43625  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43626  ;;
43627  *)
43628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43629for as_dir in $PATH
43630do
43631  IFS=$as_save_IFS
43632  test -z "$as_dir" && as_dir=.
43633    for ac_exec_ext in '' $ac_executable_extensions; do
43634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43635    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43637    break 2
43638  fi
43639done
43640  done
43641IFS=$as_save_IFS
43642
43643  ;;
43644esac
43645fi
43646BUILD_CC=$ac_cv_path_BUILD_CC
43647if test -n "$BUILD_CC"; then
43648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43649$as_echo "$BUILD_CC" >&6; }
43650else
43651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43652$as_echo "no" >&6; }
43653fi
43654
43655
43656  test -n "$BUILD_CC" && break
43657done
43658
43659    else
43660      # If it succeeded, then it was overridden by the user. We will use it
43661      # for the tool.
43662
43663      # First remove it from the list of overridden variables, so we can test
43664      # for unknown variables in the end.
43665      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43666
43667      # Check if we try to supply an empty value
43668      if test "x$BUILD_CC" = x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43670$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43672$as_echo_n "checking for BUILD_CC... " >&6; }
43673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43674$as_echo "disabled" >&6; }
43675      else
43676        # Check if the provided tool contains a complete path.
43677        tool_specified="$BUILD_CC"
43678        tool_basename="${tool_specified##*/}"
43679        if test "x$tool_basename" = "x$tool_specified"; then
43680          # A command without a complete path is provided, search $PATH.
43681          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43682$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43683          # Extract the first word of "$tool_basename", so it can be a program name with args.
43684set dummy $tool_basename; ac_word=$2
43685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43686$as_echo_n "checking for $ac_word... " >&6; }
43687if ${ac_cv_path_BUILD_CC+:} false; then :
43688  $as_echo_n "(cached) " >&6
43689else
43690  case $BUILD_CC in
43691  [\\/]* | ?:[\\/]*)
43692  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43693  ;;
43694  *)
43695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43696for as_dir in $PATH
43697do
43698  IFS=$as_save_IFS
43699  test -z "$as_dir" && as_dir=.
43700    for ac_exec_ext in '' $ac_executable_extensions; do
43701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43702    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43704    break 2
43705  fi
43706done
43707  done
43708IFS=$as_save_IFS
43709
43710  ;;
43711esac
43712fi
43713BUILD_CC=$ac_cv_path_BUILD_CC
43714if test -n "$BUILD_CC"; then
43715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43716$as_echo "$BUILD_CC" >&6; }
43717else
43718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43719$as_echo "no" >&6; }
43720fi
43721
43722
43723          if test "x$BUILD_CC" = x; then
43724            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43725          fi
43726        else
43727          # Otherwise we believe it is a complete path. Use it as it is.
43728          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43729$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43730          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43731$as_echo_n "checking for BUILD_CC... " >&6; }
43732          if test ! -x "$tool_specified"; then
43733            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43734$as_echo "not found" >&6; }
43735            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43736          fi
43737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43738$as_echo "$tool_specified" >&6; }
43739        fi
43740      fi
43741    fi
43742
43743  fi
43744
43745
43746
43747  if test "x$BUILD_CC" = x; then
43748    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43749  fi
43750
43751
43752
43753  # Only process if variable expands to non-empty
43754
43755  if test "x$BUILD_CC" != x; then
43756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43757
43758  # First separate the path from the arguments. This will split at the first
43759  # space.
43760  complete="$BUILD_CC"
43761  path="${complete%% *}"
43762  tmp="$complete EOL"
43763  arguments="${tmp#* }"
43764
43765  # Input might be given as Windows format, start by converting to
43766  # unix format.
43767  new_path=`$CYGPATH -u "$path"`
43768
43769  # Now try to locate executable using which
43770  new_path=`$WHICH "$new_path" 2> /dev/null`
43771  # bat and cmd files are not always considered executable in cygwin causing which
43772  # to not find them
43773  if test "x$new_path" = x \
43774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43776    new_path=`$CYGPATH -u "$path"`
43777  fi
43778  if test "x$new_path" = x; then
43779    # Oops. Which didn't find the executable.
43780    # The splitting of arguments from the executable at a space might have been incorrect,
43781    # since paths with space are more likely in Windows. Give it another try with the whole
43782    # argument.
43783    path="$complete"
43784    arguments="EOL"
43785    new_path=`$CYGPATH -u "$path"`
43786    new_path=`$WHICH "$new_path" 2> /dev/null`
43787    # bat and cmd files are not always considered executable in cygwin causing which
43788    # to not find them
43789    if test "x$new_path" = x \
43790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43792      new_path=`$CYGPATH -u "$path"`
43793    fi
43794    if test "x$new_path" = x; then
43795      # It's still not found. Now this is an unrecoverable error.
43796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43797$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43798      has_space=`$ECHO "$complete" | $GREP " "`
43799      if test "x$has_space" != x; then
43800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43802      fi
43803      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43804    fi
43805  fi
43806
43807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43810  # "foo.exe" is OK but "foo" is an error.
43811  #
43812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43813  # It is also a way to make sure we got the proper file name for the real test later on.
43814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43815  if test "x$test_shortpath" = x; then
43816    # Short path failed, file does not exist as specified.
43817    # Try adding .exe or .cmd
43818    if test -f "${new_path}.exe"; then
43819      input_to_shortpath="${new_path}.exe"
43820    elif test -f "${new_path}.cmd"; then
43821      input_to_shortpath="${new_path}.cmd"
43822    else
43823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43824$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43827      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43828    fi
43829  else
43830    input_to_shortpath="$new_path"
43831  fi
43832
43833  # Call helper function which possibly converts this using DOS-style short mode.
43834  # If so, the updated path is stored in $new_path.
43835  new_path="$input_to_shortpath"
43836
43837  input_path="$input_to_shortpath"
43838  # Check if we need to convert this using DOS-style short mode. If the path
43839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43840  # take no chances and rewrite it.
43841  # Note: m4 eats our [], so we need to use [ and ] instead.
43842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43843  if test "x$has_forbidden_chars" != x; then
43844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43848      # Going to short mode and back again did indeed matter. Since short mode is
43849      # case insensitive, let's make it lowercase to improve readability.
43850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43851      # Now convert it back to Unix-style (cygpath)
43852      input_path=`$CYGPATH -u "$shortmode_path"`
43853      new_path="$input_path"
43854    fi
43855  fi
43856
43857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43858  if test "x$test_cygdrive_prefix" = x; then
43859    # As a simple fix, exclude /usr/bin since it's not a real path.
43860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43862      # a path prefixed by /cygdrive for fixpath to work.
43863      new_path="$CYGWIN_ROOT_PATH$input_path"
43864    fi
43865  fi
43866
43867  # remove trailing .exe if any
43868  new_path="${new_path/%.exe/}"
43869
43870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43871
43872  # First separate the path from the arguments. This will split at the first
43873  # space.
43874  complete="$BUILD_CC"
43875  path="${complete%% *}"
43876  tmp="$complete EOL"
43877  arguments="${tmp#* }"
43878
43879  # Input might be given as Windows format, start by converting to
43880  # unix format.
43881  new_path="$path"
43882
43883  windows_path="$new_path"
43884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43885    unix_path=`$CYGPATH -u "$windows_path"`
43886    new_path="$unix_path"
43887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43889    new_path="$unix_path"
43890  fi
43891
43892
43893  # Now try to locate executable using which
43894  new_path=`$WHICH "$new_path" 2> /dev/null`
43895
43896  if test "x$new_path" = x; then
43897    # Oops. Which didn't find the executable.
43898    # The splitting of arguments from the executable at a space might have been incorrect,
43899    # since paths with space are more likely in Windows. Give it another try with the whole
43900    # argument.
43901    path="$complete"
43902    arguments="EOL"
43903    new_path="$path"
43904
43905  windows_path="$new_path"
43906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43907    unix_path=`$CYGPATH -u "$windows_path"`
43908    new_path="$unix_path"
43909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43911    new_path="$unix_path"
43912  fi
43913
43914
43915    new_path=`$WHICH "$new_path" 2> /dev/null`
43916    # bat and cmd files are not always considered executable in MSYS causing which
43917    # to not find them
43918    if test "x$new_path" = x \
43919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43921      new_path="$path"
43922
43923  windows_path="$new_path"
43924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43925    unix_path=`$CYGPATH -u "$windows_path"`
43926    new_path="$unix_path"
43927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43929    new_path="$unix_path"
43930  fi
43931
43932    fi
43933
43934    if test "x$new_path" = x; then
43935      # It's still not found. Now this is an unrecoverable error.
43936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43937$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43938      has_space=`$ECHO "$complete" | $GREP " "`
43939      if test "x$has_space" != x; then
43940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43942      fi
43943      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43944    fi
43945  fi
43946
43947  # Now new_path has a complete unix path to the binary
43948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43949    # Keep paths in /bin as-is, but remove trailing .exe if any
43950    new_path="${new_path/%.exe/}"
43951    # Do not save /bin paths to all_fixpath_prefixes!
43952  else
43953    # Not in mixed or Windows style, start by that.
43954    new_path=`cmd //c echo $new_path`
43955
43956  input_path="$new_path"
43957  # Check if we need to convert this using DOS-style short mode. If the path
43958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43959  # take no chances and rewrite it.
43960  # Note: m4 eats our [], so we need to use [ and ] instead.
43961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43962  if test "x$has_forbidden_chars" != x; then
43963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43965  fi
43966
43967    # Output is in $new_path
43968
43969  windows_path="$new_path"
43970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43971    unix_path=`$CYGPATH -u "$windows_path"`
43972    new_path="$unix_path"
43973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43975    new_path="$unix_path"
43976  fi
43977
43978    # remove trailing .exe if any
43979    new_path="${new_path/%.exe/}"
43980
43981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43983  fi
43984
43985    else
43986      # We're on a unix platform. Hooray! :)
43987      # First separate the path from the arguments. This will split at the first
43988      # space.
43989      complete="$BUILD_CC"
43990      path="${complete%% *}"
43991      tmp="$complete EOL"
43992      arguments="${tmp#* }"
43993
43994      # Cannot rely on the command "which" here since it doesn't always work.
43995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43996      if test -z "$is_absolute_path"; then
43997        # Path to executable is not absolute. Find it.
43998        IFS_save="$IFS"
43999        IFS=:
44000        for p in $PATH; do
44001          if test -f "$p/$path" && test -x "$p/$path"; then
44002            new_path="$p/$path"
44003            break
44004          fi
44005        done
44006        IFS="$IFS_save"
44007      else
44008        # This is an absolute path, we can use it without further modifications.
44009        new_path="$path"
44010      fi
44011
44012      if test "x$new_path" = x; then
44013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44014$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44015        has_space=`$ECHO "$complete" | $GREP " "`
44016        if test "x$has_space" != x; then
44017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44019        fi
44020        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44021      fi
44022    fi
44023
44024    # Now join together the path and the arguments once again
44025    if test "x$arguments" != xEOL; then
44026      new_complete="$new_path ${arguments% *}"
44027    else
44028      new_complete="$new_path"
44029    fi
44030
44031    if test "x$complete" != "x$new_complete"; then
44032      BUILD_CC="$new_complete"
44033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44034$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44035    fi
44036  fi
44037
44038
44039
44040
44041  # Publish this variable in the help.
44042
44043
44044  if [ -z "${BUILD_CXX+x}" ]; then
44045    # The variable is not set by user, try to locate tool using the code snippet
44046    for ac_prog in cl CC g++
44047do
44048  # Extract the first word of "$ac_prog", so it can be a program name with args.
44049set dummy $ac_prog; ac_word=$2
44050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44051$as_echo_n "checking for $ac_word... " >&6; }
44052if ${ac_cv_path_BUILD_CXX+:} false; then :
44053  $as_echo_n "(cached) " >&6
44054else
44055  case $BUILD_CXX in
44056  [\\/]* | ?:[\\/]*)
44057  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44058  ;;
44059  *)
44060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44061for as_dir in $PATH
44062do
44063  IFS=$as_save_IFS
44064  test -z "$as_dir" && as_dir=.
44065    for ac_exec_ext in '' $ac_executable_extensions; do
44066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44067    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44069    break 2
44070  fi
44071done
44072  done
44073IFS=$as_save_IFS
44074
44075  ;;
44076esac
44077fi
44078BUILD_CXX=$ac_cv_path_BUILD_CXX
44079if test -n "$BUILD_CXX"; then
44080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44081$as_echo "$BUILD_CXX" >&6; }
44082else
44083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44084$as_echo "no" >&6; }
44085fi
44086
44087
44088  test -n "$BUILD_CXX" && break
44089done
44090
44091  else
44092    # The variable is set, but is it from the command line or the environment?
44093
44094    # Try to remove the string !BUILD_CXX! from our list.
44095    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44096    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44097      # If it failed, the variable was not from the command line. Ignore it,
44098      # but warn the user (except for BASH, which is always set by the calling BASH).
44099      if test "xBUILD_CXX" != xBASH; then
44100        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44101$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44102      fi
44103      # Try to locate tool using the code snippet
44104      for ac_prog in cl CC g++
44105do
44106  # Extract the first word of "$ac_prog", so it can be a program name with args.
44107set dummy $ac_prog; ac_word=$2
44108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44109$as_echo_n "checking for $ac_word... " >&6; }
44110if ${ac_cv_path_BUILD_CXX+:} false; then :
44111  $as_echo_n "(cached) " >&6
44112else
44113  case $BUILD_CXX in
44114  [\\/]* | ?:[\\/]*)
44115  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44116  ;;
44117  *)
44118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44119for as_dir in $PATH
44120do
44121  IFS=$as_save_IFS
44122  test -z "$as_dir" && as_dir=.
44123    for ac_exec_ext in '' $ac_executable_extensions; do
44124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44125    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44127    break 2
44128  fi
44129done
44130  done
44131IFS=$as_save_IFS
44132
44133  ;;
44134esac
44135fi
44136BUILD_CXX=$ac_cv_path_BUILD_CXX
44137if test -n "$BUILD_CXX"; then
44138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44139$as_echo "$BUILD_CXX" >&6; }
44140else
44141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44142$as_echo "no" >&6; }
44143fi
44144
44145
44146  test -n "$BUILD_CXX" && break
44147done
44148
44149    else
44150      # If it succeeded, then it was overridden by the user. We will use it
44151      # for the tool.
44152
44153      # First remove it from the list of overridden variables, so we can test
44154      # for unknown variables in the end.
44155      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44156
44157      # Check if we try to supply an empty value
44158      if test "x$BUILD_CXX" = x; then
44159        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44160$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44162$as_echo_n "checking for BUILD_CXX... " >&6; }
44163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44164$as_echo "disabled" >&6; }
44165      else
44166        # Check if the provided tool contains a complete path.
44167        tool_specified="$BUILD_CXX"
44168        tool_basename="${tool_specified##*/}"
44169        if test "x$tool_basename" = "x$tool_specified"; then
44170          # A command without a complete path is provided, search $PATH.
44171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44172$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44173          # Extract the first word of "$tool_basename", so it can be a program name with args.
44174set dummy $tool_basename; ac_word=$2
44175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44176$as_echo_n "checking for $ac_word... " >&6; }
44177if ${ac_cv_path_BUILD_CXX+:} false; then :
44178  $as_echo_n "(cached) " >&6
44179else
44180  case $BUILD_CXX in
44181  [\\/]* | ?:[\\/]*)
44182  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44183  ;;
44184  *)
44185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44186for as_dir in $PATH
44187do
44188  IFS=$as_save_IFS
44189  test -z "$as_dir" && as_dir=.
44190    for ac_exec_ext in '' $ac_executable_extensions; do
44191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44192    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44194    break 2
44195  fi
44196done
44197  done
44198IFS=$as_save_IFS
44199
44200  ;;
44201esac
44202fi
44203BUILD_CXX=$ac_cv_path_BUILD_CXX
44204if test -n "$BUILD_CXX"; then
44205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44206$as_echo "$BUILD_CXX" >&6; }
44207else
44208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44209$as_echo "no" >&6; }
44210fi
44211
44212
44213          if test "x$BUILD_CXX" = x; then
44214            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44215          fi
44216        else
44217          # Otherwise we believe it is a complete path. Use it as it is.
44218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44219$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44220          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44221$as_echo_n "checking for BUILD_CXX... " >&6; }
44222          if test ! -x "$tool_specified"; then
44223            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44224$as_echo "not found" >&6; }
44225            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44226          fi
44227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44228$as_echo "$tool_specified" >&6; }
44229        fi
44230      fi
44231    fi
44232
44233  fi
44234
44235
44236
44237  if test "x$BUILD_CXX" = x; then
44238    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44239  fi
44240
44241
44242
44243  # Only process if variable expands to non-empty
44244
44245  if test "x$BUILD_CXX" != x; then
44246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44247
44248  # First separate the path from the arguments. This will split at the first
44249  # space.
44250  complete="$BUILD_CXX"
44251  path="${complete%% *}"
44252  tmp="$complete EOL"
44253  arguments="${tmp#* }"
44254
44255  # Input might be given as Windows format, start by converting to
44256  # unix format.
44257  new_path=`$CYGPATH -u "$path"`
44258
44259  # Now try to locate executable using which
44260  new_path=`$WHICH "$new_path" 2> /dev/null`
44261  # bat and cmd files are not always considered executable in cygwin causing which
44262  # to not find them
44263  if test "x$new_path" = x \
44264      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44265      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44266    new_path=`$CYGPATH -u "$path"`
44267  fi
44268  if test "x$new_path" = x; then
44269    # Oops. Which didn't find the executable.
44270    # The splitting of arguments from the executable at a space might have been incorrect,
44271    # since paths with space are more likely in Windows. Give it another try with the whole
44272    # argument.
44273    path="$complete"
44274    arguments="EOL"
44275    new_path=`$CYGPATH -u "$path"`
44276    new_path=`$WHICH "$new_path" 2> /dev/null`
44277    # bat and cmd files are not always considered executable in cygwin causing which
44278    # to not find them
44279    if test "x$new_path" = x \
44280        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44281        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44282      new_path=`$CYGPATH -u "$path"`
44283    fi
44284    if test "x$new_path" = x; then
44285      # It's still not found. Now this is an unrecoverable error.
44286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44287$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44288      has_space=`$ECHO "$complete" | $GREP " "`
44289      if test "x$has_space" != x; then
44290        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44291$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44292      fi
44293      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44294    fi
44295  fi
44296
44297  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44298  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44299  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44300  # "foo.exe" is OK but "foo" is an error.
44301  #
44302  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44303  # It is also a way to make sure we got the proper file name for the real test later on.
44304  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44305  if test "x$test_shortpath" = x; then
44306    # Short path failed, file does not exist as specified.
44307    # Try adding .exe or .cmd
44308    if test -f "${new_path}.exe"; then
44309      input_to_shortpath="${new_path}.exe"
44310    elif test -f "${new_path}.cmd"; then
44311      input_to_shortpath="${new_path}.cmd"
44312    else
44313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44314$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44315      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44316$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44317      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44318    fi
44319  else
44320    input_to_shortpath="$new_path"
44321  fi
44322
44323  # Call helper function which possibly converts this using DOS-style short mode.
44324  # If so, the updated path is stored in $new_path.
44325  new_path="$input_to_shortpath"
44326
44327  input_path="$input_to_shortpath"
44328  # Check if we need to convert this using DOS-style short mode. If the path
44329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44330  # take no chances and rewrite it.
44331  # Note: m4 eats our [], so we need to use [ and ] instead.
44332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44333  if test "x$has_forbidden_chars" != x; then
44334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44338      # Going to short mode and back again did indeed matter. Since short mode is
44339      # case insensitive, let's make it lowercase to improve readability.
44340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44341      # Now convert it back to Unix-style (cygpath)
44342      input_path=`$CYGPATH -u "$shortmode_path"`
44343      new_path="$input_path"
44344    fi
44345  fi
44346
44347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44348  if test "x$test_cygdrive_prefix" = x; then
44349    # As a simple fix, exclude /usr/bin since it's not a real path.
44350    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44352      # a path prefixed by /cygdrive for fixpath to work.
44353      new_path="$CYGWIN_ROOT_PATH$input_path"
44354    fi
44355  fi
44356
44357  # remove trailing .exe if any
44358  new_path="${new_path/%.exe/}"
44359
44360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44361
44362  # First separate the path from the arguments. This will split at the first
44363  # space.
44364  complete="$BUILD_CXX"
44365  path="${complete%% *}"
44366  tmp="$complete EOL"
44367  arguments="${tmp#* }"
44368
44369  # Input might be given as Windows format, start by converting to
44370  # unix format.
44371  new_path="$path"
44372
44373  windows_path="$new_path"
44374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44375    unix_path=`$CYGPATH -u "$windows_path"`
44376    new_path="$unix_path"
44377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44379    new_path="$unix_path"
44380  fi
44381
44382
44383  # Now try to locate executable using which
44384  new_path=`$WHICH "$new_path" 2> /dev/null`
44385
44386  if test "x$new_path" = x; then
44387    # Oops. Which didn't find the executable.
44388    # The splitting of arguments from the executable at a space might have been incorrect,
44389    # since paths with space are more likely in Windows. Give it another try with the whole
44390    # argument.
44391    path="$complete"
44392    arguments="EOL"
44393    new_path="$path"
44394
44395  windows_path="$new_path"
44396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44397    unix_path=`$CYGPATH -u "$windows_path"`
44398    new_path="$unix_path"
44399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44401    new_path="$unix_path"
44402  fi
44403
44404
44405    new_path=`$WHICH "$new_path" 2> /dev/null`
44406    # bat and cmd files are not always considered executable in MSYS causing which
44407    # to not find them
44408    if test "x$new_path" = x \
44409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44411      new_path="$path"
44412
44413  windows_path="$new_path"
44414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44415    unix_path=`$CYGPATH -u "$windows_path"`
44416    new_path="$unix_path"
44417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44419    new_path="$unix_path"
44420  fi
44421
44422    fi
44423
44424    if test "x$new_path" = x; then
44425      # It's still not found. Now this is an unrecoverable error.
44426      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44427$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44428      has_space=`$ECHO "$complete" | $GREP " "`
44429      if test "x$has_space" != x; then
44430        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44431$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44432      fi
44433      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44434    fi
44435  fi
44436
44437  # Now new_path has a complete unix path to the binary
44438  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44439    # Keep paths in /bin as-is, but remove trailing .exe if any
44440    new_path="${new_path/%.exe/}"
44441    # Do not save /bin paths to all_fixpath_prefixes!
44442  else
44443    # Not in mixed or Windows style, start by that.
44444    new_path=`cmd //c echo $new_path`
44445
44446  input_path="$new_path"
44447  # Check if we need to convert this using DOS-style short mode. If the path
44448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44449  # take no chances and rewrite it.
44450  # Note: m4 eats our [], so we need to use [ and ] instead.
44451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44452  if test "x$has_forbidden_chars" != x; then
44453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44455  fi
44456
44457    # Output is in $new_path
44458
44459  windows_path="$new_path"
44460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44461    unix_path=`$CYGPATH -u "$windows_path"`
44462    new_path="$unix_path"
44463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44465    new_path="$unix_path"
44466  fi
44467
44468    # remove trailing .exe if any
44469    new_path="${new_path/%.exe/}"
44470
44471    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44472    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44473  fi
44474
44475    else
44476      # We're on a unix platform. Hooray! :)
44477      # First separate the path from the arguments. This will split at the first
44478      # space.
44479      complete="$BUILD_CXX"
44480      path="${complete%% *}"
44481      tmp="$complete EOL"
44482      arguments="${tmp#* }"
44483
44484      # Cannot rely on the command "which" here since it doesn't always work.
44485      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44486      if test -z "$is_absolute_path"; then
44487        # Path to executable is not absolute. Find it.
44488        IFS_save="$IFS"
44489        IFS=:
44490        for p in $PATH; do
44491          if test -f "$p/$path" && test -x "$p/$path"; then
44492            new_path="$p/$path"
44493            break
44494          fi
44495        done
44496        IFS="$IFS_save"
44497      else
44498        # This is an absolute path, we can use it without further modifications.
44499        new_path="$path"
44500      fi
44501
44502      if test "x$new_path" = x; then
44503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44504$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44505        has_space=`$ECHO "$complete" | $GREP " "`
44506        if test "x$has_space" != x; then
44507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44509        fi
44510        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44511      fi
44512    fi
44513
44514    # Now join together the path and the arguments once again
44515    if test "x$arguments" != xEOL; then
44516      new_complete="$new_path ${arguments% *}"
44517    else
44518      new_complete="$new_path"
44519    fi
44520
44521    if test "x$complete" != "x$new_complete"; then
44522      BUILD_CXX="$new_complete"
44523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44524$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44525    fi
44526  fi
44527
44528
44529
44530  # Publish this variable in the help.
44531
44532
44533  if [ -z "${BUILD_NM+x}" ]; then
44534    # The variable is not set by user, try to locate tool using the code snippet
44535    for ac_prog in nm gcc-nm
44536do
44537  # Extract the first word of "$ac_prog", so it can be a program name with args.
44538set dummy $ac_prog; ac_word=$2
44539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44540$as_echo_n "checking for $ac_word... " >&6; }
44541if ${ac_cv_path_BUILD_NM+:} false; then :
44542  $as_echo_n "(cached) " >&6
44543else
44544  case $BUILD_NM in
44545  [\\/]* | ?:[\\/]*)
44546  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44547  ;;
44548  *)
44549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44550for as_dir in $PATH
44551do
44552  IFS=$as_save_IFS
44553  test -z "$as_dir" && as_dir=.
44554    for ac_exec_ext in '' $ac_executable_extensions; do
44555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44556    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44558    break 2
44559  fi
44560done
44561  done
44562IFS=$as_save_IFS
44563
44564  ;;
44565esac
44566fi
44567BUILD_NM=$ac_cv_path_BUILD_NM
44568if test -n "$BUILD_NM"; then
44569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44570$as_echo "$BUILD_NM" >&6; }
44571else
44572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44573$as_echo "no" >&6; }
44574fi
44575
44576
44577  test -n "$BUILD_NM" && break
44578done
44579
44580  else
44581    # The variable is set, but is it from the command line or the environment?
44582
44583    # Try to remove the string !BUILD_NM! from our list.
44584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44586      # If it failed, the variable was not from the command line. Ignore it,
44587      # but warn the user (except for BASH, which is always set by the calling BASH).
44588      if test "xBUILD_NM" != xBASH; then
44589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44590$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44591      fi
44592      # Try to locate tool using the code snippet
44593      for ac_prog in nm gcc-nm
44594do
44595  # Extract the first word of "$ac_prog", so it can be a program name with args.
44596set dummy $ac_prog; ac_word=$2
44597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44598$as_echo_n "checking for $ac_word... " >&6; }
44599if ${ac_cv_path_BUILD_NM+:} false; then :
44600  $as_echo_n "(cached) " >&6
44601else
44602  case $BUILD_NM in
44603  [\\/]* | ?:[\\/]*)
44604  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44605  ;;
44606  *)
44607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44608for as_dir in $PATH
44609do
44610  IFS=$as_save_IFS
44611  test -z "$as_dir" && as_dir=.
44612    for ac_exec_ext in '' $ac_executable_extensions; do
44613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44614    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44616    break 2
44617  fi
44618done
44619  done
44620IFS=$as_save_IFS
44621
44622  ;;
44623esac
44624fi
44625BUILD_NM=$ac_cv_path_BUILD_NM
44626if test -n "$BUILD_NM"; then
44627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44628$as_echo "$BUILD_NM" >&6; }
44629else
44630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44631$as_echo "no" >&6; }
44632fi
44633
44634
44635  test -n "$BUILD_NM" && break
44636done
44637
44638    else
44639      # If it succeeded, then it was overridden by the user. We will use it
44640      # for the tool.
44641
44642      # First remove it from the list of overridden variables, so we can test
44643      # for unknown variables in the end.
44644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44645
44646      # Check if we try to supply an empty value
44647      if test "x$BUILD_NM" = x; then
44648        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44649$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44650        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44651$as_echo_n "checking for BUILD_NM... " >&6; }
44652        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44653$as_echo "disabled" >&6; }
44654      else
44655        # Check if the provided tool contains a complete path.
44656        tool_specified="$BUILD_NM"
44657        tool_basename="${tool_specified##*/}"
44658        if test "x$tool_basename" = "x$tool_specified"; then
44659          # A command without a complete path is provided, search $PATH.
44660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44661$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44662          # Extract the first word of "$tool_basename", so it can be a program name with args.
44663set dummy $tool_basename; ac_word=$2
44664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44665$as_echo_n "checking for $ac_word... " >&6; }
44666if ${ac_cv_path_BUILD_NM+:} false; then :
44667  $as_echo_n "(cached) " >&6
44668else
44669  case $BUILD_NM in
44670  [\\/]* | ?:[\\/]*)
44671  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44672  ;;
44673  *)
44674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44675for as_dir in $PATH
44676do
44677  IFS=$as_save_IFS
44678  test -z "$as_dir" && as_dir=.
44679    for ac_exec_ext in '' $ac_executable_extensions; do
44680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44681    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44683    break 2
44684  fi
44685done
44686  done
44687IFS=$as_save_IFS
44688
44689  ;;
44690esac
44691fi
44692BUILD_NM=$ac_cv_path_BUILD_NM
44693if test -n "$BUILD_NM"; then
44694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44695$as_echo "$BUILD_NM" >&6; }
44696else
44697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44698$as_echo "no" >&6; }
44699fi
44700
44701
44702          if test "x$BUILD_NM" = x; then
44703            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44704          fi
44705        else
44706          # Otherwise we believe it is a complete path. Use it as it is.
44707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44708$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44709          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44710$as_echo_n "checking for BUILD_NM... " >&6; }
44711          if test ! -x "$tool_specified"; then
44712            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44713$as_echo "not found" >&6; }
44714            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44715          fi
44716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44717$as_echo "$tool_specified" >&6; }
44718        fi
44719      fi
44720    fi
44721
44722  fi
44723
44724
44725
44726  # Only process if variable expands to non-empty
44727
44728  if test "x$BUILD_NM" != x; then
44729    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44730
44731  # First separate the path from the arguments. This will split at the first
44732  # space.
44733  complete="$BUILD_NM"
44734  path="${complete%% *}"
44735  tmp="$complete EOL"
44736  arguments="${tmp#* }"
44737
44738  # Input might be given as Windows format, start by converting to
44739  # unix format.
44740  new_path=`$CYGPATH -u "$path"`
44741
44742  # Now try to locate executable using which
44743  new_path=`$WHICH "$new_path" 2> /dev/null`
44744  # bat and cmd files are not always considered executable in cygwin causing which
44745  # to not find them
44746  if test "x$new_path" = x \
44747      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44748      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44749    new_path=`$CYGPATH -u "$path"`
44750  fi
44751  if test "x$new_path" = x; then
44752    # Oops. Which didn't find the executable.
44753    # The splitting of arguments from the executable at a space might have been incorrect,
44754    # since paths with space are more likely in Windows. Give it another try with the whole
44755    # argument.
44756    path="$complete"
44757    arguments="EOL"
44758    new_path=`$CYGPATH -u "$path"`
44759    new_path=`$WHICH "$new_path" 2> /dev/null`
44760    # bat and cmd files are not always considered executable in cygwin causing which
44761    # to not find them
44762    if test "x$new_path" = x \
44763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44765      new_path=`$CYGPATH -u "$path"`
44766    fi
44767    if test "x$new_path" = x; then
44768      # It's still not found. Now this is an unrecoverable error.
44769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44770$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44771      has_space=`$ECHO "$complete" | $GREP " "`
44772      if test "x$has_space" != x; then
44773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44775      fi
44776      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44777    fi
44778  fi
44779
44780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44783  # "foo.exe" is OK but "foo" is an error.
44784  #
44785  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44786  # It is also a way to make sure we got the proper file name for the real test later on.
44787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44788  if test "x$test_shortpath" = x; then
44789    # Short path failed, file does not exist as specified.
44790    # Try adding .exe or .cmd
44791    if test -f "${new_path}.exe"; then
44792      input_to_shortpath="${new_path}.exe"
44793    elif test -f "${new_path}.cmd"; then
44794      input_to_shortpath="${new_path}.cmd"
44795    else
44796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44797$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44798      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44799$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44800      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44801    fi
44802  else
44803    input_to_shortpath="$new_path"
44804  fi
44805
44806  # Call helper function which possibly converts this using DOS-style short mode.
44807  # If so, the updated path is stored in $new_path.
44808  new_path="$input_to_shortpath"
44809
44810  input_path="$input_to_shortpath"
44811  # Check if we need to convert this using DOS-style short mode. If the path
44812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44813  # take no chances and rewrite it.
44814  # Note: m4 eats our [], so we need to use [ and ] instead.
44815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44816  if test "x$has_forbidden_chars" != x; then
44817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44821      # Going to short mode and back again did indeed matter. Since short mode is
44822      # case insensitive, let's make it lowercase to improve readability.
44823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44824      # Now convert it back to Unix-style (cygpath)
44825      input_path=`$CYGPATH -u "$shortmode_path"`
44826      new_path="$input_path"
44827    fi
44828  fi
44829
44830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44831  if test "x$test_cygdrive_prefix" = x; then
44832    # As a simple fix, exclude /usr/bin since it's not a real path.
44833    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44835      # a path prefixed by /cygdrive for fixpath to work.
44836      new_path="$CYGWIN_ROOT_PATH$input_path"
44837    fi
44838  fi
44839
44840  # remove trailing .exe if any
44841  new_path="${new_path/%.exe/}"
44842
44843    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44844
44845  # First separate the path from the arguments. This will split at the first
44846  # space.
44847  complete="$BUILD_NM"
44848  path="${complete%% *}"
44849  tmp="$complete EOL"
44850  arguments="${tmp#* }"
44851
44852  # Input might be given as Windows format, start by converting to
44853  # unix format.
44854  new_path="$path"
44855
44856  windows_path="$new_path"
44857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44858    unix_path=`$CYGPATH -u "$windows_path"`
44859    new_path="$unix_path"
44860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44862    new_path="$unix_path"
44863  fi
44864
44865
44866  # Now try to locate executable using which
44867  new_path=`$WHICH "$new_path" 2> /dev/null`
44868
44869  if test "x$new_path" = x; then
44870    # Oops. Which didn't find the executable.
44871    # The splitting of arguments from the executable at a space might have been incorrect,
44872    # since paths with space are more likely in Windows. Give it another try with the whole
44873    # argument.
44874    path="$complete"
44875    arguments="EOL"
44876    new_path="$path"
44877
44878  windows_path="$new_path"
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880    unix_path=`$CYGPATH -u "$windows_path"`
44881    new_path="$unix_path"
44882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44884    new_path="$unix_path"
44885  fi
44886
44887
44888    new_path=`$WHICH "$new_path" 2> /dev/null`
44889    # bat and cmd files are not always considered executable in MSYS causing which
44890    # to not find them
44891    if test "x$new_path" = x \
44892        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44893        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44894      new_path="$path"
44895
44896  windows_path="$new_path"
44897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44898    unix_path=`$CYGPATH -u "$windows_path"`
44899    new_path="$unix_path"
44900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44902    new_path="$unix_path"
44903  fi
44904
44905    fi
44906
44907    if test "x$new_path" = x; then
44908      # It's still not found. Now this is an unrecoverable error.
44909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44910$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44911      has_space=`$ECHO "$complete" | $GREP " "`
44912      if test "x$has_space" != x; then
44913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44915      fi
44916      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44917    fi
44918  fi
44919
44920  # Now new_path has a complete unix path to the binary
44921  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44922    # Keep paths in /bin as-is, but remove trailing .exe if any
44923    new_path="${new_path/%.exe/}"
44924    # Do not save /bin paths to all_fixpath_prefixes!
44925  else
44926    # Not in mixed or Windows style, start by that.
44927    new_path=`cmd //c echo $new_path`
44928
44929  input_path="$new_path"
44930  # Check if we need to convert this using DOS-style short mode. If the path
44931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44932  # take no chances and rewrite it.
44933  # Note: m4 eats our [], so we need to use [ and ] instead.
44934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44935  if test "x$has_forbidden_chars" != x; then
44936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44938  fi
44939
44940    # Output is in $new_path
44941
44942  windows_path="$new_path"
44943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44944    unix_path=`$CYGPATH -u "$windows_path"`
44945    new_path="$unix_path"
44946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44948    new_path="$unix_path"
44949  fi
44950
44951    # remove trailing .exe if any
44952    new_path="${new_path/%.exe/}"
44953
44954    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44955    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44956  fi
44957
44958    else
44959      # We're on a unix platform. Hooray! :)
44960      # First separate the path from the arguments. This will split at the first
44961      # space.
44962      complete="$BUILD_NM"
44963      path="${complete%% *}"
44964      tmp="$complete EOL"
44965      arguments="${tmp#* }"
44966
44967      # Cannot rely on the command "which" here since it doesn't always work.
44968      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44969      if test -z "$is_absolute_path"; then
44970        # Path to executable is not absolute. Find it.
44971        IFS_save="$IFS"
44972        IFS=:
44973        for p in $PATH; do
44974          if test -f "$p/$path" && test -x "$p/$path"; then
44975            new_path="$p/$path"
44976            break
44977          fi
44978        done
44979        IFS="$IFS_save"
44980      else
44981        # This is an absolute path, we can use it without further modifications.
44982        new_path="$path"
44983      fi
44984
44985      if test "x$new_path" = x; then
44986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44987$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44988        has_space=`$ECHO "$complete" | $GREP " "`
44989        if test "x$has_space" != x; then
44990          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44991$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44992        fi
44993        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44994      fi
44995    fi
44996
44997    # Now join together the path and the arguments once again
44998    if test "x$arguments" != xEOL; then
44999      new_complete="$new_path ${arguments% *}"
45000    else
45001      new_complete="$new_path"
45002    fi
45003
45004    if test "x$complete" != "x$new_complete"; then
45005      BUILD_NM="$new_complete"
45006      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45007$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45008    fi
45009  fi
45010
45011
45012
45013  # Publish this variable in the help.
45014
45015
45016  if [ -z "${BUILD_AR+x}" ]; then
45017    # The variable is not set by user, try to locate tool using the code snippet
45018    for ac_prog in ar gcc-ar
45019do
45020  # Extract the first word of "$ac_prog", so it can be a program name with args.
45021set dummy $ac_prog; ac_word=$2
45022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45023$as_echo_n "checking for $ac_word... " >&6; }
45024if ${ac_cv_path_BUILD_AR+:} false; then :
45025  $as_echo_n "(cached) " >&6
45026else
45027  case $BUILD_AR in
45028  [\\/]* | ?:[\\/]*)
45029  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45030  ;;
45031  *)
45032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45033for as_dir in $PATH
45034do
45035  IFS=$as_save_IFS
45036  test -z "$as_dir" && as_dir=.
45037    for ac_exec_ext in '' $ac_executable_extensions; do
45038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45039    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45041    break 2
45042  fi
45043done
45044  done
45045IFS=$as_save_IFS
45046
45047  ;;
45048esac
45049fi
45050BUILD_AR=$ac_cv_path_BUILD_AR
45051if test -n "$BUILD_AR"; then
45052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45053$as_echo "$BUILD_AR" >&6; }
45054else
45055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45056$as_echo "no" >&6; }
45057fi
45058
45059
45060  test -n "$BUILD_AR" && break
45061done
45062
45063  else
45064    # The variable is set, but is it from the command line or the environment?
45065
45066    # Try to remove the string !BUILD_AR! from our list.
45067    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45068    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45069      # If it failed, the variable was not from the command line. Ignore it,
45070      # but warn the user (except for BASH, which is always set by the calling BASH).
45071      if test "xBUILD_AR" != xBASH; then
45072        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45073$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45074      fi
45075      # Try to locate tool using the code snippet
45076      for ac_prog in ar gcc-ar
45077do
45078  # Extract the first word of "$ac_prog", so it can be a program name with args.
45079set dummy $ac_prog; ac_word=$2
45080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45081$as_echo_n "checking for $ac_word... " >&6; }
45082if ${ac_cv_path_BUILD_AR+:} false; then :
45083  $as_echo_n "(cached) " >&6
45084else
45085  case $BUILD_AR in
45086  [\\/]* | ?:[\\/]*)
45087  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45088  ;;
45089  *)
45090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45091for as_dir in $PATH
45092do
45093  IFS=$as_save_IFS
45094  test -z "$as_dir" && as_dir=.
45095    for ac_exec_ext in '' $ac_executable_extensions; do
45096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45097    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45099    break 2
45100  fi
45101done
45102  done
45103IFS=$as_save_IFS
45104
45105  ;;
45106esac
45107fi
45108BUILD_AR=$ac_cv_path_BUILD_AR
45109if test -n "$BUILD_AR"; then
45110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45111$as_echo "$BUILD_AR" >&6; }
45112else
45113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45114$as_echo "no" >&6; }
45115fi
45116
45117
45118  test -n "$BUILD_AR" && break
45119done
45120
45121    else
45122      # If it succeeded, then it was overridden by the user. We will use it
45123      # for the tool.
45124
45125      # First remove it from the list of overridden variables, so we can test
45126      # for unknown variables in the end.
45127      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45128
45129      # Check if we try to supply an empty value
45130      if test "x$BUILD_AR" = x; then
45131        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45132$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45134$as_echo_n "checking for BUILD_AR... " >&6; }
45135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45136$as_echo "disabled" >&6; }
45137      else
45138        # Check if the provided tool contains a complete path.
45139        tool_specified="$BUILD_AR"
45140        tool_basename="${tool_specified##*/}"
45141        if test "x$tool_basename" = "x$tool_specified"; then
45142          # A command without a complete path is provided, search $PATH.
45143          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45144$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45145          # Extract the first word of "$tool_basename", so it can be a program name with args.
45146set dummy $tool_basename; ac_word=$2
45147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45148$as_echo_n "checking for $ac_word... " >&6; }
45149if ${ac_cv_path_BUILD_AR+:} false; then :
45150  $as_echo_n "(cached) " >&6
45151else
45152  case $BUILD_AR in
45153  [\\/]* | ?:[\\/]*)
45154  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45155  ;;
45156  *)
45157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45158for as_dir in $PATH
45159do
45160  IFS=$as_save_IFS
45161  test -z "$as_dir" && as_dir=.
45162    for ac_exec_ext in '' $ac_executable_extensions; do
45163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45164    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45166    break 2
45167  fi
45168done
45169  done
45170IFS=$as_save_IFS
45171
45172  ;;
45173esac
45174fi
45175BUILD_AR=$ac_cv_path_BUILD_AR
45176if test -n "$BUILD_AR"; then
45177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45178$as_echo "$BUILD_AR" >&6; }
45179else
45180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45181$as_echo "no" >&6; }
45182fi
45183
45184
45185          if test "x$BUILD_AR" = x; then
45186            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45187          fi
45188        else
45189          # Otherwise we believe it is a complete path. Use it as it is.
45190          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45191$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45192          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45193$as_echo_n "checking for BUILD_AR... " >&6; }
45194          if test ! -x "$tool_specified"; then
45195            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45196$as_echo "not found" >&6; }
45197            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45198          fi
45199          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45200$as_echo "$tool_specified" >&6; }
45201        fi
45202      fi
45203    fi
45204
45205  fi
45206
45207
45208
45209  # Only process if variable expands to non-empty
45210
45211  if test "x$BUILD_AR" != x; then
45212    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45213
45214  # First separate the path from the arguments. This will split at the first
45215  # space.
45216  complete="$BUILD_AR"
45217  path="${complete%% *}"
45218  tmp="$complete EOL"
45219  arguments="${tmp#* }"
45220
45221  # Input might be given as Windows format, start by converting to
45222  # unix format.
45223  new_path=`$CYGPATH -u "$path"`
45224
45225  # Now try to locate executable using which
45226  new_path=`$WHICH "$new_path" 2> /dev/null`
45227  # bat and cmd files are not always considered executable in cygwin causing which
45228  # to not find them
45229  if test "x$new_path" = x \
45230      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45231      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45232    new_path=`$CYGPATH -u "$path"`
45233  fi
45234  if test "x$new_path" = x; then
45235    # Oops. Which didn't find the executable.
45236    # The splitting of arguments from the executable at a space might have been incorrect,
45237    # since paths with space are more likely in Windows. Give it another try with the whole
45238    # argument.
45239    path="$complete"
45240    arguments="EOL"
45241    new_path=`$CYGPATH -u "$path"`
45242    new_path=`$WHICH "$new_path" 2> /dev/null`
45243    # bat and cmd files are not always considered executable in cygwin causing which
45244    # to not find them
45245    if test "x$new_path" = x \
45246        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45247        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45248      new_path=`$CYGPATH -u "$path"`
45249    fi
45250    if test "x$new_path" = x; then
45251      # It's still not found. Now this is an unrecoverable error.
45252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45253$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45254      has_space=`$ECHO "$complete" | $GREP " "`
45255      if test "x$has_space" != x; then
45256        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45257$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45258      fi
45259      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45260    fi
45261  fi
45262
45263  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45264  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45265  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45266  # "foo.exe" is OK but "foo" is an error.
45267  #
45268  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45269  # It is also a way to make sure we got the proper file name for the real test later on.
45270  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45271  if test "x$test_shortpath" = x; then
45272    # Short path failed, file does not exist as specified.
45273    # Try adding .exe or .cmd
45274    if test -f "${new_path}.exe"; then
45275      input_to_shortpath="${new_path}.exe"
45276    elif test -f "${new_path}.cmd"; then
45277      input_to_shortpath="${new_path}.cmd"
45278    else
45279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45280$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45281      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45282$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45283      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45284    fi
45285  else
45286    input_to_shortpath="$new_path"
45287  fi
45288
45289  # Call helper function which possibly converts this using DOS-style short mode.
45290  # If so, the updated path is stored in $new_path.
45291  new_path="$input_to_shortpath"
45292
45293  input_path="$input_to_shortpath"
45294  # Check if we need to convert this using DOS-style short mode. If the path
45295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45296  # take no chances and rewrite it.
45297  # Note: m4 eats our [], so we need to use [ and ] instead.
45298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45299  if test "x$has_forbidden_chars" != x; then
45300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45301    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45302    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45303    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45304      # Going to short mode and back again did indeed matter. Since short mode is
45305      # case insensitive, let's make it lowercase to improve readability.
45306      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45307      # Now convert it back to Unix-style (cygpath)
45308      input_path=`$CYGPATH -u "$shortmode_path"`
45309      new_path="$input_path"
45310    fi
45311  fi
45312
45313  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45314  if test "x$test_cygdrive_prefix" = x; then
45315    # As a simple fix, exclude /usr/bin since it's not a real path.
45316    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45317      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45318      # a path prefixed by /cygdrive for fixpath to work.
45319      new_path="$CYGWIN_ROOT_PATH$input_path"
45320    fi
45321  fi
45322
45323  # remove trailing .exe if any
45324  new_path="${new_path/%.exe/}"
45325
45326    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45327
45328  # First separate the path from the arguments. This will split at the first
45329  # space.
45330  complete="$BUILD_AR"
45331  path="${complete%% *}"
45332  tmp="$complete EOL"
45333  arguments="${tmp#* }"
45334
45335  # Input might be given as Windows format, start by converting to
45336  # unix format.
45337  new_path="$path"
45338
45339  windows_path="$new_path"
45340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45341    unix_path=`$CYGPATH -u "$windows_path"`
45342    new_path="$unix_path"
45343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45345    new_path="$unix_path"
45346  fi
45347
45348
45349  # Now try to locate executable using which
45350  new_path=`$WHICH "$new_path" 2> /dev/null`
45351
45352  if test "x$new_path" = x; then
45353    # Oops. Which didn't find the executable.
45354    # The splitting of arguments from the executable at a space might have been incorrect,
45355    # since paths with space are more likely in Windows. Give it another try with the whole
45356    # argument.
45357    path="$complete"
45358    arguments="EOL"
45359    new_path="$path"
45360
45361  windows_path="$new_path"
45362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45363    unix_path=`$CYGPATH -u "$windows_path"`
45364    new_path="$unix_path"
45365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45367    new_path="$unix_path"
45368  fi
45369
45370
45371    new_path=`$WHICH "$new_path" 2> /dev/null`
45372    # bat and cmd files are not always considered executable in MSYS causing which
45373    # to not find them
45374    if test "x$new_path" = x \
45375        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45376        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45377      new_path="$path"
45378
45379  windows_path="$new_path"
45380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45381    unix_path=`$CYGPATH -u "$windows_path"`
45382    new_path="$unix_path"
45383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45385    new_path="$unix_path"
45386  fi
45387
45388    fi
45389
45390    if test "x$new_path" = x; then
45391      # It's still not found. Now this is an unrecoverable error.
45392      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45393$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45394      has_space=`$ECHO "$complete" | $GREP " "`
45395      if test "x$has_space" != x; then
45396        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45397$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45398      fi
45399      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45400    fi
45401  fi
45402
45403  # Now new_path has a complete unix path to the binary
45404  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45405    # Keep paths in /bin as-is, but remove trailing .exe if any
45406    new_path="${new_path/%.exe/}"
45407    # Do not save /bin paths to all_fixpath_prefixes!
45408  else
45409    # Not in mixed or Windows style, start by that.
45410    new_path=`cmd //c echo $new_path`
45411
45412  input_path="$new_path"
45413  # Check if we need to convert this using DOS-style short mode. If the path
45414  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45415  # take no chances and rewrite it.
45416  # Note: m4 eats our [], so we need to use [ and ] instead.
45417  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45418  if test "x$has_forbidden_chars" != x; then
45419    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45420    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45421  fi
45422
45423    # Output is in $new_path
45424
45425  windows_path="$new_path"
45426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45427    unix_path=`$CYGPATH -u "$windows_path"`
45428    new_path="$unix_path"
45429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45431    new_path="$unix_path"
45432  fi
45433
45434    # remove trailing .exe if any
45435    new_path="${new_path/%.exe/}"
45436
45437    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45438    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45439  fi
45440
45441    else
45442      # We're on a unix platform. Hooray! :)
45443      # First separate the path from the arguments. This will split at the first
45444      # space.
45445      complete="$BUILD_AR"
45446      path="${complete%% *}"
45447      tmp="$complete EOL"
45448      arguments="${tmp#* }"
45449
45450      # Cannot rely on the command "which" here since it doesn't always work.
45451      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45452      if test -z "$is_absolute_path"; then
45453        # Path to executable is not absolute. Find it.
45454        IFS_save="$IFS"
45455        IFS=:
45456        for p in $PATH; do
45457          if test -f "$p/$path" && test -x "$p/$path"; then
45458            new_path="$p/$path"
45459            break
45460          fi
45461        done
45462        IFS="$IFS_save"
45463      else
45464        # This is an absolute path, we can use it without further modifications.
45465        new_path="$path"
45466      fi
45467
45468      if test "x$new_path" = x; then
45469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45470$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45471        has_space=`$ECHO "$complete" | $GREP " "`
45472        if test "x$has_space" != x; then
45473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45475        fi
45476        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45477      fi
45478    fi
45479
45480    # Now join together the path and the arguments once again
45481    if test "x$arguments" != xEOL; then
45482      new_complete="$new_path ${arguments% *}"
45483    else
45484      new_complete="$new_path"
45485    fi
45486
45487    if test "x$complete" != "x$new_complete"; then
45488      BUILD_AR="$new_complete"
45489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45490$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45491    fi
45492  fi
45493
45494
45495
45496  # Publish this variable in the help.
45497
45498
45499  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45500    # The variable is not set by user, try to locate tool using the code snippet
45501    for ac_prog in objcopy
45502do
45503  # Extract the first word of "$ac_prog", so it can be a program name with args.
45504set dummy $ac_prog; ac_word=$2
45505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45506$as_echo_n "checking for $ac_word... " >&6; }
45507if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45508  $as_echo_n "(cached) " >&6
45509else
45510  case $BUILD_OBJCOPY in
45511  [\\/]* | ?:[\\/]*)
45512  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45513  ;;
45514  *)
45515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45516for as_dir in $PATH
45517do
45518  IFS=$as_save_IFS
45519  test -z "$as_dir" && as_dir=.
45520    for ac_exec_ext in '' $ac_executable_extensions; do
45521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45522    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45524    break 2
45525  fi
45526done
45527  done
45528IFS=$as_save_IFS
45529
45530  ;;
45531esac
45532fi
45533BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45534if test -n "$BUILD_OBJCOPY"; then
45535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45536$as_echo "$BUILD_OBJCOPY" >&6; }
45537else
45538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45539$as_echo "no" >&6; }
45540fi
45541
45542
45543  test -n "$BUILD_OBJCOPY" && break
45544done
45545
45546  else
45547    # The variable is set, but is it from the command line or the environment?
45548
45549    # Try to remove the string !BUILD_OBJCOPY! from our list.
45550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45552      # If it failed, the variable was not from the command line. Ignore it,
45553      # but warn the user (except for BASH, which is always set by the calling BASH).
45554      if test "xBUILD_OBJCOPY" != xBASH; then
45555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45556$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45557      fi
45558      # Try to locate tool using the code snippet
45559      for ac_prog in objcopy
45560do
45561  # Extract the first word of "$ac_prog", so it can be a program name with args.
45562set dummy $ac_prog; ac_word=$2
45563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45564$as_echo_n "checking for $ac_word... " >&6; }
45565if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45566  $as_echo_n "(cached) " >&6
45567else
45568  case $BUILD_OBJCOPY in
45569  [\\/]* | ?:[\\/]*)
45570  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45571  ;;
45572  *)
45573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45574for as_dir in $PATH
45575do
45576  IFS=$as_save_IFS
45577  test -z "$as_dir" && as_dir=.
45578    for ac_exec_ext in '' $ac_executable_extensions; do
45579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45580    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45582    break 2
45583  fi
45584done
45585  done
45586IFS=$as_save_IFS
45587
45588  ;;
45589esac
45590fi
45591BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45592if test -n "$BUILD_OBJCOPY"; then
45593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45594$as_echo "$BUILD_OBJCOPY" >&6; }
45595else
45596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45597$as_echo "no" >&6; }
45598fi
45599
45600
45601  test -n "$BUILD_OBJCOPY" && break
45602done
45603
45604    else
45605      # If it succeeded, then it was overridden by the user. We will use it
45606      # for the tool.
45607
45608      # First remove it from the list of overridden variables, so we can test
45609      # for unknown variables in the end.
45610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45611
45612      # Check if we try to supply an empty value
45613      if test "x$BUILD_OBJCOPY" = x; then
45614        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45615$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45617$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45619$as_echo "disabled" >&6; }
45620      else
45621        # Check if the provided tool contains a complete path.
45622        tool_specified="$BUILD_OBJCOPY"
45623        tool_basename="${tool_specified##*/}"
45624        if test "x$tool_basename" = "x$tool_specified"; then
45625          # A command without a complete path is provided, search $PATH.
45626          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45627$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45628          # Extract the first word of "$tool_basename", so it can be a program name with args.
45629set dummy $tool_basename; ac_word=$2
45630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45631$as_echo_n "checking for $ac_word... " >&6; }
45632if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45633  $as_echo_n "(cached) " >&6
45634else
45635  case $BUILD_OBJCOPY in
45636  [\\/]* | ?:[\\/]*)
45637  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45638  ;;
45639  *)
45640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45641for as_dir in $PATH
45642do
45643  IFS=$as_save_IFS
45644  test -z "$as_dir" && as_dir=.
45645    for ac_exec_ext in '' $ac_executable_extensions; do
45646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45647    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45649    break 2
45650  fi
45651done
45652  done
45653IFS=$as_save_IFS
45654
45655  ;;
45656esac
45657fi
45658BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45659if test -n "$BUILD_OBJCOPY"; then
45660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45661$as_echo "$BUILD_OBJCOPY" >&6; }
45662else
45663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45664$as_echo "no" >&6; }
45665fi
45666
45667
45668          if test "x$BUILD_OBJCOPY" = x; then
45669            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45670          fi
45671        else
45672          # Otherwise we believe it is a complete path. Use it as it is.
45673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45674$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45675          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45676$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45677          if test ! -x "$tool_specified"; then
45678            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45679$as_echo "not found" >&6; }
45680            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45681          fi
45682          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45683$as_echo "$tool_specified" >&6; }
45684        fi
45685      fi
45686    fi
45687
45688  fi
45689
45690
45691
45692  # Only process if variable expands to non-empty
45693
45694  if test "x$BUILD_OBJCOPY" != x; then
45695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45696
45697  # First separate the path from the arguments. This will split at the first
45698  # space.
45699  complete="$BUILD_OBJCOPY"
45700  path="${complete%% *}"
45701  tmp="$complete EOL"
45702  arguments="${tmp#* }"
45703
45704  # Input might be given as Windows format, start by converting to
45705  # unix format.
45706  new_path=`$CYGPATH -u "$path"`
45707
45708  # Now try to locate executable using which
45709  new_path=`$WHICH "$new_path" 2> /dev/null`
45710  # bat and cmd files are not always considered executable in cygwin causing which
45711  # to not find them
45712  if test "x$new_path" = x \
45713      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45714      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45715    new_path=`$CYGPATH -u "$path"`
45716  fi
45717  if test "x$new_path" = x; then
45718    # Oops. Which didn't find the executable.
45719    # The splitting of arguments from the executable at a space might have been incorrect,
45720    # since paths with space are more likely in Windows. Give it another try with the whole
45721    # argument.
45722    path="$complete"
45723    arguments="EOL"
45724    new_path=`$CYGPATH -u "$path"`
45725    new_path=`$WHICH "$new_path" 2> /dev/null`
45726    # bat and cmd files are not always considered executable in cygwin causing which
45727    # to not find them
45728    if test "x$new_path" = x \
45729        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45730        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45731      new_path=`$CYGPATH -u "$path"`
45732    fi
45733    if test "x$new_path" = x; then
45734      # It's still not found. Now this is an unrecoverable error.
45735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45736$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45737      has_space=`$ECHO "$complete" | $GREP " "`
45738      if test "x$has_space" != x; then
45739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45741      fi
45742      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45743    fi
45744  fi
45745
45746  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45747  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45748  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45749  # "foo.exe" is OK but "foo" is an error.
45750  #
45751  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45752  # It is also a way to make sure we got the proper file name for the real test later on.
45753  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45754  if test "x$test_shortpath" = x; then
45755    # Short path failed, file does not exist as specified.
45756    # Try adding .exe or .cmd
45757    if test -f "${new_path}.exe"; then
45758      input_to_shortpath="${new_path}.exe"
45759    elif test -f "${new_path}.cmd"; then
45760      input_to_shortpath="${new_path}.cmd"
45761    else
45762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45763$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45764      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45765$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45766      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45767    fi
45768  else
45769    input_to_shortpath="$new_path"
45770  fi
45771
45772  # Call helper function which possibly converts this using DOS-style short mode.
45773  # If so, the updated path is stored in $new_path.
45774  new_path="$input_to_shortpath"
45775
45776  input_path="$input_to_shortpath"
45777  # Check if we need to convert this using DOS-style short mode. If the path
45778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45779  # take no chances and rewrite it.
45780  # Note: m4 eats our [], so we need to use [ and ] instead.
45781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45782  if test "x$has_forbidden_chars" != x; then
45783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45787      # Going to short mode and back again did indeed matter. Since short mode is
45788      # case insensitive, let's make it lowercase to improve readability.
45789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45790      # Now convert it back to Unix-style (cygpath)
45791      input_path=`$CYGPATH -u "$shortmode_path"`
45792      new_path="$input_path"
45793    fi
45794  fi
45795
45796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45797  if test "x$test_cygdrive_prefix" = x; then
45798    # As a simple fix, exclude /usr/bin since it's not a real path.
45799    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45801      # a path prefixed by /cygdrive for fixpath to work.
45802      new_path="$CYGWIN_ROOT_PATH$input_path"
45803    fi
45804  fi
45805
45806  # remove trailing .exe if any
45807  new_path="${new_path/%.exe/}"
45808
45809    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45810
45811  # First separate the path from the arguments. This will split at the first
45812  # space.
45813  complete="$BUILD_OBJCOPY"
45814  path="${complete%% *}"
45815  tmp="$complete EOL"
45816  arguments="${tmp#* }"
45817
45818  # Input might be given as Windows format, start by converting to
45819  # unix format.
45820  new_path="$path"
45821
45822  windows_path="$new_path"
45823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45824    unix_path=`$CYGPATH -u "$windows_path"`
45825    new_path="$unix_path"
45826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45828    new_path="$unix_path"
45829  fi
45830
45831
45832  # Now try to locate executable using which
45833  new_path=`$WHICH "$new_path" 2> /dev/null`
45834
45835  if test "x$new_path" = x; then
45836    # Oops. Which didn't find the executable.
45837    # The splitting of arguments from the executable at a space might have been incorrect,
45838    # since paths with space are more likely in Windows. Give it another try with the whole
45839    # argument.
45840    path="$complete"
45841    arguments="EOL"
45842    new_path="$path"
45843
45844  windows_path="$new_path"
45845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45846    unix_path=`$CYGPATH -u "$windows_path"`
45847    new_path="$unix_path"
45848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45850    new_path="$unix_path"
45851  fi
45852
45853
45854    new_path=`$WHICH "$new_path" 2> /dev/null`
45855    # bat and cmd files are not always considered executable in MSYS causing which
45856    # to not find them
45857    if test "x$new_path" = x \
45858        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45859        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45860      new_path="$path"
45861
45862  windows_path="$new_path"
45863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45864    unix_path=`$CYGPATH -u "$windows_path"`
45865    new_path="$unix_path"
45866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45868    new_path="$unix_path"
45869  fi
45870
45871    fi
45872
45873    if test "x$new_path" = x; then
45874      # It's still not found. Now this is an unrecoverable error.
45875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45876$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45877      has_space=`$ECHO "$complete" | $GREP " "`
45878      if test "x$has_space" != x; then
45879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45881      fi
45882      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45883    fi
45884  fi
45885
45886  # Now new_path has a complete unix path to the binary
45887  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45888    # Keep paths in /bin as-is, but remove trailing .exe if any
45889    new_path="${new_path/%.exe/}"
45890    # Do not save /bin paths to all_fixpath_prefixes!
45891  else
45892    # Not in mixed or Windows style, start by that.
45893    new_path=`cmd //c echo $new_path`
45894
45895  input_path="$new_path"
45896  # Check if we need to convert this using DOS-style short mode. If the path
45897  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45898  # take no chances and rewrite it.
45899  # Note: m4 eats our [], so we need to use [ and ] instead.
45900  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45901  if test "x$has_forbidden_chars" != x; then
45902    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45903    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45904  fi
45905
45906    # Output is in $new_path
45907
45908  windows_path="$new_path"
45909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45910    unix_path=`$CYGPATH -u "$windows_path"`
45911    new_path="$unix_path"
45912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45914    new_path="$unix_path"
45915  fi
45916
45917    # remove trailing .exe if any
45918    new_path="${new_path/%.exe/}"
45919
45920    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45921    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45922  fi
45923
45924    else
45925      # We're on a unix platform. Hooray! :)
45926      # First separate the path from the arguments. This will split at the first
45927      # space.
45928      complete="$BUILD_OBJCOPY"
45929      path="${complete%% *}"
45930      tmp="$complete EOL"
45931      arguments="${tmp#* }"
45932
45933      # Cannot rely on the command "which" here since it doesn't always work.
45934      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45935      if test -z "$is_absolute_path"; then
45936        # Path to executable is not absolute. Find it.
45937        IFS_save="$IFS"
45938        IFS=:
45939        for p in $PATH; do
45940          if test -f "$p/$path" && test -x "$p/$path"; then
45941            new_path="$p/$path"
45942            break
45943          fi
45944        done
45945        IFS="$IFS_save"
45946      else
45947        # This is an absolute path, we can use it without further modifications.
45948        new_path="$path"
45949      fi
45950
45951      if test "x$new_path" = x; then
45952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45953$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45954        has_space=`$ECHO "$complete" | $GREP " "`
45955        if test "x$has_space" != x; then
45956          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45957$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45958        fi
45959        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45960      fi
45961    fi
45962
45963    # Now join together the path and the arguments once again
45964    if test "x$arguments" != xEOL; then
45965      new_complete="$new_path ${arguments% *}"
45966    else
45967      new_complete="$new_path"
45968    fi
45969
45970    if test "x$complete" != "x$new_complete"; then
45971      BUILD_OBJCOPY="$new_complete"
45972      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45973$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45974    fi
45975  fi
45976
45977
45978
45979  # Publish this variable in the help.
45980
45981
45982  if [ -z "${BUILD_STRIP+x}" ]; then
45983    # The variable is not set by user, try to locate tool using the code snippet
45984    for ac_prog in strip
45985do
45986  # Extract the first word of "$ac_prog", so it can be a program name with args.
45987set dummy $ac_prog; ac_word=$2
45988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45989$as_echo_n "checking for $ac_word... " >&6; }
45990if ${ac_cv_path_BUILD_STRIP+:} false; then :
45991  $as_echo_n "(cached) " >&6
45992else
45993  case $BUILD_STRIP in
45994  [\\/]* | ?:[\\/]*)
45995  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
45996  ;;
45997  *)
45998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45999for as_dir in $PATH
46000do
46001  IFS=$as_save_IFS
46002  test -z "$as_dir" && as_dir=.
46003    for ac_exec_ext in '' $ac_executable_extensions; do
46004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46005    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46007    break 2
46008  fi
46009done
46010  done
46011IFS=$as_save_IFS
46012
46013  ;;
46014esac
46015fi
46016BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46017if test -n "$BUILD_STRIP"; then
46018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46019$as_echo "$BUILD_STRIP" >&6; }
46020else
46021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46022$as_echo "no" >&6; }
46023fi
46024
46025
46026  test -n "$BUILD_STRIP" && break
46027done
46028
46029  else
46030    # The variable is set, but is it from the command line or the environment?
46031
46032    # Try to remove the string !BUILD_STRIP! from our list.
46033    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46034    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46035      # If it failed, the variable was not from the command line. Ignore it,
46036      # but warn the user (except for BASH, which is always set by the calling BASH).
46037      if test "xBUILD_STRIP" != xBASH; then
46038        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46039$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46040      fi
46041      # Try to locate tool using the code snippet
46042      for ac_prog in strip
46043do
46044  # Extract the first word of "$ac_prog", so it can be a program name with args.
46045set dummy $ac_prog; ac_word=$2
46046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46047$as_echo_n "checking for $ac_word... " >&6; }
46048if ${ac_cv_path_BUILD_STRIP+:} false; then :
46049  $as_echo_n "(cached) " >&6
46050else
46051  case $BUILD_STRIP in
46052  [\\/]* | ?:[\\/]*)
46053  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46054  ;;
46055  *)
46056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46057for as_dir in $PATH
46058do
46059  IFS=$as_save_IFS
46060  test -z "$as_dir" && as_dir=.
46061    for ac_exec_ext in '' $ac_executable_extensions; do
46062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46063    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46065    break 2
46066  fi
46067done
46068  done
46069IFS=$as_save_IFS
46070
46071  ;;
46072esac
46073fi
46074BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46075if test -n "$BUILD_STRIP"; then
46076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46077$as_echo "$BUILD_STRIP" >&6; }
46078else
46079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46080$as_echo "no" >&6; }
46081fi
46082
46083
46084  test -n "$BUILD_STRIP" && break
46085done
46086
46087    else
46088      # If it succeeded, then it was overridden by the user. We will use it
46089      # for the tool.
46090
46091      # First remove it from the list of overridden variables, so we can test
46092      # for unknown variables in the end.
46093      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46094
46095      # Check if we try to supply an empty value
46096      if test "x$BUILD_STRIP" = x; then
46097        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46098$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46100$as_echo_n "checking for BUILD_STRIP... " >&6; }
46101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46102$as_echo "disabled" >&6; }
46103      else
46104        # Check if the provided tool contains a complete path.
46105        tool_specified="$BUILD_STRIP"
46106        tool_basename="${tool_specified##*/}"
46107        if test "x$tool_basename" = "x$tool_specified"; then
46108          # A command without a complete path is provided, search $PATH.
46109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46110$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46111          # Extract the first word of "$tool_basename", so it can be a program name with args.
46112set dummy $tool_basename; ac_word=$2
46113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46114$as_echo_n "checking for $ac_word... " >&6; }
46115if ${ac_cv_path_BUILD_STRIP+:} false; then :
46116  $as_echo_n "(cached) " >&6
46117else
46118  case $BUILD_STRIP in
46119  [\\/]* | ?:[\\/]*)
46120  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46121  ;;
46122  *)
46123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46124for as_dir in $PATH
46125do
46126  IFS=$as_save_IFS
46127  test -z "$as_dir" && as_dir=.
46128    for ac_exec_ext in '' $ac_executable_extensions; do
46129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46130    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46132    break 2
46133  fi
46134done
46135  done
46136IFS=$as_save_IFS
46137
46138  ;;
46139esac
46140fi
46141BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46142if test -n "$BUILD_STRIP"; then
46143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46144$as_echo "$BUILD_STRIP" >&6; }
46145else
46146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46147$as_echo "no" >&6; }
46148fi
46149
46150
46151          if test "x$BUILD_STRIP" = x; then
46152            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46153          fi
46154        else
46155          # Otherwise we believe it is a complete path. Use it as it is.
46156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46157$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46158          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46159$as_echo_n "checking for BUILD_STRIP... " >&6; }
46160          if test ! -x "$tool_specified"; then
46161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46162$as_echo "not found" >&6; }
46163            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46164          fi
46165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46166$as_echo "$tool_specified" >&6; }
46167        fi
46168      fi
46169    fi
46170
46171  fi
46172
46173
46174
46175  # Only process if variable expands to non-empty
46176
46177  if test "x$BUILD_STRIP" != x; then
46178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46179
46180  # First separate the path from the arguments. This will split at the first
46181  # space.
46182  complete="$BUILD_STRIP"
46183  path="${complete%% *}"
46184  tmp="$complete EOL"
46185  arguments="${tmp#* }"
46186
46187  # Input might be given as Windows format, start by converting to
46188  # unix format.
46189  new_path=`$CYGPATH -u "$path"`
46190
46191  # Now try to locate executable using which
46192  new_path=`$WHICH "$new_path" 2> /dev/null`
46193  # bat and cmd files are not always considered executable in cygwin causing which
46194  # to not find them
46195  if test "x$new_path" = x \
46196      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46197      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46198    new_path=`$CYGPATH -u "$path"`
46199  fi
46200  if test "x$new_path" = x; then
46201    # Oops. Which didn't find the executable.
46202    # The splitting of arguments from the executable at a space might have been incorrect,
46203    # since paths with space are more likely in Windows. Give it another try with the whole
46204    # argument.
46205    path="$complete"
46206    arguments="EOL"
46207    new_path=`$CYGPATH -u "$path"`
46208    new_path=`$WHICH "$new_path" 2> /dev/null`
46209    # bat and cmd files are not always considered executable in cygwin causing which
46210    # to not find them
46211    if test "x$new_path" = x \
46212        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46213        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46214      new_path=`$CYGPATH -u "$path"`
46215    fi
46216    if test "x$new_path" = x; then
46217      # It's still not found. Now this is an unrecoverable error.
46218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46219$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46220      has_space=`$ECHO "$complete" | $GREP " "`
46221      if test "x$has_space" != x; then
46222        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46223$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46224      fi
46225      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46226    fi
46227  fi
46228
46229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46232  # "foo.exe" is OK but "foo" is an error.
46233  #
46234  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46235  # It is also a way to make sure we got the proper file name for the real test later on.
46236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46237  if test "x$test_shortpath" = x; then
46238    # Short path failed, file does not exist as specified.
46239    # Try adding .exe or .cmd
46240    if test -f "${new_path}.exe"; then
46241      input_to_shortpath="${new_path}.exe"
46242    elif test -f "${new_path}.cmd"; then
46243      input_to_shortpath="${new_path}.cmd"
46244    else
46245      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46246$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46248$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46249      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46250    fi
46251  else
46252    input_to_shortpath="$new_path"
46253  fi
46254
46255  # Call helper function which possibly converts this using DOS-style short mode.
46256  # If so, the updated path is stored in $new_path.
46257  new_path="$input_to_shortpath"
46258
46259  input_path="$input_to_shortpath"
46260  # Check if we need to convert this using DOS-style short mode. If the path
46261  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46262  # take no chances and rewrite it.
46263  # Note: m4 eats our [], so we need to use [ and ] instead.
46264  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46265  if test "x$has_forbidden_chars" != x; then
46266    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46267    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46268    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46269    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46270      # Going to short mode and back again did indeed matter. Since short mode is
46271      # case insensitive, let's make it lowercase to improve readability.
46272      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46273      # Now convert it back to Unix-style (cygpath)
46274      input_path=`$CYGPATH -u "$shortmode_path"`
46275      new_path="$input_path"
46276    fi
46277  fi
46278
46279  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46280  if test "x$test_cygdrive_prefix" = x; then
46281    # As a simple fix, exclude /usr/bin since it's not a real path.
46282    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46283      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46284      # a path prefixed by /cygdrive for fixpath to work.
46285      new_path="$CYGWIN_ROOT_PATH$input_path"
46286    fi
46287  fi
46288
46289  # remove trailing .exe if any
46290  new_path="${new_path/%.exe/}"
46291
46292    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46293
46294  # First separate the path from the arguments. This will split at the first
46295  # space.
46296  complete="$BUILD_STRIP"
46297  path="${complete%% *}"
46298  tmp="$complete EOL"
46299  arguments="${tmp#* }"
46300
46301  # Input might be given as Windows format, start by converting to
46302  # unix format.
46303  new_path="$path"
46304
46305  windows_path="$new_path"
46306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46307    unix_path=`$CYGPATH -u "$windows_path"`
46308    new_path="$unix_path"
46309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46311    new_path="$unix_path"
46312  fi
46313
46314
46315  # Now try to locate executable using which
46316  new_path=`$WHICH "$new_path" 2> /dev/null`
46317
46318  if test "x$new_path" = x; then
46319    # Oops. Which didn't find the executable.
46320    # The splitting of arguments from the executable at a space might have been incorrect,
46321    # since paths with space are more likely in Windows. Give it another try with the whole
46322    # argument.
46323    path="$complete"
46324    arguments="EOL"
46325    new_path="$path"
46326
46327  windows_path="$new_path"
46328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46329    unix_path=`$CYGPATH -u "$windows_path"`
46330    new_path="$unix_path"
46331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46333    new_path="$unix_path"
46334  fi
46335
46336
46337    new_path=`$WHICH "$new_path" 2> /dev/null`
46338    # bat and cmd files are not always considered executable in MSYS causing which
46339    # to not find them
46340    if test "x$new_path" = x \
46341        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46342        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46343      new_path="$path"
46344
46345  windows_path="$new_path"
46346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46347    unix_path=`$CYGPATH -u "$windows_path"`
46348    new_path="$unix_path"
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46351    new_path="$unix_path"
46352  fi
46353
46354    fi
46355
46356    if test "x$new_path" = x; then
46357      # It's still not found. Now this is an unrecoverable error.
46358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46359$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46360      has_space=`$ECHO "$complete" | $GREP " "`
46361      if test "x$has_space" != x; then
46362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46364      fi
46365      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46366    fi
46367  fi
46368
46369  # Now new_path has a complete unix path to the binary
46370  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46371    # Keep paths in /bin as-is, but remove trailing .exe if any
46372    new_path="${new_path/%.exe/}"
46373    # Do not save /bin paths to all_fixpath_prefixes!
46374  else
46375    # Not in mixed or Windows style, start by that.
46376    new_path=`cmd //c echo $new_path`
46377
46378  input_path="$new_path"
46379  # Check if we need to convert this using DOS-style short mode. If the path
46380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46381  # take no chances and rewrite it.
46382  # Note: m4 eats our [], so we need to use [ and ] instead.
46383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46384  if test "x$has_forbidden_chars" != x; then
46385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46387  fi
46388
46389    # Output is in $new_path
46390
46391  windows_path="$new_path"
46392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46393    unix_path=`$CYGPATH -u "$windows_path"`
46394    new_path="$unix_path"
46395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46397    new_path="$unix_path"
46398  fi
46399
46400    # remove trailing .exe if any
46401    new_path="${new_path/%.exe/}"
46402
46403    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46404    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46405  fi
46406
46407    else
46408      # We're on a unix platform. Hooray! :)
46409      # First separate the path from the arguments. This will split at the first
46410      # space.
46411      complete="$BUILD_STRIP"
46412      path="${complete%% *}"
46413      tmp="$complete EOL"
46414      arguments="${tmp#* }"
46415
46416      # Cannot rely on the command "which" here since it doesn't always work.
46417      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46418      if test -z "$is_absolute_path"; then
46419        # Path to executable is not absolute. Find it.
46420        IFS_save="$IFS"
46421        IFS=:
46422        for p in $PATH; do
46423          if test -f "$p/$path" && test -x "$p/$path"; then
46424            new_path="$p/$path"
46425            break
46426          fi
46427        done
46428        IFS="$IFS_save"
46429      else
46430        # This is an absolute path, we can use it without further modifications.
46431        new_path="$path"
46432      fi
46433
46434      if test "x$new_path" = x; then
46435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46436$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46437        has_space=`$ECHO "$complete" | $GREP " "`
46438        if test "x$has_space" != x; then
46439          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46440$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46441        fi
46442        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46443      fi
46444    fi
46445
46446    # Now join together the path and the arguments once again
46447    if test "x$arguments" != xEOL; then
46448      new_complete="$new_path ${arguments% *}"
46449    else
46450      new_complete="$new_path"
46451    fi
46452
46453    if test "x$complete" != "x$new_complete"; then
46454      BUILD_STRIP="$new_complete"
46455      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46456$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46457    fi
46458  fi
46459
46460    # Assume the C compiler is the assembler
46461    BUILD_AS="$BUILD_CC -c"
46462    # Just like for the target compiler, use the compiler as linker
46463    BUILD_LD="$BUILD_CC"
46464    BUILD_LDCXX="$BUILD_CXX"
46465
46466    PATH="$OLDPATH"
46467  else
46468    # If we are not cross compiling, use the normal target compilers for
46469    # building the build platform executables.
46470    BUILD_CC="$CC"
46471    BUILD_CXX="$CXX"
46472    BUILD_LD="$LD"
46473    BUILD_LDCXX="$LDCXX"
46474    BUILD_NM="$NM"
46475    BUILD_AS="$AS"
46476    BUILD_OBJCOPY="$OBJCOPY"
46477    BUILD_STRIP="$STRIP"
46478    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46479    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46480    BUILD_AR="$AR"
46481  fi
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46495    # For hotspot, we need these in Windows mixed path,
46496    # so rewrite them all. Need added .exe suffix.
46497    HOTSPOT_CXX="$CXX.exe"
46498    HOTSPOT_LD="$LD.exe"
46499    HOTSPOT_MT="$MT.exe"
46500    HOTSPOT_RC="$RC.exe"
46501
46502  unix_path="$HOTSPOT_CXX"
46503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46504    windows_path=`$CYGPATH -m "$unix_path"`
46505    HOTSPOT_CXX="$windows_path"
46506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46507    windows_path=`cmd //c echo $unix_path`
46508    HOTSPOT_CXX="$windows_path"
46509  fi
46510
46511
46512  unix_path="$HOTSPOT_LD"
46513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46514    windows_path=`$CYGPATH -m "$unix_path"`
46515    HOTSPOT_LD="$windows_path"
46516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46517    windows_path=`cmd //c echo $unix_path`
46518    HOTSPOT_LD="$windows_path"
46519  fi
46520
46521
46522  unix_path="$HOTSPOT_MT"
46523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46524    windows_path=`$CYGPATH -m "$unix_path"`
46525    HOTSPOT_MT="$windows_path"
46526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46527    windows_path=`cmd //c echo $unix_path`
46528    HOTSPOT_MT="$windows_path"
46529  fi
46530
46531
46532  unix_path="$HOTSPOT_RC"
46533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46534    windows_path=`$CYGPATH -m "$unix_path"`
46535    HOTSPOT_RC="$windows_path"
46536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46537    windows_path=`cmd //c echo $unix_path`
46538    HOTSPOT_RC="$windows_path"
46539  fi
46540
46541
46542
46543  else
46544    HOTSPOT_CXX="$CXX"
46545    HOTSPOT_LD="$LD"
46546  fi
46547
46548
46549
46550  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46551    USE_CLANG=true
46552  fi
46553
46554
46555
46556
46557
46558  # The package path is used only on macosx?
46559  # FIXME: clean this up, and/or move it elsewhere.
46560  PACKAGE_PATH=/opt/local
46561
46562
46563  # Check for extra potential brokenness.
46564  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46565    # On Windows, double-check that we got the right compiler.
46566    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46567    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46568    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46569      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46570        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
46571      fi
46572    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46573      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46574        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46575      fi
46576    fi
46577  fi
46578
46579  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46580    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46581    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46582    # This is later checked when setting flags.
46583
46584    # "-Og" suppported for GCC 4.8 and later
46585    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
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
46630
46631
46632
46633    # Execute function body
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
46679
46680
46681
46682    # Execute function body
46683
46684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46685$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46686  supports=yes
46687
46688  saved_cflags="$CFLAGS"
46689  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46690  ac_ext=c
46691ac_cpp='$CPP $CPPFLAGS'
46692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46694ac_compiler_gnu=$ac_cv_c_compiler_gnu
46695
46696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46697/* end confdefs.h.  */
46698int i;
46699_ACEOF
46700if ac_fn_c_try_compile "$LINENO"; then :
46701
46702else
46703  supports=no
46704fi
46705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46706  ac_ext=cpp
46707ac_cpp='$CXXCPP $CPPFLAGS'
46708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46711
46712  CFLAGS="$saved_cflags"
46713
46714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46715$as_echo "$supports" >&6; }
46716  if test "x$supports" = "xyes" ; then
46717    :
46718    C_COMP_SUPPORTS="yes"
46719  else
46720    :
46721    C_COMP_SUPPORTS="no"
46722  fi
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
46779
46780
46781
46782    # Execute function body
46783
46784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46785$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46786  supports=yes
46787
46788  saved_cxxflags="$CXXFLAGS"
46789  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
46790  ac_ext=cpp
46791ac_cpp='$CXXCPP $CPPFLAGS'
46792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46795
46796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46797/* end confdefs.h.  */
46798int i;
46799_ACEOF
46800if ac_fn_cxx_try_compile "$LINENO"; then :
46801
46802else
46803  supports=no
46804fi
46805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46806  ac_ext=cpp
46807ac_cpp='$CXXCPP $CPPFLAGS'
46808ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46809ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46810ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46811
46812  CXXFLAGS="$saved_cxxflags"
46813
46814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46815$as_echo "$supports" >&6; }
46816  if test "x$supports" = "xyes" ; then
46817    :
46818    CXX_COMP_SUPPORTS="yes"
46819  else
46820    :
46821    CXX_COMP_SUPPORTS="no"
46822  fi
46823
46824
46825
46826
46827
46828
46829
46830
46831
46832
46833
46834
46835
46836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46837$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46838  supports=no
46839  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
46840
46841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46842$as_echo "$supports" >&6; }
46843  if test "x$supports" = "xyes" ; then
46844    :
46845    HAS_CFLAG_OPTIMIZE_DEBUG=true
46846  else
46847    :
46848    HAS_CFLAG_OPTIMIZE_DEBUG=false
46849  fi
46850
46851
46852
46853
46854
46855
46856
46857    # "-z relro" supported in GNU binutils 2.17 and later
46858    LINKER_RELRO_FLAG="-Wl,-z,relro"
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
46903
46904
46905
46906    # Execute function body
46907
46908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
46909$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
46910  supports=yes
46911
46912  saved_ldflags="$LDFLAGS"
46913  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
46914  ac_ext=c
46915ac_cpp='$CPP $CPPFLAGS'
46916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46918ac_compiler_gnu=$ac_cv_c_compiler_gnu
46919
46920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46921/* end confdefs.h.  */
46922
46923int
46924main ()
46925{
46926
46927  ;
46928  return 0;
46929}
46930_ACEOF
46931if ac_fn_c_try_link "$LINENO"; then :
46932
46933else
46934  supports=no
46935fi
46936rm -f core conftest.err conftest.$ac_objext \
46937    conftest$ac_exeext conftest.$ac_ext
46938  ac_ext=cpp
46939ac_cpp='$CXXCPP $CPPFLAGS'
46940ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46941ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46942ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46943
46944  LDFLAGS="$saved_ldflags"
46945
46946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
46947$as_echo "$supports" >&6; }
46948  if test "x$supports" = "xyes" ; then
46949    :
46950    HAS_LINKER_RELRO=true
46951  else
46952    :
46953    HAS_LINKER_RELRO=false
46954  fi
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968    # "-z now" supported in GNU binutils 2.11 and later
46969    LINKER_NOW_FLAG="-Wl,-z,now"
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
47014
47015
47016
47017    # Execute function body
47018
47019  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47020$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47021  supports=yes
47022
47023  saved_ldflags="$LDFLAGS"
47024  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47025  ac_ext=c
47026ac_cpp='$CPP $CPPFLAGS'
47027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47029ac_compiler_gnu=$ac_cv_c_compiler_gnu
47030
47031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47032/* end confdefs.h.  */
47033
47034int
47035main ()
47036{
47037
47038  ;
47039  return 0;
47040}
47041_ACEOF
47042if ac_fn_c_try_link "$LINENO"; then :
47043
47044else
47045  supports=no
47046fi
47047rm -f core conftest.err conftest.$ac_objext \
47048    conftest$ac_exeext conftest.$ac_ext
47049  ac_ext=cpp
47050ac_cpp='$CXXCPP $CPPFLAGS'
47051ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47052ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47053ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47054
47055  LDFLAGS="$saved_ldflags"
47056
47057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47058$as_echo "$supports" >&6; }
47059  if test "x$supports" = "xyes" ; then
47060    :
47061    HAS_LINKER_NOW=true
47062  else
47063    :
47064    HAS_LINKER_NOW=false
47065  fi
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078  fi
47079
47080  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47081  # in executable.'
47082  USING_BROKEN_SUSE_LD=no
47083  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47085$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47086    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47087    $ECHO "int main() { }" > main.c
47088    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47089      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47090$as_echo "no" >&6; }
47091      USING_BROKEN_SUSE_LD=no
47092    else
47093      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47094$as_echo "yes" >&6; }
47095      USING_BROKEN_SUSE_LD=yes
47096    fi
47097    rm -rf version-script.map main.c a.out
47098  fi
47099
47100
47101  # Setup hotspot lecagy names for toolchains
47102  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47103  if test "x$TOOLCHAIN_TYPE" = xclang; then
47104    HOTSPOT_TOOLCHAIN_TYPE=gcc
47105  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47106    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47107  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47108    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47109  fi
47110
47111
47112
47113# Setup the JTReg Regression Test Harness.
47114
47115
47116# Check whether --with-jtreg was given.
47117if test "${with_jtreg+set}" = set; then :
47118  withval=$with_jtreg;
47119else
47120  with_jtreg=no
47121fi
47122
47123
47124  if test "x$with_jtreg" = xno; then
47125    # jtreg disabled
47126    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47127$as_echo_n "checking for jtreg... " >&6; }
47128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47129$as_echo "no" >&6; }
47130  else
47131    if test "x$with_jtreg" != xyes; then
47132      # with path specified.
47133      JT_HOME="$with_jtreg"
47134    fi
47135
47136    if test "x$JT_HOME" != x; then
47137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47138$as_echo_n "checking for jtreg... " >&6; }
47139
47140      # use JT_HOME enviroment var.
47141
47142  # Only process if variable expands to non-empty
47143
47144  if test "x$JT_HOME" != x; then
47145    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47146
47147  # Input might be given as Windows format, start by converting to
47148  # unix format.
47149  path="$JT_HOME"
47150  new_path=`$CYGPATH -u "$path"`
47151
47152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47155  # "foo.exe" is OK but "foo" is an error.
47156  #
47157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47158  # It is also a way to make sure we got the proper file name for the real test later on.
47159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47160  if test "x$test_shortpath" = x; then
47161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47162$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47163    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47164  fi
47165
47166  # Call helper function which possibly converts this using DOS-style short mode.
47167  # If so, the updated path is stored in $new_path.
47168
47169  input_path="$new_path"
47170  # Check if we need to convert this using DOS-style short mode. If the path
47171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47172  # take no chances and rewrite it.
47173  # Note: m4 eats our [], so we need to use [ and ] instead.
47174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47175  if test "x$has_forbidden_chars" != x; then
47176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47180      # Going to short mode and back again did indeed matter. Since short mode is
47181      # case insensitive, let's make it lowercase to improve readability.
47182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47183      # Now convert it back to Unix-style (cygpath)
47184      input_path=`$CYGPATH -u "$shortmode_path"`
47185      new_path="$input_path"
47186    fi
47187  fi
47188
47189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47190  if test "x$test_cygdrive_prefix" = x; then
47191    # As a simple fix, exclude /usr/bin since it's not a real path.
47192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47194      # a path prefixed by /cygdrive for fixpath to work.
47195      new_path="$CYGWIN_ROOT_PATH$input_path"
47196    fi
47197  fi
47198
47199
47200  if test "x$path" != "x$new_path"; then
47201    JT_HOME="$new_path"
47202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47203$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47204  fi
47205
47206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47207
47208  path="$JT_HOME"
47209  has_colon=`$ECHO $path | $GREP ^.:`
47210  new_path="$path"
47211  if test "x$has_colon" = x; then
47212    # Not in mixed or Windows style, start by that.
47213    new_path=`cmd //c echo $path`
47214  fi
47215
47216
47217  input_path="$new_path"
47218  # Check if we need to convert this using DOS-style short mode. If the path
47219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47220  # take no chances and rewrite it.
47221  # Note: m4 eats our [], so we need to use [ and ] instead.
47222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47223  if test "x$has_forbidden_chars" != x; then
47224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47226  fi
47227
47228
47229  windows_path="$new_path"
47230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47231    unix_path=`$CYGPATH -u "$windows_path"`
47232    new_path="$unix_path"
47233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47235    new_path="$unix_path"
47236  fi
47237
47238  if test "x$path" != "x$new_path"; then
47239    JT_HOME="$new_path"
47240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47241$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47242  fi
47243
47244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47246
47247    else
47248      # We're on a unix platform. Hooray! :)
47249      path="$JT_HOME"
47250      has_space=`$ECHO "$path" | $GREP " "`
47251      if test "x$has_space" != x; then
47252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47253$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47254        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47255      fi
47256
47257      # Use eval to expand a potential ~
47258      eval path="$path"
47259      if test ! -f "$path" && test ! -d "$path"; then
47260        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47261      fi
47262
47263      if test -d "$path"; then
47264        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47265      else
47266        dir="`$DIRNAME "$path"`"
47267        base="`$BASENAME "$path"`"
47268        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47269      fi
47270    fi
47271  fi
47272
47273
47274      # jtreg win32 script works for everybody
47275      JTREGEXE="$JT_HOME/bin/jtreg"
47276
47277      if test ! -f "$JTREGEXE"; then
47278        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47279      fi
47280
47281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47282$as_echo "$JTREGEXE" >&6; }
47283    else
47284      # try to find jtreg on path
47285
47286
47287
47288  # Publish this variable in the help.
47289
47290
47291  if [ -z "${JTREGEXE+x}" ]; then
47292    # The variable is not set by user, try to locate tool using the code snippet
47293    for ac_prog in jtreg
47294do
47295  # Extract the first word of "$ac_prog", so it can be a program name with args.
47296set dummy $ac_prog; ac_word=$2
47297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47298$as_echo_n "checking for $ac_word... " >&6; }
47299if ${ac_cv_path_JTREGEXE+:} false; then :
47300  $as_echo_n "(cached) " >&6
47301else
47302  case $JTREGEXE in
47303  [\\/]* | ?:[\\/]*)
47304  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47305  ;;
47306  *)
47307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47308for as_dir in $PATH
47309do
47310  IFS=$as_save_IFS
47311  test -z "$as_dir" && as_dir=.
47312    for ac_exec_ext in '' $ac_executable_extensions; do
47313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47314    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47316    break 2
47317  fi
47318done
47319  done
47320IFS=$as_save_IFS
47321
47322  ;;
47323esac
47324fi
47325JTREGEXE=$ac_cv_path_JTREGEXE
47326if test -n "$JTREGEXE"; then
47327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47328$as_echo "$JTREGEXE" >&6; }
47329else
47330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47331$as_echo "no" >&6; }
47332fi
47333
47334
47335  test -n "$JTREGEXE" && break
47336done
47337
47338  else
47339    # The variable is set, but is it from the command line or the environment?
47340
47341    # Try to remove the string !JTREGEXE! from our list.
47342    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47343    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47344      # If it failed, the variable was not from the command line. Ignore it,
47345      # but warn the user (except for BASH, which is always set by the calling BASH).
47346      if test "xJTREGEXE" != xBASH; then
47347        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47348$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47349      fi
47350      # Try to locate tool using the code snippet
47351      for ac_prog in jtreg
47352do
47353  # Extract the first word of "$ac_prog", so it can be a program name with args.
47354set dummy $ac_prog; ac_word=$2
47355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47356$as_echo_n "checking for $ac_word... " >&6; }
47357if ${ac_cv_path_JTREGEXE+:} false; then :
47358  $as_echo_n "(cached) " >&6
47359else
47360  case $JTREGEXE in
47361  [\\/]* | ?:[\\/]*)
47362  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47363  ;;
47364  *)
47365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47366for as_dir in $PATH
47367do
47368  IFS=$as_save_IFS
47369  test -z "$as_dir" && as_dir=.
47370    for ac_exec_ext in '' $ac_executable_extensions; do
47371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47372    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47374    break 2
47375  fi
47376done
47377  done
47378IFS=$as_save_IFS
47379
47380  ;;
47381esac
47382fi
47383JTREGEXE=$ac_cv_path_JTREGEXE
47384if test -n "$JTREGEXE"; then
47385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47386$as_echo "$JTREGEXE" >&6; }
47387else
47388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47389$as_echo "no" >&6; }
47390fi
47391
47392
47393  test -n "$JTREGEXE" && break
47394done
47395
47396    else
47397      # If it succeeded, then it was overridden by the user. We will use it
47398      # for the tool.
47399
47400      # First remove it from the list of overridden variables, so we can test
47401      # for unknown variables in the end.
47402      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47403
47404      # Check if we try to supply an empty value
47405      if test "x$JTREGEXE" = x; then
47406        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47407$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47408        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47409$as_echo_n "checking for JTREGEXE... " >&6; }
47410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47411$as_echo "disabled" >&6; }
47412      else
47413        # Check if the provided tool contains a complete path.
47414        tool_specified="$JTREGEXE"
47415        tool_basename="${tool_specified##*/}"
47416        if test "x$tool_basename" = "x$tool_specified"; then
47417          # A command without a complete path is provided, search $PATH.
47418          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47419$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47420          # Extract the first word of "$tool_basename", so it can be a program name with args.
47421set dummy $tool_basename; ac_word=$2
47422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47423$as_echo_n "checking for $ac_word... " >&6; }
47424if ${ac_cv_path_JTREGEXE+:} false; then :
47425  $as_echo_n "(cached) " >&6
47426else
47427  case $JTREGEXE in
47428  [\\/]* | ?:[\\/]*)
47429  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47430  ;;
47431  *)
47432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47433for as_dir in $PATH
47434do
47435  IFS=$as_save_IFS
47436  test -z "$as_dir" && as_dir=.
47437    for ac_exec_ext in '' $ac_executable_extensions; do
47438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47439    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47441    break 2
47442  fi
47443done
47444  done
47445IFS=$as_save_IFS
47446
47447  ;;
47448esac
47449fi
47450JTREGEXE=$ac_cv_path_JTREGEXE
47451if test -n "$JTREGEXE"; then
47452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47453$as_echo "$JTREGEXE" >&6; }
47454else
47455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47456$as_echo "no" >&6; }
47457fi
47458
47459
47460          if test "x$JTREGEXE" = x; then
47461            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47462          fi
47463        else
47464          # Otherwise we believe it is a complete path. Use it as it is.
47465          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47466$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47467          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47468$as_echo_n "checking for JTREGEXE... " >&6; }
47469          if test ! -x "$tool_specified"; then
47470            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47471$as_echo "not found" >&6; }
47472            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47473          fi
47474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47475$as_echo "$tool_specified" >&6; }
47476        fi
47477      fi
47478    fi
47479
47480  fi
47481
47482
47483
47484  if test "x$JTREGEXE" = x; then
47485    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47486  fi
47487
47488
47489      JT_HOME="`$DIRNAME $JTREGEXE`"
47490    fi
47491  fi
47492
47493
47494
47495
47496
47497
47498  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47499  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47500  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47501  #                              commands produced by the link step (currently AIX only)
47502  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47503    COMPILER_TARGET_BITS_FLAG="-q"
47504    COMPILER_COMMAND_FILE_FLAG="-f"
47505    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47506  else
47507    COMPILER_TARGET_BITS_FLAG="-m"
47508    COMPILER_COMMAND_FILE_FLAG="@"
47509    COMPILER_BINDCMD_FILE_FLAG=""
47510
47511    # The solstudio linker does not support @-files.
47512    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47513      COMPILER_COMMAND_FILE_FLAG=
47514    fi
47515
47516    # Check if @file is supported by gcc
47517    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47519$as_echo_n "checking if @file is supported by gcc... " >&6; }
47520      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47521      $ECHO "" "--version" > command.file
47522      if $CXX @command.file 2>&5 >&5; then
47523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47524$as_echo "yes" >&6; }
47525        COMPILER_COMMAND_FILE_FLAG="@"
47526      else
47527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47528$as_echo "no" >&6; }
47529        COMPILER_COMMAND_FILE_FLAG=
47530      fi
47531      rm -rf command.file
47532    fi
47533  fi
47534
47535
47536
47537
47538  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47539  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47540    ARFLAGS="-r"
47541  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47542    ARFLAGS="-X64"
47543  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47544    # lib.exe is used as AR to create static libraries.
47545    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47546  else
47547    ARFLAGS=""
47548  fi
47549
47550
47551  ## Setup strip.
47552  # FIXME: should this really be per platform, or should it be per toolchain type?
47553  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47554  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47555  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47556    STRIPFLAGS="-g"
47557  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47558    STRIPFLAGS="-x"
47559  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47560    STRIPFLAGS="-S"
47561  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47562    STRIPFLAGS="-X32_64"
47563  fi
47564
47565
47566
47567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47568    CC_OUT_OPTION=-Fo
47569    EXE_OUT_OPTION=-out:
47570    LD_OUT_OPTION=-out:
47571    AR_OUT_OPTION=-out:
47572  else
47573    # The option used to specify the target .o,.a or .so file.
47574    # When compiling, how to specify the to be created object file.
47575    CC_OUT_OPTION='-o$(SPACE)'
47576    # When linking, how to specify the to be created executable.
47577    EXE_OUT_OPTION='-o$(SPACE)'
47578    # When linking, how to specify the to be created dynamically linkable library.
47579    LD_OUT_OPTION='-o$(SPACE)'
47580    # When archiving, how to specify the to be create static archive for object files.
47581    AR_OUT_OPTION='rcs$(SPACE)'
47582  fi
47583
47584
47585
47586
47587
47588  # On Windows, we need to set RC flags.
47589  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47590    RC_FLAGS="-nologo -l0x409"
47591    JVM_RCFLAGS="-nologo"
47592    if test "x$DEBUG_LEVEL" = xrelease; then
47593      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47594      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47595    fi
47596
47597    # The version variables used to create RC_FLAGS may be overridden
47598    # in a custom configure script, or possibly the command line.
47599    # Let those variables be expanded at make time in spec.gmk.
47600    # The \$ are escaped to the shell, and the $(...) variables
47601    # are evaluated by make.
47602    RC_FLAGS="$RC_FLAGS \
47603        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47604        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47605        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47606        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47607        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47608        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47609        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47610
47611    JVM_RCFLAGS="$JVM_RCFLAGS \
47612        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47613        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47614        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47615        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47616        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47617        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47618        -D\"HS_FNAME=jvm.dll\" \
47619        -D\"HS_INTERNAL_NAME=jvm\""
47620  fi
47621
47622
47623
47624  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47625    # silence copyright notice and other headers.
47626    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47627  fi
47628
47629
47630# Now we can test some aspects on the target using configure macros.
47631
47632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47633$as_echo_n "checking for ANSI C header files... " >&6; }
47634if ${ac_cv_header_stdc+:} false; then :
47635  $as_echo_n "(cached) " >&6
47636else
47637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47638/* end confdefs.h.  */
47639#include <stdlib.h>
47640#include <stdarg.h>
47641#include <string.h>
47642#include <float.h>
47643
47644int
47645main ()
47646{
47647
47648  ;
47649  return 0;
47650}
47651_ACEOF
47652if ac_fn_cxx_try_compile "$LINENO"; then :
47653  ac_cv_header_stdc=yes
47654else
47655  ac_cv_header_stdc=no
47656fi
47657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47658
47659if test $ac_cv_header_stdc = yes; then
47660  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47662/* end confdefs.h.  */
47663#include <string.h>
47664
47665_ACEOF
47666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47667  $EGREP "memchr" >/dev/null 2>&1; then :
47668
47669else
47670  ac_cv_header_stdc=no
47671fi
47672rm -f conftest*
47673
47674fi
47675
47676if test $ac_cv_header_stdc = yes; then
47677  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47679/* end confdefs.h.  */
47680#include <stdlib.h>
47681
47682_ACEOF
47683if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47684  $EGREP "free" >/dev/null 2>&1; then :
47685
47686else
47687  ac_cv_header_stdc=no
47688fi
47689rm -f conftest*
47690
47691fi
47692
47693if test $ac_cv_header_stdc = yes; then
47694  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47695  if test "$cross_compiling" = yes; then :
47696  :
47697else
47698  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47699/* end confdefs.h.  */
47700#include <ctype.h>
47701#include <stdlib.h>
47702#if ((' ' & 0x0FF) == 0x020)
47703# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47704# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47705#else
47706# define ISLOWER(c) \
47707		   (('a' <= (c) && (c) <= 'i') \
47708		     || ('j' <= (c) && (c) <= 'r') \
47709		     || ('s' <= (c) && (c) <= 'z'))
47710# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47711#endif
47712
47713#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47714int
47715main ()
47716{
47717  int i;
47718  for (i = 0; i < 256; i++)
47719    if (XOR (islower (i), ISLOWER (i))
47720	|| toupper (i) != TOUPPER (i))
47721      return 2;
47722  return 0;
47723}
47724_ACEOF
47725if ac_fn_cxx_try_run "$LINENO"; then :
47726
47727else
47728  ac_cv_header_stdc=no
47729fi
47730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
47731  conftest.$ac_objext conftest.beam conftest.$ac_ext
47732fi
47733
47734fi
47735fi
47736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
47737$as_echo "$ac_cv_header_stdc" >&6; }
47738if test $ac_cv_header_stdc = yes; then
47739
47740$as_echo "#define STDC_HEADERS 1" >>confdefs.h
47741
47742fi
47743
47744# On IRIX 5.3, sys/types and inttypes.h are conflicting.
47745for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
47746		  inttypes.h stdint.h unistd.h
47747do :
47748  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
47749ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
47750"
47751if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
47752  cat >>confdefs.h <<_ACEOF
47753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
47754_ACEOF
47755
47756fi
47757
47758done
47759
47760
47761
47762  ###############################################################################
47763  #
47764  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
47765  # (The JVM can use 32 or 64 bit Java pointers but that decision
47766  # is made at runtime.)
47767  #
47768
47769  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
47770    # Always specify -m flag on Solaris
47771    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
47772
47773  # When we add flags to the "official" CFLAGS etc, we need to
47774  # keep track of these additions in ADDED_CFLAGS etc. These
47775  # will later be checked to make sure only controlled additions
47776  # have been made to CFLAGS etc.
47777  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47778  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47779  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47780
47781  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47782  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47783  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47784
47785  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47786  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47787  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47788
47789  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47790  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47791  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47792
47793  elif test "x$COMPILE_TYPE" = xreduced; then
47794    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
47795      # Specify -m if running reduced on unix platforms
47796
47797  # When we add flags to the "official" CFLAGS etc, we need to
47798  # keep track of these additions in ADDED_CFLAGS etc. These
47799  # will later be checked to make sure only controlled additions
47800  # have been made to CFLAGS etc.
47801  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47802  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47803  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47804
47805  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47806  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47807  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47808
47809  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47810  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47811  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47812
47813  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47814  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47815  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47816
47817    fi
47818  fi
47819  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47820    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47821    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47822    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47823  fi
47824
47825  # Make compilation sanity check
47826  for ac_header in stdio.h
47827do :
47828  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
47829if test "x$ac_cv_header_stdio_h" = xyes; then :
47830  cat >>confdefs.h <<_ACEOF
47831#define HAVE_STDIO_H 1
47832_ACEOF
47833
47834else
47835
47836    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
47837$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
47838    if test "x$COMPILE_TYPE" = xreduced; then
47839
47840  # Print a helpful message on how to acquire the necessary build dependency.
47841  # reduced is the help tag: freetype, cups, alsa etc
47842  MISSING_DEPENDENCY=reduced
47843
47844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47845    cygwin_help $MISSING_DEPENDENCY
47846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47847    msys_help $MISSING_DEPENDENCY
47848  else
47849    PKGHANDLER_COMMAND=
47850
47851    case $PKGHANDLER in
47852      apt-get)
47853        apt_help     $MISSING_DEPENDENCY ;;
47854      yum)
47855        yum_help     $MISSING_DEPENDENCY ;;
47856      port)
47857        port_help    $MISSING_DEPENDENCY ;;
47858      pkgutil)
47859        pkgutil_help $MISSING_DEPENDENCY ;;
47860      pkgadd)
47861        pkgadd_help  $MISSING_DEPENDENCY ;;
47862    esac
47863
47864    if test "x$PKGHANDLER_COMMAND" != x; then
47865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47866    fi
47867  fi
47868
47869      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
47870$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
47871    elif test "x$COMPILE_TYPE" = xcross; then
47872      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
47873$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
47874    fi
47875    as_fn_error $? "Cannot continue." "$LINENO" 5
47876
47877fi
47878
47879done
47880
47881
47882  # The cast to long int works around a bug in the HP C Compiler
47883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47885# This bug is HP SR number 8606223364.
47886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47887$as_echo_n "checking size of int *... " >&6; }
47888if ${ac_cv_sizeof_int_p+:} false; then :
47889  $as_echo_n "(cached) " >&6
47890else
47891  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47892
47893else
47894  if test "$ac_cv_type_int_p" = yes; then
47895     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47897as_fn_error 77 "cannot compute sizeof (int *)
47898See \`config.log' for more details" "$LINENO" 5; }
47899   else
47900     ac_cv_sizeof_int_p=0
47901   fi
47902fi
47903
47904fi
47905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47906$as_echo "$ac_cv_sizeof_int_p" >&6; }
47907
47908
47909
47910cat >>confdefs.h <<_ACEOF
47911#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47912_ACEOF
47913
47914
47915
47916  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
47917  if test "x$ac_cv_sizeof_int_p" = x; then
47918    # The test failed, lets stick to the assumed value.
47919    { $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
47920$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
47921  else
47922    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47923
47924    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47925      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
47926      # Let's try to implicitely set the compilers target architecture and retry the test
47927      { $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
47928$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;}
47929      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
47930$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
47931
47932  # When we add flags to the "official" CFLAGS etc, we need to
47933  # keep track of these additions in ADDED_CFLAGS etc. These
47934  # will later be checked to make sure only controlled additions
47935  # have been made to CFLAGS etc.
47936  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47937  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47938  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
47939
47940  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
47941  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
47942  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
47943
47944  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
47945  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
47946  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
47947
47948  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
47949  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
47950  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
47951
47952
47953      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
47954      unset ac_cv_sizeof_int_p
47955      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
47956      cat >>confdefs.h <<_ACEOF
47957#undef SIZEOF_INT_P
47958_ACEOF
47959
47960      # The cast to long int works around a bug in the HP C Compiler
47961# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
47962# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
47963# This bug is HP SR number 8606223364.
47964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
47965$as_echo_n "checking size of int *... " >&6; }
47966if ${ac_cv_sizeof_int_p+:} false; then :
47967  $as_echo_n "(cached) " >&6
47968else
47969  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
47970
47971else
47972  if test "$ac_cv_type_int_p" = yes; then
47973     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47974$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47975as_fn_error 77 "cannot compute sizeof (int *)
47976See \`config.log' for more details" "$LINENO" 5; }
47977   else
47978     ac_cv_sizeof_int_p=0
47979   fi
47980fi
47981
47982fi
47983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
47984$as_echo "$ac_cv_sizeof_int_p" >&6; }
47985
47986
47987
47988cat >>confdefs.h <<_ACEOF
47989#define SIZEOF_INT_P $ac_cv_sizeof_int_p
47990_ACEOF
47991
47992
47993
47994      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
47995
47996      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
47997        { $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
47998$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;}
47999        if test "x$COMPILE_TYPE" = xreduced; then
48000
48001  # Print a helpful message on how to acquire the necessary build dependency.
48002  # reduced is the help tag: freetype, cups, alsa etc
48003  MISSING_DEPENDENCY=reduced
48004
48005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48006    cygwin_help $MISSING_DEPENDENCY
48007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48008    msys_help $MISSING_DEPENDENCY
48009  else
48010    PKGHANDLER_COMMAND=
48011
48012    case $PKGHANDLER in
48013      apt-get)
48014        apt_help     $MISSING_DEPENDENCY ;;
48015      yum)
48016        yum_help     $MISSING_DEPENDENCY ;;
48017      port)
48018        port_help    $MISSING_DEPENDENCY ;;
48019      pkgutil)
48020        pkgutil_help $MISSING_DEPENDENCY ;;
48021      pkgadd)
48022        pkgadd_help  $MISSING_DEPENDENCY ;;
48023    esac
48024
48025    if test "x$PKGHANDLER_COMMAND" != x; then
48026      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48027    fi
48028  fi
48029
48030          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48031$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48032        elif test "x$COMPILE_TYPE" = xcross; then
48033          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48034$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48035        fi
48036        as_fn_error $? "Cannot continue." "$LINENO" 5
48037      fi
48038    fi
48039  fi
48040
48041  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48042$as_echo_n "checking for target address size... " >&6; }
48043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48044$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48045
48046
48047  ###############################################################################
48048  #
48049  # Is the target little of big endian?
48050  #
48051   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48052$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48053if ${ac_cv_c_bigendian+:} false; then :
48054  $as_echo_n "(cached) " >&6
48055else
48056  ac_cv_c_bigendian=unknown
48057    # See if we're dealing with a universal compiler.
48058    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48059/* end confdefs.h.  */
48060#ifndef __APPLE_CC__
48061	       not a universal capable compiler
48062	     #endif
48063	     typedef int dummy;
48064
48065_ACEOF
48066if ac_fn_cxx_try_compile "$LINENO"; then :
48067
48068	# Check for potential -arch flags.  It is not universal unless
48069	# there are at least two -arch flags with different values.
48070	ac_arch=
48071	ac_prev=
48072	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48073	 if test -n "$ac_prev"; then
48074	   case $ac_word in
48075	     i?86 | x86_64 | ppc | ppc64)
48076	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48077		 ac_arch=$ac_word
48078	       else
48079		 ac_cv_c_bigendian=universal
48080		 break
48081	       fi
48082	       ;;
48083	   esac
48084	   ac_prev=
48085	 elif test "x$ac_word" = "x-arch"; then
48086	   ac_prev=arch
48087	 fi
48088       done
48089fi
48090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48091    if test $ac_cv_c_bigendian = unknown; then
48092      # See if sys/param.h defines the BYTE_ORDER macro.
48093      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48094/* end confdefs.h.  */
48095#include <sys/types.h>
48096	     #include <sys/param.h>
48097
48098int
48099main ()
48100{
48101#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48102		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48103		     && LITTLE_ENDIAN)
48104	      bogus endian macros
48105	     #endif
48106
48107  ;
48108  return 0;
48109}
48110_ACEOF
48111if ac_fn_cxx_try_compile "$LINENO"; then :
48112  # It does; now see whether it defined to BIG_ENDIAN or not.
48113	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48114/* end confdefs.h.  */
48115#include <sys/types.h>
48116		#include <sys/param.h>
48117
48118int
48119main ()
48120{
48121#if BYTE_ORDER != BIG_ENDIAN
48122		 not big endian
48123		#endif
48124
48125  ;
48126  return 0;
48127}
48128_ACEOF
48129if ac_fn_cxx_try_compile "$LINENO"; then :
48130  ac_cv_c_bigendian=yes
48131else
48132  ac_cv_c_bigendian=no
48133fi
48134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48135fi
48136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48137    fi
48138    if test $ac_cv_c_bigendian = unknown; then
48139      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48140      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48141/* end confdefs.h.  */
48142#include <limits.h>
48143
48144int
48145main ()
48146{
48147#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48148	      bogus endian macros
48149	     #endif
48150
48151  ;
48152  return 0;
48153}
48154_ACEOF
48155if ac_fn_cxx_try_compile "$LINENO"; then :
48156  # It does; now see whether it defined to _BIG_ENDIAN or not.
48157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48158/* end confdefs.h.  */
48159#include <limits.h>
48160
48161int
48162main ()
48163{
48164#ifndef _BIG_ENDIAN
48165		 not big endian
48166		#endif
48167
48168  ;
48169  return 0;
48170}
48171_ACEOF
48172if ac_fn_cxx_try_compile "$LINENO"; then :
48173  ac_cv_c_bigendian=yes
48174else
48175  ac_cv_c_bigendian=no
48176fi
48177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48178fi
48179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48180    fi
48181    if test $ac_cv_c_bigendian = unknown; then
48182      # Compile a test program.
48183      if test "$cross_compiling" = yes; then :
48184  # Try to guess by grepping values from an object file.
48185	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48186/* end confdefs.h.  */
48187short int ascii_mm[] =
48188		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48189		short int ascii_ii[] =
48190		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48191		int use_ascii (int i) {
48192		  return ascii_mm[i] + ascii_ii[i];
48193		}
48194		short int ebcdic_ii[] =
48195		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48196		short int ebcdic_mm[] =
48197		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48198		int use_ebcdic (int i) {
48199		  return ebcdic_mm[i] + ebcdic_ii[i];
48200		}
48201		extern int foo;
48202
48203int
48204main ()
48205{
48206return use_ascii (foo) == use_ebcdic (foo);
48207  ;
48208  return 0;
48209}
48210_ACEOF
48211if ac_fn_cxx_try_compile "$LINENO"; then :
48212  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48213	      ac_cv_c_bigendian=yes
48214	    fi
48215	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48216	      if test "$ac_cv_c_bigendian" = unknown; then
48217		ac_cv_c_bigendian=no
48218	      else
48219		# finding both strings is unlikely to happen, but who knows?
48220		ac_cv_c_bigendian=unknown
48221	      fi
48222	    fi
48223fi
48224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48225else
48226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48227/* end confdefs.h.  */
48228$ac_includes_default
48229int
48230main ()
48231{
48232
48233	     /* Are we little or big endian?  From Harbison&Steele.  */
48234	     union
48235	     {
48236	       long int l;
48237	       char c[sizeof (long int)];
48238	     } u;
48239	     u.l = 1;
48240	     return u.c[sizeof (long int) - 1] == 1;
48241
48242  ;
48243  return 0;
48244}
48245_ACEOF
48246if ac_fn_cxx_try_run "$LINENO"; then :
48247  ac_cv_c_bigendian=no
48248else
48249  ac_cv_c_bigendian=yes
48250fi
48251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48252  conftest.$ac_objext conftest.beam conftest.$ac_ext
48253fi
48254
48255    fi
48256fi
48257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48258$as_echo "$ac_cv_c_bigendian" >&6; }
48259 case $ac_cv_c_bigendian in #(
48260   yes)
48261     ENDIAN="big";; #(
48262   no)
48263     ENDIAN="little" ;; #(
48264   universal)
48265     ENDIAN="universal_endianness"
48266     ;; #(
48267   *)
48268     ENDIAN="unknown" ;;
48269 esac
48270
48271
48272  if test "x$ENDIAN" = xuniversal_endianness; then
48273    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48274  fi
48275  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48276    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
48277  fi
48278
48279
48280# Configure flags for the tools
48281
48282  ###############################################################################
48283  #
48284  # How to compile shared libraries.
48285  #
48286
48287  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48288    PICFLAG="-fPIC"
48289    C_FLAG_REORDER=''
48290    CXX_FLAG_REORDER=''
48291
48292    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48293      # Linking is different on MacOSX
48294      if test "x$STATIC_BUILD" = xtrue; then
48295        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48296      else
48297        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48298        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48299      fi
48300      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48301      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48302      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48303      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48304    else
48305      # Default works for linux, might work on other platforms as well.
48306      SHARED_LIBRARY_FLAGS='-shared'
48307      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48308      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48309      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48310      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48311    fi
48312  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48313    C_FLAG_REORDER=''
48314    CXX_FLAG_REORDER=''
48315
48316    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48317      # Linking is different on MacOSX
48318      PICFLAG=''
48319      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48320      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48321      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48322      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48323      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48324
48325      if test "x$STATIC_BUILD" = xfalse; then
48326        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48327      fi
48328    else
48329      # Default works for linux, might work on other platforms as well.
48330      PICFLAG='-fPIC'
48331      SHARED_LIBRARY_FLAGS='-shared'
48332      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48333      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48334      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48335      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48336    fi
48337  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48338    PICFLAG="-KPIC"
48339    C_FLAG_REORDER='-xF'
48340    CXX_FLAG_REORDER='-xF'
48341    SHARED_LIBRARY_FLAGS="-G"
48342    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48343    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48344    SET_SHARED_LIBRARY_NAME='-h $1'
48345    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48346  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48347    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48348    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48349    # will have to patch this single instruction with a call to some out-of-order code which
48350    # does the load from the TOC. This is of course slow. But in that case we also would have
48351    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48352    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48353    # can be patched directly by the linker and does not require a jump to out-of-order code.
48354    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48355    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48356    # loads for accessing a global variable). But there are rumors that this may be seen as a
48357    # 'performance feature' because of improved code locality of the symbols used in a
48358    # compilation unit.
48359    PICFLAG="-qpic"
48360    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48361    C_FLAG_REORDER=''
48362    CXX_FLAG_REORDER=''
48363    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48364    SET_EXECUTABLE_ORIGIN=""
48365    SET_SHARED_LIBRARY_ORIGIN=''
48366    SET_SHARED_LIBRARY_NAME=''
48367    SET_SHARED_LIBRARY_MAPFILE=''
48368  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48369    PICFLAG=""
48370    C_FLAG_REORDER=''
48371    CXX_FLAG_REORDER=''
48372    SHARED_LIBRARY_FLAGS="-dll"
48373    SET_EXECUTABLE_ORIGIN=''
48374    SET_SHARED_LIBRARY_ORIGIN=''
48375    SET_SHARED_LIBRARY_NAME=''
48376    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48377  fi
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387  # The (cross) compiler is now configured, we can now test capabilities
48388  # of the target platform.
48389
48390
48391
48392  ###############################################################################
48393  #
48394  # Setup the opt flags for different compilers
48395  # and different operating systems.
48396  #
48397
48398  # FIXME: this was indirectly the old default, but just inherited.
48399  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48400  #   C_FLAG_DEPS="-MMD -MF"
48401  # fi
48402
48403  # Generate make dependency files
48404  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48405    C_FLAG_DEPS="-MMD -MF"
48406  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48407    C_FLAG_DEPS="-MMD -MF"
48408  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48409    C_FLAG_DEPS="-xMMD -xMF"
48410  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48411    C_FLAG_DEPS="-qmakedep=gcc -MF"
48412  fi
48413  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48414
48415
48416
48417  # Debug symbols
48418  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48419    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48420      # reduce from default "-g2" option to save space
48421      CFLAGS_DEBUG_SYMBOLS="-g1"
48422      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48423    else
48424      CFLAGS_DEBUG_SYMBOLS="-g"
48425      CXXFLAGS_DEBUG_SYMBOLS="-g"
48426    fi
48427  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48428    CFLAGS_DEBUG_SYMBOLS="-g"
48429    CXXFLAGS_DEBUG_SYMBOLS="-g"
48430  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48431    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48432    # -g0 enables debug symbols without disabling inlining.
48433    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48434  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48435    CFLAGS_DEBUG_SYMBOLS="-g"
48436    CXXFLAGS_DEBUG_SYMBOLS="-g"
48437  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48438    CFLAGS_DEBUG_SYMBOLS="-Zi"
48439    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48440  fi
48441
48442
48443
48444  # Debug symbols for JVM_CFLAGS
48445  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48446    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48447    if test "x$DEBUG_LEVEL" = xslowdebug; then
48448      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48449    else
48450      # -g0 does not disable inlining, which -g does.
48451      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48452    fi
48453  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48454    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48455  else
48456    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48457  fi
48458
48459
48460  # bounds, memory and behavior checking options
48461  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48462    case $DEBUG_LEVEL in
48463    release )
48464      # no adjustment
48465      ;;
48466    fastdebug )
48467      # no adjustment
48468      ;;
48469    slowdebug )
48470      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48471      # get's added conditionally on whether we produce debug symbols or not.
48472      # This is most likely not really correct.
48473
48474      # Add runtime stack smashing and undefined behavior checks.
48475      # Not all versions of gcc support -fstack-protector
48476      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
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
48516
48517
48518
48519    # Execute function body
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
48565
48566
48567
48568    # Execute function body
48569
48570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48571$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48572  supports=yes
48573
48574  saved_cflags="$CFLAGS"
48575  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48576  ac_ext=c
48577ac_cpp='$CPP $CPPFLAGS'
48578ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48579ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48580ac_compiler_gnu=$ac_cv_c_compiler_gnu
48581
48582  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48583/* end confdefs.h.  */
48584int i;
48585_ACEOF
48586if ac_fn_c_try_compile "$LINENO"; then :
48587
48588else
48589  supports=no
48590fi
48591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48592  ac_ext=cpp
48593ac_cpp='$CXXCPP $CPPFLAGS'
48594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48597
48598  CFLAGS="$saved_cflags"
48599
48600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48601$as_echo "$supports" >&6; }
48602  if test "x$supports" = "xyes" ; then
48603    :
48604    C_COMP_SUPPORTS="yes"
48605  else
48606    :
48607    C_COMP_SUPPORTS="no"
48608  fi
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
48665
48666
48667
48668    # Execute function body
48669
48670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48671$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48672  supports=yes
48673
48674  saved_cxxflags="$CXXFLAGS"
48675  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48676  ac_ext=cpp
48677ac_cpp='$CXXCPP $CPPFLAGS'
48678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48681
48682  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48683/* end confdefs.h.  */
48684int i;
48685_ACEOF
48686if ac_fn_cxx_try_compile "$LINENO"; then :
48687
48688else
48689  supports=no
48690fi
48691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48692  ac_ext=cpp
48693ac_cpp='$CXXCPP $CPPFLAGS'
48694ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48695ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48696ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48697
48698  CXXFLAGS="$saved_cxxflags"
48699
48700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48701$as_echo "$supports" >&6; }
48702  if test "x$supports" = "xyes" ; then
48703    :
48704    CXX_COMP_SUPPORTS="yes"
48705  else
48706    :
48707    CXX_COMP_SUPPORTS="no"
48708  fi
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48723$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48724  supports=no
48725  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48726
48727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48728$as_echo "$supports" >&6; }
48729  if test "x$supports" = "xyes" ; then
48730    :
48731
48732  else
48733    :
48734    STACK_PROTECTOR_CFLAG=""
48735  fi
48736
48737
48738
48739
48740
48741
48742
48743      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48744      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48745      if test "x$STACK_PROTECTOR_CFLAG" != x; then
48746        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
48747      fi
48748      ;;
48749    esac
48750  fi
48751
48752  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48753    if test "x$DEBUG_LEVEL" != xrelease; then
48754      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
48755        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
48756      fi
48757    fi
48758  fi
48759
48760  # Optimization levels
48761  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48762    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
48763
48764    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
48765      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
48766      C_O_FLAG_HIGHEST_JVM="-xO4"
48767      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
48768      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
48769      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
48770      C_O_FLAG_DEBUG="-xregs=no%frameptr"
48771      C_O_FLAG_DEBUG_JVM=""
48772      C_O_FLAG_NONE="-xregs=no%frameptr"
48773      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48774      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
48775      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
48776      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
48777      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
48778      CXX_O_FLAG_DEBUG_JVM=""
48779      CXX_O_FLAG_NONE="-xregs=no%frameptr"
48780      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
48781        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
48782        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
48783      fi
48784    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48785      C_O_FLAG_HIGHEST_JVM="-xO4"
48786      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
48787      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48788      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
48789      C_O_FLAG_DEBUG=""
48790      C_O_FLAG_DEBUG_JVM=""
48791      C_O_FLAG_NONE=""
48792      CXX_O_FLAG_HIGHEST_JVM="-xO4"
48793      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
48794      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48795      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
48796      CXX_O_FLAG_DEBUG=""
48797      CXX_O_FLAG_DEBUG_JVM=""
48798      CXX_O_FLAG_NONE=""
48799    fi
48800  else
48801    # The remaining toolchains share opt flags between CC and CXX;
48802    # setup for C and duplicate afterwards.
48803    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48804      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48805        # On MacOSX we optimize for size, something
48806        # we should do for all platforms?
48807        C_O_FLAG_HIGHEST_JVM="-Os"
48808        C_O_FLAG_HIGHEST="-Os"
48809        C_O_FLAG_HI="-Os"
48810        C_O_FLAG_NORM="-Os"
48811        C_O_FLAG_SIZE="-Os"
48812      else
48813        C_O_FLAG_HIGHEST_JVM="-O3"
48814        C_O_FLAG_HIGHEST="-O3"
48815        C_O_FLAG_HI="-O3"
48816        C_O_FLAG_NORM="-O2"
48817        C_O_FLAG_SIZE="-Os"
48818      fi
48819      C_O_FLAG_DEBUG="-O0"
48820      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48821        C_O_FLAG_DEBUG_JVM=""
48822      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48823        C_O_FLAG_DEBUG_JVM="-O0"
48824      fi
48825      C_O_FLAG_NONE="-O0"
48826    elif test "x$TOOLCHAIN_TYPE" = xclang; then
48827      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48828        # On MacOSX we optimize for size, something
48829        # we should do for all platforms?
48830        C_O_FLAG_HIGHEST_JVM="-Os"
48831        C_O_FLAG_HIGHEST="-Os"
48832        C_O_FLAG_HI="-Os"
48833        C_O_FLAG_NORM="-Os"
48834        C_O_FLAG_SIZE="-Os"
48835      else
48836        C_O_FLAG_HIGHEST_JVM="-O3"
48837        C_O_FLAG_HIGHEST="-O3"
48838        C_O_FLAG_HI="-O3"
48839        C_O_FLAG_NORM="-O2"
48840        C_O_FLAG_SIZE="-Os"
48841      fi
48842      C_O_FLAG_DEBUG="-O0"
48843      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48844        C_O_FLAG_DEBUG_JVM=""
48845      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
48846        C_O_FLAG_DEBUG_JVM="-O0"
48847      fi
48848      C_O_FLAG_NONE="-O0"
48849    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48850      C_O_FLAG_HIGHEST_JVM="-O3"
48851      C_O_FLAG_HIGHEST="-O3"
48852      C_O_FLAG_HI="-O3 -qstrict"
48853      C_O_FLAG_NORM="-O2"
48854      C_O_FLAG_DEBUG="-qnoopt"
48855      # FIXME: Value below not verified.
48856      C_O_FLAG_DEBUG_JVM=""
48857      C_O_FLAG_NONE="-qnoopt"
48858    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48859      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
48860      C_O_FLAG_HIGHEST="-O2"
48861      C_O_FLAG_HI="-O1"
48862      C_O_FLAG_NORM="-O1"
48863      C_O_FLAG_DEBUG="-Od"
48864      C_O_FLAG_DEBUG_JVM=""
48865      C_O_FLAG_NONE="-Od"
48866      C_O_FLAG_SIZE="-Os"
48867    fi
48868    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
48869    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
48870    CXX_O_FLAG_HI="$C_O_FLAG_HI"
48871    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
48872    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
48873    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
48874    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
48875    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
48876  fi
48877
48878  # Adjust optimization flags according to debug level.
48879  case $DEBUG_LEVEL in
48880    release )
48881      # no adjustment
48882      ;;
48883    fastdebug )
48884      # Not quite so much optimization
48885      C_O_FLAG_HI="$C_O_FLAG_NORM"
48886      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
48887      ;;
48888    slowdebug )
48889      # Disable optimization
48890      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
48891      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
48892      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
48893      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
48894      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
48895      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
48896      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
48897      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
48898      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
48899      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
48900      ;;
48901  esac
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921  # Special extras...
48922  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48923    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
48924      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48925      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
48926    fi
48927    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48928    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
48929  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48930    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48931    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
48932  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
48933    CXXSTD_CXXFLAG="-std=gnu++98"
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
48973
48974
48975
48976    # Execute function body
48977
48978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
48979$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
48980  supports=yes
48981
48982  saved_cxxflags="$CXXFLAGS"
48983  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
48984  ac_ext=cpp
48985ac_cpp='$CXXCPP $CPPFLAGS'
48986ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48987ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48988ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48989
48990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48991/* end confdefs.h.  */
48992int i;
48993_ACEOF
48994if ac_fn_cxx_try_compile "$LINENO"; then :
48995
48996else
48997  supports=no
48998fi
48999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49000  ac_ext=cpp
49001ac_cpp='$CXXCPP $CPPFLAGS'
49002ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49003ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49004ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49005
49006  CXXFLAGS="$saved_cxxflags"
49007
49008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49009$as_echo "$supports" >&6; }
49010  if test "x$supports" = "xyes" ; then
49011    :
49012
49013  else
49014    :
49015    CXXSTD_CXXFLAG=""
49016  fi
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49030
49031  fi
49032  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49033    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49034    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49035    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49036    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49037    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49038  fi
49039
49040  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49041    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49042    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49043    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49044  fi
49045
49046  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49047  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49048  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49049
49050  ###############################################################################
49051  #
49052  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49053  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49054  #
49055
49056  # Setup compiler/platform specific flags into
49057  #    CFLAGS_JDK    - C Compiler flags
49058  #    CXXFLAGS_JDK  - C++ Compiler flags
49059  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49060  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49061    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49062    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49063    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49064    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49065      # Force compatibility with i586 on 32 bit intel platforms.
49066      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49067      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49068    fi
49069    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49070        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49071    case $OPENJDK_TARGET_CPU_ARCH in
49072      arm )
49073        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49074        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49075        ;;
49076      ppc )
49077        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49078        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49079        ;;
49080      * )
49081        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49082        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49083        ;;
49084    esac
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
49124
49125
49126
49127    # Execute function body
49128
49129  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49130  REFERENCE_VERSION=6
49131
49132  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49133    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49134  fi
49135
49136  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49137    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49138  fi
49139
49140  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49141  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49142
49143  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49144    :
49145
49146  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49147  # runs afoul of the more aggressive versions of these optimisations.
49148  # Notably, value range propagation now assumes that the this pointer of C++
49149  # member functions is non-null.
49150  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
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
49190
49191
49192
49193    # Execute function body
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
49239
49240
49241
49242    # Execute function body
49243
49244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49245$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49246  supports=yes
49247
49248  saved_cflags="$CFLAGS"
49249  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49250  ac_ext=c
49251ac_cpp='$CPP $CPPFLAGS'
49252ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49253ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49254ac_compiler_gnu=$ac_cv_c_compiler_gnu
49255
49256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49257/* end confdefs.h.  */
49258int i;
49259_ACEOF
49260if ac_fn_c_try_compile "$LINENO"; then :
49261
49262else
49263  supports=no
49264fi
49265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49266  ac_ext=cpp
49267ac_cpp='$CXXCPP $CPPFLAGS'
49268ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49269ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49270ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49271
49272  CFLAGS="$saved_cflags"
49273
49274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49275$as_echo "$supports" >&6; }
49276  if test "x$supports" = "xyes" ; then
49277    :
49278    C_COMP_SUPPORTS="yes"
49279  else
49280    :
49281    C_COMP_SUPPORTS="no"
49282  fi
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
49339
49340
49341
49342    # Execute function body
49343
49344  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49345$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49346  supports=yes
49347
49348  saved_cxxflags="$CXXFLAGS"
49349  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49350  ac_ext=cpp
49351ac_cpp='$CXXCPP $CPPFLAGS'
49352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49355
49356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49357/* end confdefs.h.  */
49358int i;
49359_ACEOF
49360if ac_fn_cxx_try_compile "$LINENO"; then :
49361
49362else
49363  supports=no
49364fi
49365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49366  ac_ext=cpp
49367ac_cpp='$CXXCPP $CPPFLAGS'
49368ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49369ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49370ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49371
49372  CXXFLAGS="$saved_cxxflags"
49373
49374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49375$as_echo "$supports" >&6; }
49376  if test "x$supports" = "xyes" ; then
49377    :
49378    CXX_COMP_SUPPORTS="yes"
49379  else
49380    :
49381    CXX_COMP_SUPPORTS="no"
49382  fi
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49397$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49398  supports=no
49399  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49400
49401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49402$as_echo "$supports" >&6; }
49403  if test "x$supports" = "xyes" ; then
49404    :
49405
49406  else
49407    :
49408    NO_NULL_POINTER_CHECK_CFLAG=""
49409  fi
49410
49411
49412
49413
49414
49415
49416
49417  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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
49457
49458
49459
49460    # Execute function body
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
49506
49507
49508
49509    # Execute function body
49510
49511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49512$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49513  supports=yes
49514
49515  saved_cflags="$CFLAGS"
49516  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49517  ac_ext=c
49518ac_cpp='$CPP $CPPFLAGS'
49519ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49520ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49521ac_compiler_gnu=$ac_cv_c_compiler_gnu
49522
49523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49524/* end confdefs.h.  */
49525int i;
49526_ACEOF
49527if ac_fn_c_try_compile "$LINENO"; then :
49528
49529else
49530  supports=no
49531fi
49532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49533  ac_ext=cpp
49534ac_cpp='$CXXCPP $CPPFLAGS'
49535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49538
49539  CFLAGS="$saved_cflags"
49540
49541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49542$as_echo "$supports" >&6; }
49543  if test "x$supports" = "xyes" ; then
49544    :
49545    C_COMP_SUPPORTS="yes"
49546  else
49547    :
49548    C_COMP_SUPPORTS="no"
49549  fi
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
49606
49607
49608
49609    # Execute function body
49610
49611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49612$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49613  supports=yes
49614
49615  saved_cxxflags="$CXXFLAGS"
49616  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49617  ac_ext=cpp
49618ac_cpp='$CXXCPP $CPPFLAGS'
49619ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49620ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49621ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49622
49623  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49624/* end confdefs.h.  */
49625int i;
49626_ACEOF
49627if ac_fn_cxx_try_compile "$LINENO"; then :
49628
49629else
49630  supports=no
49631fi
49632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49633  ac_ext=cpp
49634ac_cpp='$CXXCPP $CPPFLAGS'
49635ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49636ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49637ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49638
49639  CXXFLAGS="$saved_cxxflags"
49640
49641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49642$as_echo "$supports" >&6; }
49643  if test "x$supports" = "xyes" ; then
49644    :
49645    CXX_COMP_SUPPORTS="yes"
49646  else
49647    :
49648    CXX_COMP_SUPPORTS="no"
49649  fi
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49664$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49665  supports=no
49666  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49667
49668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49669$as_echo "$supports" >&6; }
49670  if test "x$supports" = "xyes" ; then
49671    :
49672
49673  else
49674    :
49675    NO_LIFETIME_DSE_CFLAG=""
49676  fi
49677
49678
49679
49680
49681
49682
49683  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49684
49685
49686
49687  else
49688    :
49689
49690  fi
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49704    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49705
49706    # Restrict the debug information created by Clang to avoid
49707    # too big object files and speed the build up a little bit
49708    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49709    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49710    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49711      if test "x$OPENJDK_TARGET_CPU" = xx86; then
49712        # Force compatibility with i586 on 32 bit intel platforms.
49713        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49714        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49715      fi
49716      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49717      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49718          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49719      case $OPENJDK_TARGET_CPU_ARCH in
49720        ppc )
49721          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49722          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49723          ;;
49724        * )
49725          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49726          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49727          ;;
49728      esac
49729    fi
49730  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49731    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49732    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49733    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49734      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49735    fi
49736
49737    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
49738    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
49739  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49740    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
49741    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49742    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
49743  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49744    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
49745        -MD -Zc:wchar_t- -W3 -wd4800 \
49746        -DWIN32_LEAN_AND_MEAN \
49747        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
49748        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
49749        -DWIN32 -DIAL"
49750    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49751      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
49752    else
49753      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
49754    fi
49755    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
49756    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
49757    # studio.
49758    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
49759      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
49760      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
49761      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
49762    fi
49763  fi
49764
49765  ###############################################################################
49766
49767  # Adjust flags according to debug level.
49768  case $DEBUG_LEVEL in
49769    fastdebug | slowdebug )
49770      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
49771      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
49772      JAVAC_FLAGS="$JAVAC_FLAGS -g"
49773      ;;
49774    release )
49775      ;;
49776    * )
49777      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
49778      ;;
49779  esac
49780
49781  # Set some common defines. These works for all compilers, but assume
49782  # -D is universally accepted.
49783
49784  # Setup endianness
49785  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49786    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
49787    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
49788    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
49789    #   Note: -Dmacro         is the same as    #define macro 1
49790    #         -Dmacro=        is the same as    #define macro
49791    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49792      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
49793    else
49794      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
49795    fi
49796  else
49797    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
49798    # are defined in the system?
49799    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49800      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
49801    else
49802      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
49803    fi
49804  fi
49805
49806  # Setup target OS define. Use OS target name but in upper case.
49807  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
49808  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
49809
49810  # Setup target CPU
49811  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
49812      $OPENJDK_TARGET_ADD_LP64 \
49813      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
49814
49815  # Setup debug/release defines
49816  if test "x$DEBUG_LEVEL" = xrelease; then
49817    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
49818    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49819      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
49820    fi
49821  else
49822    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
49823  fi
49824
49825  # Set some additional per-OS defines.
49826  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49827    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
49828    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
49829        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
49830  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49831    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
49832    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
49833        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
49834  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49835    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
49836    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
49837    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
49838    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
49839        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
49840        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
49841        -fno-omit-frame-pointer"
49842  elif test "x$OPENJDK_TARGET_OS" = xaix; then
49843    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
49844    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
49845    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
49846        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
49847        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
49848  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
49849    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
49850  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49851    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
49852    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
49853  fi
49854
49855  # Set some additional per-CPU defines.
49856  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
49857    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
49858  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49859    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
49860  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
49861    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49862      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49863      # fixes `relocation truncated to fit' error for gcc 4.1.
49864      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
49865      # Use ppc64 instructions, but schedule for power5
49866      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
49867    elif test "x$OPENJDK_TARGET_OS" = xaix; then
49868      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
49869    fi
49870  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
49871    if test "x$OPENJDK_TARGET_OS" = xlinux; then
49872      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
49873      # Little endian machine uses ELFv2 ABI.
49874      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
49875      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
49876      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
49877    fi
49878  fi
49879
49880  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
49881    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
49882  fi
49883
49884  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49885    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
49886      # Solaris does not have _LP64=1 in the old build.
49887      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
49888      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
49889    fi
49890  fi
49891
49892  # Set JVM_CFLAGS warning handling
49893  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49894    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
49895        -Wunused-value -Woverloaded-virtual"
49896
49897    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
49937
49938
49939
49940    # Execute function body
49941
49942  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49943  REFERENCE_VERSION=4.8
49944
49945  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49946    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
49947  fi
49948
49949  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49950    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
49951  fi
49952
49953  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49954  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49955
49956  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49957    :
49958
49959            # These flags either do not work or give spurious warnings prior to gcc 4.8.
49960            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
49961
49962
49963  else
49964    :
49965
49966  fi
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979    fi
49980    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
49981      # Non-zero builds have stricter warnings
49982      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
49983    else
49984      if test "x$TOOLCHAIN_TYPE" = xclang; then
49985        # Some versions of llvm do not like -Wundef
49986        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
49987      fi
49988    fi
49989  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49990    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
49991        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
49992  fi
49993
49994  # Additional macosx handling
49995  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49996    # Setting these parameters makes it an error to link to macosx APIs that are
49997    # newer than the given OS version and makes the linked binaries compatible
49998    # even if built on a newer version of the OS.
49999    # The expected format is X.Y.Z
50000    MACOSX_VERSION_MIN=10.7.0
50001
50002
50003    # The macro takes the version with no dots, ex: 1070
50004    # Let the flags variables get resolved in make for easier override on make
50005    # command line.
50006    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50007    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50008  fi
50009
50010  # Setup some hard coded includes
50011  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50012      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50013      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50014      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50015      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50016      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50017
50018  # The shared libraries are compiled using the picflag.
50019  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50020      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50021  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50022      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50023
50024  # Executable flags
50025  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50026  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50027
50028
50029
50030
50031
50032
50033  # Setup LDFLAGS et al.
50034  #
50035
50036  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50037    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50038    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50039    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50040    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50041      LDFLAGS_SAFESH="-safeseh"
50042      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50043      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50044      # NOTE: Old build added -machine. Probably not needed.
50045      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50046    else
50047      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50048    fi
50049  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50050      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50051      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50052        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50053        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50054    fi
50055  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50056    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50057    # We have previously set HAS_GNU_HASH if this is the case
50058    if test -n "$HAS_GNU_HASH"; then
50059      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50060      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50061      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50062    fi
50063      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50064        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50065    fi
50066    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50067      # And since we now know that the linker is gnu, then add -z defs, to forbid
50068      # undefined symbols in object files.
50069      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50070      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50071      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50072      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50073      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50074      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50075        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50076      fi
50077      case $DEBUG_LEVEL in
50078        release )
50079          # tell linker to optimize libraries.
50080          # Should this be supplied to the OSS linker as well?
50081          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50082          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50083          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50084          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50085            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50086          fi
50087          ;;
50088        slowdebug )
50089          # Hotspot always let the linker optimize
50090          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50091          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50092            # do relocations at load
50093            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50094            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50095            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50096          fi
50097          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50098            # mark relocations read only
50099            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50100            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50101            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50102          fi
50103          ;;
50104        fastdebug )
50105          # Hotspot always let the linker optimize
50106          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50107          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50108            # mark relocations read only
50109            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50110            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50111            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50112          fi
50113          ;;
50114        * )
50115          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50116          ;;
50117        esac
50118    fi
50119  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50120    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50121    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50122    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50123    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50124    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50125    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50126      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50127    fi
50128  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50129    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50130    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50131    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50132  fi
50133
50134  # Customize LDFLAGS for executables
50135
50136  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50137
50138  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50139    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50140      LDFLAGS_STACK_SIZE=1048576
50141    else
50142      LDFLAGS_STACK_SIZE=327680
50143    fi
50144    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50145  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50146    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50147  fi
50148
50149  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50150
50151  # Customize LDFLAGS for libs
50152  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50153
50154  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50155  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50156    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50157        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50158    JDKLIB_LIBS=""
50159  else
50160    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50161        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50162
50163    if test "xTARGET" = "xTARGET"; then
50164    # On some platforms (mac) the linker warns about non existing -L dirs.
50165    # Add server first if available. Linking aginst client does not always produce the same results.
50166      # Only add client/minimal dir if client/minimal is being built.
50167    # Default to server for other variants.
50168      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50169        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50170      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50171        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50172      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50173        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50174    else
50175        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50176    fi
50177    elif test "xTARGET" = "xBUILD"; then
50178      # When building a buildjdk, it's always only the server variant
50179      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50180          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50181    fi
50182
50183    JDKLIB_LIBS="-ljava -ljvm"
50184    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50185      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50186    fi
50187
50188  fi
50189
50190  # Set JVM_LIBS (per os)
50191  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50192    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50193  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50194    # FIXME: This hard-coded path is not really proper.
50195    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50196      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50197    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50198      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50199    fi
50200    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50201        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50202  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50203    JVM_LIBS="$JVM_LIBS -lm"
50204  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50205    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50206  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50207    JVM_LIBS="$JVM_LIBS -lm"
50208  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50209    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50210        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50211        wsock32.lib winmm.lib version.lib psapi.lib"
50212    fi
50213
50214  # Set JVM_ASFLAGS
50215  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50216    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50217      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50218    fi
50219  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50220    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50221  fi
50222
50223  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239  # Special extras...
50240  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50241    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50242      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50243      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50244    fi
50245    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50246    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50247  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50248    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50249    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50250  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50251    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
50291
50292
50293
50294    # Execute function body
50295
50296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50297$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50298  supports=yes
50299
50300  saved_cxxflags="$CXXFLAGS"
50301  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50302  ac_ext=cpp
50303ac_cpp='$CXXCPP $CPPFLAGS'
50304ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50305ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50306ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50307
50308  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50309/* end confdefs.h.  */
50310int i;
50311_ACEOF
50312if ac_fn_cxx_try_compile "$LINENO"; then :
50313
50314else
50315  supports=no
50316fi
50317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50318  ac_ext=cpp
50319ac_cpp='$CXXCPP $CPPFLAGS'
50320ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50321ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50322ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50323
50324  CXXFLAGS="$saved_cxxflags"
50325
50326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50327$as_echo "$supports" >&6; }
50328  if test "x$supports" = "xyes" ; then
50329    :
50330
50331  else
50332    :
50333    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50334  fi
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50348
50349  fi
50350  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50351    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50352    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50353    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50354    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50355    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50356  fi
50357
50358  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50359    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50360    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50361    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50362  fi
50363
50364  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50365  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50366  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50367
50368  ###############################################################################
50369  #
50370  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50371  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50372  #
50373
50374  # Setup compiler/platform specific flags into
50375  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50376  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50377  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50378  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50379    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50380    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50381    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50382    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50383      # Force compatibility with i586 on 32 bit intel platforms.
50384      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50385      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50386    fi
50387    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50388        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50389    case $OPENJDK_BUILD_CPU_ARCH in
50390      arm )
50391        # on arm 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      ppc )
50395        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50396        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50397        ;;
50398      * )
50399        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50400        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50401        ;;
50402    esac
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
50442
50443
50444
50445    # Execute function body
50446
50447  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50448  REFERENCE_VERSION=6
50449
50450  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50451    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50452  fi
50453
50454  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50455    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50456  fi
50457
50458  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50459  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50460
50461  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50462    :
50463
50464  else
50465    :
50466
50467  fi
50468
50469
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50481    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50482
50483    # Restrict the debug information created by Clang to avoid
50484    # too big object files and speed the build up a little bit
50485    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50486    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50487    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50488      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50489        # Force compatibility with i586 on 32 bit intel platforms.
50490        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50491        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50492      fi
50493      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50494      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50495          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50496      case $OPENJDK_BUILD_CPU_ARCH in
50497        ppc )
50498          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50499          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50500          ;;
50501        * )
50502          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50503          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50504          ;;
50505      esac
50506    fi
50507  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50508    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50509    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50510    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50511      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50512    fi
50513
50514    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50515    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50516  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50517    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50518    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50519    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50520  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50521    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50522        -MD -Zc:wchar_t- -W3 -wd4800 \
50523        -DWIN32_LEAN_AND_MEAN \
50524        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50525        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50526        -DWIN32 -DIAL"
50527    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50528      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50529    else
50530      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50531    fi
50532    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50533    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50534    # studio.
50535    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50536      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50537      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50538      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50539    fi
50540  fi
50541
50542  ###############################################################################
50543
50544  # Adjust flags according to debug level.
50545  case $DEBUG_LEVEL in
50546    fastdebug | slowdebug )
50547      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50548      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50549      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50550      ;;
50551    release )
50552      ;;
50553    * )
50554      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50555      ;;
50556  esac
50557
50558  # Set some common defines. These works for all compilers, but assume
50559  # -D is universally accepted.
50560
50561  # Setup endianness
50562  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50563    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50564    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50565    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50566    #   Note: -Dmacro         is the same as    #define macro 1
50567    #         -Dmacro=        is the same as    #define macro
50568    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50569      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50570    else
50571      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50572    fi
50573  else
50574    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50575    # are defined in the system?
50576    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50577      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50578    else
50579      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50580    fi
50581  fi
50582
50583  # Setup target OS define. Use OS target name but in upper case.
50584  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50585  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50586
50587  # Setup target CPU
50588  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50589      $OPENJDK_BUILD_ADD_LP64 \
50590      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50591
50592  # Setup debug/release defines
50593  if test "x$DEBUG_LEVEL" = xrelease; then
50594    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50595    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50596      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50597    fi
50598  else
50599    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50600  fi
50601
50602  # Set some additional per-OS defines.
50603  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50604    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50605    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50606        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50607  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50608    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50609    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50610        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50611  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50612    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50613    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50614    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50615    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50616        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50617        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50618        -fno-omit-frame-pointer"
50619  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50620    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50621    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50622    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50623        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50624        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50625  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50626    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50627  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50628    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50629    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50630  fi
50631
50632  # Set some additional per-CPU defines.
50633  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50634    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50635  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50636    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50637  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50638    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50639      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50640      # fixes `relocation truncated to fit' error for gcc 4.1.
50641      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50642      # Use ppc64 instructions, but schedule for power5
50643      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50644    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50645      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50646    fi
50647  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50648    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50649      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50650      # Little endian machine uses ELFv2 ABI.
50651      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50652      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50653      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50654    fi
50655  fi
50656
50657  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50658    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50659  fi
50660
50661  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50662    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50663      # Solaris does not have _LP64=1 in the old build.
50664      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50665      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50666    fi
50667  fi
50668
50669  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50670  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50671    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50672        -Wunused-value -Woverloaded-virtual"
50673
50674    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50714
50715
50716
50717    # Execute function body
50718
50719  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50720  REFERENCE_VERSION=4.8
50721
50722  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50723    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50724  fi
50725
50726  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50727    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50728  fi
50729
50730  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50731  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50732
50733  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50734    :
50735
50736            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50737            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50738
50739
50740  else
50741    :
50742
50743  fi
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756    fi
50757    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50758      # Non-zero builds have stricter warnings
50759      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50760    else
50761      if test "x$TOOLCHAIN_TYPE" = xclang; then
50762        # Some versions of llvm do not like -Wundef
50763        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
50764      fi
50765    fi
50766  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50767    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50768        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50769  fi
50770
50771  # Additional macosx handling
50772  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50773    # Setting these parameters makes it an error to link to macosx APIs that are
50774    # newer than the given OS version and makes the linked binaries compatible
50775    # even if built on a newer version of the OS.
50776    # The expected format is X.Y.Z
50777    MACOSX_VERSION_MIN=10.7.0
50778
50779
50780    # The macro takes the version with no dots, ex: 1070
50781    # Let the flags variables get resolved in make for easier override on make
50782    # command line.
50783    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)"
50784    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50785  fi
50786
50787  # Setup some hard coded includes
50788  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50789      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50790      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
50791      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
50792      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50793      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
50794
50795  # The shared libraries are compiled using the picflag.
50796  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50797      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
50798  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50799      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
50800
50801  # Executable flags
50802  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
50803  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
50804
50805
50806
50807
50808
50809
50810  # Setup LDFLAGS et al.
50811  #
50812
50813  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50814    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50815    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50816    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50817    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
50818      LDFLAGS_SAFESH="-safeseh"
50819      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
50820      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
50821      # NOTE: Old build added -machine. Probably not needed.
50822      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
50823    else
50824      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
50825    fi
50826  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50827      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50828      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50829        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50830        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50831    fi
50832  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50833    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50834    # We have previously set HAS_GNU_HASH if this is the case
50835    if test -n "$HAS_GNU_HASH"; then
50836      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50837      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50838      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
50839    fi
50840      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
50841        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50842    fi
50843    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50844      # And since we now know that the linker is gnu, then add -z defs, to forbid
50845      # undefined symbols in object files.
50846      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50847      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50848      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50849      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50850      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50851      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50852        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
50853      fi
50854      case $DEBUG_LEVEL in
50855        release )
50856          # tell linker to optimize libraries.
50857          # Should this be supplied to the OSS linker as well?
50858          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50859          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50860          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50861          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50862            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50863          fi
50864          ;;
50865        slowdebug )
50866          # Hotspot always let the linker optimize
50867          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50868          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50869            # do relocations at load
50870            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
50871            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50872            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
50873          fi
50874          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50875            # mark relocations read only
50876            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50877            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50878            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50879          fi
50880          ;;
50881        fastdebug )
50882          # Hotspot always let the linker optimize
50883          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
50884          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50885            # mark relocations read only
50886            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
50887            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50888            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
50889          fi
50890          ;;
50891        * )
50892          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50893          ;;
50894        esac
50895    fi
50896  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50897    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50898    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50899    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50900    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50901    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50902    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50903      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
50904    fi
50905  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50906    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50907    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
50908    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
50909  fi
50910
50911  # Customize LDFLAGS for executables
50912
50913  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
50914
50915  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50916    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
50917      LDFLAGS_STACK_SIZE=1048576
50918    else
50919      LDFLAGS_STACK_SIZE=327680
50920    fi
50921    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50922  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
50923    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50924  fi
50925
50926  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
50927
50928  # Customize LDFLAGS for libs
50929  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
50930
50931  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50932  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50933    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50934        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50935    OPENJDK_BUILD_JDKLIB_LIBS=""
50936  else
50937    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50938        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
50939
50940    if test "xBUILD" = "xTARGET"; then
50941    # On some platforms (mac) the linker warns about non existing -L dirs.
50942    # Add server first if available. Linking aginst client does not always produce the same results.
50943      # Only add client/minimal dir if client/minimal is being built.
50944    # Default to server for other variants.
50945      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50946        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50947      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50948        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
50949      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50950        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
50951    else
50952        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50953    fi
50954    elif test "xBUILD" = "xBUILD"; then
50955      # When building a buildjdk, it's always only the server variant
50956      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
50957          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
50958    fi
50959
50960    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
50961    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50962      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
50963    fi
50964
50965  fi
50966
50967  # Set OPENJDK_BUILD_JVM_LIBS (per os)
50968  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50969    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
50970  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50971    # FIXME: This hard-coded path is not really proper.
50972    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50973      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50974    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50975      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50976    fi
50977    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50978        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50979  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50980    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50981  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50982    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50983  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50984    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
50985  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50986    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50987        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50988        wsock32.lib winmm.lib version.lib psapi.lib"
50989    fi
50990
50991  # Set OPENJDK_BUILD_JVM_ASFLAGS
50992  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50993    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50994      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
50995    fi
50996  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50997    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50998  fi
50999
51000  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51001
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016  # Tests are only ever compiled for TARGET
51017  # Flags for compiling test libraries
51018  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51019  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51020
51021  # Flags for compiling test executables
51022  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51023  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51024
51025
51026
51027
51028
51029
51030  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51031  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51032
51033
51034
51035
51036
51037
51038  # Some Zero and Shark settings.
51039  # ZERO_ARCHFLAG tells the compiler which mode to build for
51040  case "${OPENJDK_TARGET_CPU}" in
51041    s390)
51042      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51043      ;;
51044    *)
51045      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51046  esac
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
51086
51087
51088
51089    # Execute function body
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
51135
51136
51137
51138    # Execute function body
51139
51140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51141$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51142  supports=yes
51143
51144  saved_cflags="$CFLAGS"
51145  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51146  ac_ext=c
51147ac_cpp='$CPP $CPPFLAGS'
51148ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51149ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51150ac_compiler_gnu=$ac_cv_c_compiler_gnu
51151
51152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51153/* end confdefs.h.  */
51154int i;
51155_ACEOF
51156if ac_fn_c_try_compile "$LINENO"; then :
51157
51158else
51159  supports=no
51160fi
51161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51162  ac_ext=cpp
51163ac_cpp='$CXXCPP $CPPFLAGS'
51164ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51165ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51166ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51167
51168  CFLAGS="$saved_cflags"
51169
51170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51171$as_echo "$supports" >&6; }
51172  if test "x$supports" = "xyes" ; then
51173    :
51174    C_COMP_SUPPORTS="yes"
51175  else
51176    :
51177    C_COMP_SUPPORTS="no"
51178  fi
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
51235
51236
51237
51238    # Execute function body
51239
51240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51241$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51242  supports=yes
51243
51244  saved_cxxflags="$CXXFLAGS"
51245  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51246  ac_ext=cpp
51247ac_cpp='$CXXCPP $CPPFLAGS'
51248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51251
51252  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51253/* end confdefs.h.  */
51254int i;
51255_ACEOF
51256if ac_fn_cxx_try_compile "$LINENO"; then :
51257
51258else
51259  supports=no
51260fi
51261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51262  ac_ext=cpp
51263ac_cpp='$CXXCPP $CPPFLAGS'
51264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51267
51268  CXXFLAGS="$saved_cxxflags"
51269
51270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51271$as_echo "$supports" >&6; }
51272  if test "x$supports" = "xyes" ; then
51273    :
51274    CXX_COMP_SUPPORTS="yes"
51275  else
51276    :
51277    CXX_COMP_SUPPORTS="no"
51278  fi
51279
51280
51281
51282
51283
51284
51285
51286
51287
51288
51289
51290
51291
51292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51293$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51294  supports=no
51295  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51296
51297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51298$as_echo "$supports" >&6; }
51299  if test "x$supports" = "xyes" ; then
51300    :
51301
51302  else
51303    :
51304    ZERO_ARCHFLAG=""
51305  fi
51306
51307
51308
51309
51310
51311
51312
51313
51314  # Check that the compiler supports -mX (or -qX on AIX) flags
51315  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
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
51360
51361
51362
51363    # Execute function body
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
51409
51410
51411
51412    # Execute function body
51413
51414  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51415$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51416  supports=yes
51417
51418  saved_cflags="$CFLAGS"
51419  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51420  ac_ext=c
51421ac_cpp='$CPP $CPPFLAGS'
51422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51424ac_compiler_gnu=$ac_cv_c_compiler_gnu
51425
51426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51427/* end confdefs.h.  */
51428int i;
51429_ACEOF
51430if ac_fn_c_try_compile "$LINENO"; then :
51431
51432else
51433  supports=no
51434fi
51435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51436  ac_ext=cpp
51437ac_cpp='$CXXCPP $CPPFLAGS'
51438ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51439ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51440ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51441
51442  CFLAGS="$saved_cflags"
51443
51444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51445$as_echo "$supports" >&6; }
51446  if test "x$supports" = "xyes" ; then
51447    :
51448    C_COMP_SUPPORTS="yes"
51449  else
51450    :
51451    C_COMP_SUPPORTS="no"
51452  fi
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
51509
51510
51511
51512    # Execute function body
51513
51514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51515$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51516  supports=yes
51517
51518  saved_cxxflags="$CXXFLAGS"
51519  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51520  ac_ext=cpp
51521ac_cpp='$CXXCPP $CPPFLAGS'
51522ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51523ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51524ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51525
51526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51527/* end confdefs.h.  */
51528int i;
51529_ACEOF
51530if ac_fn_cxx_try_compile "$LINENO"; then :
51531
51532else
51533  supports=no
51534fi
51535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51536  ac_ext=cpp
51537ac_cpp='$CXXCPP $CPPFLAGS'
51538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51541
51542  CXXFLAGS="$saved_cxxflags"
51543
51544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51545$as_echo "$supports" >&6; }
51546  if test "x$supports" = "xyes" ; then
51547    :
51548    CXX_COMP_SUPPORTS="yes"
51549  else
51550    :
51551    CXX_COMP_SUPPORTS="no"
51552  fi
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51567$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51568  supports=no
51569  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51570
51571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51572$as_echo "$supports" >&6; }
51573  if test "x$supports" = "xyes" ; then
51574    :
51575    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51576  else
51577    :
51578    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51579  fi
51580
51581
51582
51583
51584
51585
51586
51587
51588  # Check whether --enable-warnings-as-errors was given.
51589if test "${enable_warnings_as_errors+set}" = set; then :
51590  enableval=$enable_warnings_as_errors;
51591fi
51592
51593
51594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51595$as_echo_n "checking if native warnings are errors... " >&6; }
51596  if test "x$enable_warnings_as_errors" = "xyes"; then
51597    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51598$as_echo "yes (explicitely set)" >&6; }
51599    WARNINGS_AS_ERRORS=true
51600  elif test "x$enable_warnings_as_errors" = "xno"; then
51601    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51602$as_echo "no" >&6; }
51603    WARNINGS_AS_ERRORS=false
51604  elif test "x$enable_warnings_as_errors" = "x"; then
51605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51606$as_echo "yes (default)" >&6; }
51607    WARNINGS_AS_ERRORS=true
51608  else
51609    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51610  fi
51611
51612  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51613    # Set legacy hotspot variable
51614    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51615  else
51616    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51617  fi
51618
51619
51620
51621
51622  case "${TOOLCHAIN_TYPE}" in
51623    microsoft)
51624      DISABLE_WARNING_PREFIX="-wd"
51625      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51626      ;;
51627    solstudio)
51628      DISABLE_WARNING_PREFIX="-erroff="
51629      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51630      ;;
51631    gcc)
51632      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
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
51677
51678
51679
51680    # Execute function body
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
51726
51727
51728
51729    # Execute function body
51730
51731  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51732$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51733  supports=yes
51734
51735  saved_cflags="$CFLAGS"
51736  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
51737  ac_ext=c
51738ac_cpp='$CPP $CPPFLAGS'
51739ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51740ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51741ac_compiler_gnu=$ac_cv_c_compiler_gnu
51742
51743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51744/* end confdefs.h.  */
51745int i;
51746_ACEOF
51747if ac_fn_c_try_compile "$LINENO"; then :
51748
51749else
51750  supports=no
51751fi
51752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51753  ac_ext=cpp
51754ac_cpp='$CXXCPP $CPPFLAGS'
51755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51758
51759  CFLAGS="$saved_cflags"
51760
51761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51762$as_echo "$supports" >&6; }
51763  if test "x$supports" = "xyes" ; then
51764    :
51765    C_COMP_SUPPORTS="yes"
51766  else
51767    :
51768    C_COMP_SUPPORTS="no"
51769  fi
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
51826
51827
51828
51829    # Execute function body
51830
51831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51832$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51833  supports=yes
51834
51835  saved_cxxflags="$CXXFLAGS"
51836  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
51837  ac_ext=cpp
51838ac_cpp='$CXXCPP $CPPFLAGS'
51839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51842
51843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51844/* end confdefs.h.  */
51845int i;
51846_ACEOF
51847if ac_fn_cxx_try_compile "$LINENO"; then :
51848
51849else
51850  supports=no
51851fi
51852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51853  ac_ext=cpp
51854ac_cpp='$CXXCPP $CPPFLAGS'
51855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51858
51859  CXXFLAGS="$saved_cxxflags"
51860
51861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51862$as_echo "$supports" >&6; }
51863  if test "x$supports" = "xyes" ; then
51864    :
51865    CXX_COMP_SUPPORTS="yes"
51866  else
51867    :
51868    CXX_COMP_SUPPORTS="no"
51869  fi
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
51884$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
51885  supports=no
51886  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51887
51888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51889$as_echo "$supports" >&6; }
51890  if test "x$supports" = "xyes" ; then
51891    :
51892    GCC_CAN_DISABLE_WARNINGS=true
51893  else
51894    :
51895    GCC_CAN_DISABLE_WARNINGS=false
51896
51897  fi
51898
51899
51900
51901
51902
51903
51904      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
51905        DISABLE_WARNING_PREFIX="-Wno-"
51906      else
51907        DISABLE_WARNING_PREFIX=
51908      fi
51909      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
51910      # Repeate the check for the BUILD_CC
51911      CC_OLD="$CC"
51912      CC="$BUILD_CC"
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
51957
51958
51959
51960    # Execute function body
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
52006
52007
52008
52009    # Execute function body
52010
52011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52012$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52013  supports=yes
52014
52015  saved_cflags="$CFLAGS"
52016  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52017  ac_ext=c
52018ac_cpp='$CPP $CPPFLAGS'
52019ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52020ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52021ac_compiler_gnu=$ac_cv_c_compiler_gnu
52022
52023  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52024/* end confdefs.h.  */
52025int i;
52026_ACEOF
52027if ac_fn_c_try_compile "$LINENO"; then :
52028
52029else
52030  supports=no
52031fi
52032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52033  ac_ext=cpp
52034ac_cpp='$CXXCPP $CPPFLAGS'
52035ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52036ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52037ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52038
52039  CFLAGS="$saved_cflags"
52040
52041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52042$as_echo "$supports" >&6; }
52043  if test "x$supports" = "xyes" ; then
52044    :
52045    C_COMP_SUPPORTS="yes"
52046  else
52047    :
52048    C_COMP_SUPPORTS="no"
52049  fi
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
52106
52107
52108
52109    # Execute function body
52110
52111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52112$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52113  supports=yes
52114
52115  saved_cxxflags="$CXXFLAGS"
52116  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52117  ac_ext=cpp
52118ac_cpp='$CXXCPP $CPPFLAGS'
52119ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52120ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52121ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52122
52123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52124/* end confdefs.h.  */
52125int i;
52126_ACEOF
52127if ac_fn_cxx_try_compile "$LINENO"; then :
52128
52129else
52130  supports=no
52131fi
52132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52133  ac_ext=cpp
52134ac_cpp='$CXXCPP $CPPFLAGS'
52135ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52136ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52137ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52138
52139  CXXFLAGS="$saved_cxxflags"
52140
52141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52142$as_echo "$supports" >&6; }
52143  if test "x$supports" = "xyes" ; then
52144    :
52145    CXX_COMP_SUPPORTS="yes"
52146  else
52147    :
52148    CXX_COMP_SUPPORTS="no"
52149  fi
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52164$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52165  supports=no
52166  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52167
52168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52169$as_echo "$supports" >&6; }
52170  if test "x$supports" = "xyes" ; then
52171    :
52172    BUILD_CC_CAN_DISABLE_WARNINGS=true
52173  else
52174    :
52175    BUILD_CC_CAN_DISABLE_WARNINGS=false
52176
52177  fi
52178
52179
52180
52181
52182
52183
52184      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52185        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52186      else
52187        BUILD_CC_DISABLE_WARNING_PREFIX=
52188      fi
52189      CC="$CC_OLD"
52190      ;;
52191    clang)
52192      DISABLE_WARNING_PREFIX="-Wno-"
52193      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52194      ;;
52195    xlc)
52196      DISABLE_WARNING_PREFIX="-qsuppress="
52197      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52198      ;;
52199  esac
52200
52201
52202
52203
52204
52205# Setup debug symbols (need objcopy from the toolchain for that)
52206
52207  #
52208  # NATIVE_DEBUG_SYMBOLS
52209  # This must be done after the toolchain is setup, since we're looking at objcopy.
52210  #
52211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52212$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52213
52214# Check whether --with-native-debug-symbols was given.
52215if test "${with_native_debug_symbols+set}" = set; then :
52216  withval=$with_native_debug_symbols;
52217        if test "x$OPENJDK_TARGET_OS" = xaix; then
52218          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52219            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52220          fi
52221        fi
52222
52223else
52224
52225        if test "x$OPENJDK_TARGET_OS" = xaix; then
52226          # AIX doesn't support 'zipped' so use 'internal' as default
52227          with_native_debug_symbols="internal"
52228        else
52229          if test "x$STATIC_BUILD" = xtrue; then
52230            with_native_debug_symbols="none"
52231          else
52232            with_native_debug_symbols="zipped"
52233          fi
52234        fi
52235
52236fi
52237
52238  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52240$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52241
52242  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52243
52244    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52245      if test "x$OBJCOPY" = x; then
52246        # enabling of enable-debug-symbols and can't find objcopy
52247        # this is an error
52248        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52249      fi
52250    fi
52251
52252    COMPILE_WITH_DEBUG_SYMBOLS=true
52253    COPY_DEBUG_SYMBOLS=true
52254    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52255
52256    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52257    DEBUG_BINARIES=false
52258    STRIP_POLICY=min_strip
52259
52260  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52261    COMPILE_WITH_DEBUG_SYMBOLS=false
52262    COPY_DEBUG_SYMBOLS=false
52263    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52264
52265    DEBUG_BINARIES=false
52266    STRIP_POLICY=no_strip
52267  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52268    COMPILE_WITH_DEBUG_SYMBOLS=true
52269    COPY_DEBUG_SYMBOLS=false
52270    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52271
52272    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52273    DEBUG_BINARIES=true
52274    STRIP_POLICY=no_strip
52275    STRIP=""
52276
52277  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52278
52279    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52280      if test "x$OBJCOPY" = x; then
52281        # enabling of enable-debug-symbols and can't find objcopy
52282        # this is an error
52283        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52284      fi
52285    fi
52286
52287    COMPILE_WITH_DEBUG_SYMBOLS=true
52288    COPY_DEBUG_SYMBOLS=true
52289    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52290
52291    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52292    DEBUG_BINARIES=false
52293    STRIP_POLICY=min_strip
52294  else
52295    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52296  fi
52297
52298  # --enable-debug-symbols is deprecated.
52299  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52300
52301  # Check whether --enable-debug-symbols was given.
52302if test "${enable_debug_symbols+set}" = set; then :
52303  enableval=$enable_debug_symbols;
52304fi
52305
52306  if test "x$enable_debug_symbols" != x; then
52307    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52308$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52309
52310    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52311      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52312$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52313    fi
52314
52315  fi
52316
52317
52318  # --enable-zip-debug-info is deprecated.
52319  # Please use --with-native-debug-symbols=zipped .
52320
52321  # Check whether --enable-zip-debug-info was given.
52322if test "${enable_zip_debug_info+set}" = set; then :
52323  enableval=$enable_zip_debug_info;
52324fi
52325
52326  if test "x$enable_zip_debug_info" != x; then
52327    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52328$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52329
52330    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52331      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52332$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52333    fi
52334
52335  fi
52336
52337
52338
52339
52340
52341
52342  # Legacy values
52343
52344
52345
52346
52347  # Check whether --enable-native-coverage was given.
52348if test "${enable_native_coverage+set}" = set; then :
52349  enableval=$enable_native_coverage;
52350fi
52351
52352  GCOV_ENABLED="false"
52353  if test "x$enable_native_coverage" = "xyes"; then
52354    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52355      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52356$as_echo_n "checking if native coverage is enabled... " >&6; }
52357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52358$as_echo "yes" >&6; }
52359      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52360      GCOV_LDFLAGS="-fprofile-arcs"
52361      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52362      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52363      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52364      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52365      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52366      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52367      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52368      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52369      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52370      GCOV_ENABLED="true"
52371    else
52372      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52373    fi
52374  elif test "x$enable_native_coverage" = "xno"; then
52375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52376$as_echo_n "checking if native coverage is enabled... " >&6; }
52377    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52378$as_echo "no" >&6; }
52379  elif test "x$enable_native_coverage" != "x"; then
52380    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52381  fi
52382
52383
52384
52385
52386# Need toolchain to setup dtrace
52387
52388  # Test for dtrace dependencies
52389  # Check whether --enable-dtrace was given.
52390if test "${enable_dtrace+set}" = set; then :
52391  enableval=$enable_dtrace;
52392fi
52393
52394
52395  DTRACE_DEP_MISSING=false
52396
52397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52398$as_echo_n "checking for dtrace tool... " >&6; }
52399  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52401$as_echo "$DTRACE" >&6; }
52402  else
52403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52404$as_echo "not found, cannot build dtrace" >&6; }
52405    DTRACE_DEP_MISSING=true
52406  fi
52407
52408  for ac_header in sys/sdt.h
52409do :
52410  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52411if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52412  cat >>confdefs.h <<_ACEOF
52413#define HAVE_SYS_SDT_H 1
52414_ACEOF
52415 DTRACE_HEADERS_OK=yes
52416else
52417  DTRACE_HEADERS_OK=no
52418fi
52419
52420done
52421
52422  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52423    DTRACE_DEP_MISSING=true
52424  fi
52425
52426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52427$as_echo_n "checking if dtrace should be built... " >&6; }
52428  if test "x$enable_dtrace" = "xyes"; then
52429    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52430      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52431$as_echo "no, missing dependencies" >&6; }
52432
52433  # Print a helpful message on how to acquire the necessary build dependency.
52434  # dtrace is the help tag: freetype, cups, alsa etc
52435  MISSING_DEPENDENCY=dtrace
52436
52437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52438    cygwin_help $MISSING_DEPENDENCY
52439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52440    msys_help $MISSING_DEPENDENCY
52441  else
52442    PKGHANDLER_COMMAND=
52443
52444    case $PKGHANDLER in
52445      apt-get)
52446        apt_help     $MISSING_DEPENDENCY ;;
52447      yum)
52448        yum_help     $MISSING_DEPENDENCY ;;
52449      port)
52450        port_help    $MISSING_DEPENDENCY ;;
52451      pkgutil)
52452        pkgutil_help $MISSING_DEPENDENCY ;;
52453      pkgadd)
52454        pkgadd_help  $MISSING_DEPENDENCY ;;
52455    esac
52456
52457    if test "x$PKGHANDLER_COMMAND" != x; then
52458      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52459    fi
52460  fi
52461
52462      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52463    else
52464      INCLUDE_DTRACE=true
52465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52466$as_echo "yes, forced" >&6; }
52467    fi
52468  elif test "x$enable_dtrace" = "xno"; then
52469    INCLUDE_DTRACE=false
52470    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52471$as_echo "no, forced" >&6; }
52472  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52473    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52474      INCLUDE_DTRACE=false
52475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52476$as_echo "no, non-open linux build" >&6; }
52477    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52478      INCLUDE_DTRACE=false
52479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52480$as_echo "no, missing dependencies" >&6; }
52481    else
52482      INCLUDE_DTRACE=true
52483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52484$as_echo "yes, dependencies present" >&6; }
52485    fi
52486  else
52487    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52488  fi
52489
52490
52491
52492  # The user can in some cases supply additional jvm features. For the custom
52493  # variant, this defines the entire variant.
52494
52495# Check whether --with-jvm-features was given.
52496if test "${with_jvm_features+set}" = set; then :
52497  withval=$with_jvm_features;
52498fi
52499
52500  if test "x$with_jvm_features" != x; then
52501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52502$as_echo_n "checking additional JVM features... " >&6; }
52503    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52504    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52505$as_echo "$JVM_FEATURES" >&6; }
52506  fi
52507
52508  # Verify that dependencies are met for explicitly set features.
52509  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52510    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52511  fi
52512
52513  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52514    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52515  fi
52516
52517  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52518    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52519  fi
52520
52521  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52522    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52523  fi
52524
52525  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52526    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52527  fi
52528
52529  # Turn on additional features based on other parts of configure
52530  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52531    JVM_FEATURES="$JVM_FEATURES dtrace"
52532  else
52533    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52534      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52535    fi
52536  fi
52537
52538  if test "x$STATIC_BUILD" = "xtrue"; then
52539    JVM_FEATURES="$JVM_FEATURES static-build"
52540  else
52541    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52542      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52543    fi
52544  fi
52545
52546  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52547    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52548      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52549    fi
52550  fi
52551
52552  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52553    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52554      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52555    fi
52556  fi
52557
52558  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52559  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52560      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52561      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52562    JVM_FEATURES_jvmci="jvmci"
52563  else
52564    JVM_FEATURES_jvmci=""
52565  fi
52566
52567  # All variants but minimal (and custom) get these features
52568  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52569
52570  # Enable features depending on variant.
52571  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52572  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52573  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52574  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52575  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52576  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52577  JVM_FEATURES_custom="$JVM_FEATURES"
52578
52579
52580
52581
52582
52583
52584
52585
52586
52587  # Used for verification of Makefiles by check-jvm-feature
52588
52589
52590  # We don't support --with-jvm-interpreter anymore, use zero instead.
52591
52592
52593# Check whether --with-jvm-interpreter was given.
52594if test "${with_jvm_interpreter+set}" = set; then :
52595  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52596$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52597fi
52598
52599
52600
52601
52602###############################################################################
52603#
52604# Check dependencies for external and internal libraries.
52605#
52606###############################################################################
52607
52608# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52609
52610  # When using cygwin or msys, we need a wrapper binary that renames
52611  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52612  # @files and rewrites these too! This wrapper binary is
52613  # called fixpath.
52614  FIXPATH=
52615  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52617$as_echo_n "checking if fixpath can be created... " >&6; }
52618    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52619    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52620    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52621    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52622      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52623      FIXPATH="$FIXPATH_BIN -c"
52624    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52625      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52626      # @ was chosen as separator to minimize risk of other tools messing around with it
52627      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52628          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52629      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52630      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52631    fi
52632    FIXPATH_SRC_W="$FIXPATH_SRC"
52633    FIXPATH_BIN_W="$FIXPATH_BIN"
52634
52635  unix_path="$FIXPATH_SRC_W"
52636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52637    windows_path=`$CYGPATH -m "$unix_path"`
52638    FIXPATH_SRC_W="$windows_path"
52639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52640    windows_path=`cmd //c echo $unix_path`
52641    FIXPATH_SRC_W="$windows_path"
52642  fi
52643
52644
52645  unix_path="$FIXPATH_BIN_W"
52646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52647    windows_path=`$CYGPATH -m "$unix_path"`
52648    FIXPATH_BIN_W="$windows_path"
52649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52650    windows_path=`cmd //c echo $unix_path`
52651    FIXPATH_BIN_W="$windows_path"
52652  fi
52653
52654    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
52655    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
52656    cd $FIXPATH_DIR
52657    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
52658    cd $CURDIR
52659
52660    if test ! -x $FIXPATH_BIN; then
52661      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52662$as_echo "no" >&6; }
52663      cat $FIXPATH_DIR/fixpath1.log
52664      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
52665    fi
52666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52667$as_echo "yes" >&6; }
52668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
52669$as_echo_n "checking if fixpath.exe works... " >&6; }
52670    cd $FIXPATH_DIR
52671    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
52672        > $FIXPATH_DIR/fixpath2.log 2>&1
52673    cd $CURDIR
52674    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
52675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52676$as_echo "no" >&6; }
52677      cat $FIXPATH_DIR/fixpath2.log
52678      as_fn_error $? "fixpath did not work!" "$LINENO" 5
52679    fi
52680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52681$as_echo "yes" >&6; }
52682
52683    FIXPATH_DETACH_FLAG="--detach"
52684  fi
52685
52686
52687
52688
52689
52690
52691  # Check if X11 is needed
52692  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
52693    # No X11 support on windows or macosx
52694    NEEDS_LIB_X11=false
52695  else
52696    if test "x$SUPPORT_HEADFUL" = xno; then
52697      # No X11 support if building headless-only
52698      NEEDS_LIB_X11=false
52699    else
52700      # All other instances need X11
52701      NEEDS_LIB_X11=true
52702    fi
52703  fi
52704
52705  # Check if cups is needed
52706  if test "x$OPENJDK_TARGET_OS" = xwindows; then
52707    # Windows have a separate print system
52708    NEEDS_LIB_CUPS=false
52709  else
52710    NEEDS_LIB_CUPS=true
52711  fi
52712
52713  # Check if freetype is needed
52714  if test "x$OPENJDK" = "xtrue"; then
52715    NEEDS_LIB_FREETYPE=true
52716  else
52717    NEEDS_LIB_FREETYPE=false
52718  fi
52719
52720  # Check if alsa is needed
52721  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52722    NEEDS_LIB_ALSA=true
52723  else
52724    NEEDS_LIB_ALSA=false
52725  fi
52726
52727  # Check if ffi is needed
52728  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52729    NEEDS_LIB_FFI=true
52730  else
52731    NEEDS_LIB_FFI=false
52732  fi
52733
52734
52735  # statically link libstdc++ before C++ ABI is stablized on Linux unless
52736  # dynamic build is configured on command line.
52737
52738# Check whether --with-stdc++lib was given.
52739if test "${with_stdc__lib+set}" = set; then :
52740  withval=$with_stdc__lib;
52741        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
52742                && test "x$with_stdc__lib" != xdefault; then
52743          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
52744        fi
52745
52746else
52747  with_stdc__lib=default
52748
52749fi
52750
52751
52752  if test "x$OPENJDK_TARGET_OS" = xlinux; then
52753    # Test if -lstdc++ works.
52754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
52755$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
52756    ac_ext=cpp
52757ac_cpp='$CXXCPP $CPPFLAGS'
52758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52761
52762    OLD_CXXFLAGS="$CXXFLAGS"
52763    CXXFLAGS="$CXXFLAGS -lstdc++"
52764    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52765/* end confdefs.h.  */
52766
52767int
52768main ()
52769{
52770return 0;
52771  ;
52772  return 0;
52773}
52774_ACEOF
52775if ac_fn_cxx_try_link "$LINENO"; then :
52776  has_dynamic_libstdcxx=yes
52777else
52778  has_dynamic_libstdcxx=no
52779fi
52780rm -f core conftest.err conftest.$ac_objext \
52781    conftest$ac_exeext conftest.$ac_ext
52782    CXXFLAGS="$OLD_CXXFLAGS"
52783    ac_ext=cpp
52784ac_cpp='$CXXCPP $CPPFLAGS'
52785ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52786ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52787ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52788
52789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
52790$as_echo "$has_dynamic_libstdcxx" >&6; }
52791
52792    # Test if stdc++ can be linked statically.
52793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
52794$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
52795    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
52796    ac_ext=cpp
52797ac_cpp='$CXXCPP $CPPFLAGS'
52798ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52799ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52800ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52801
52802    OLD_LIBS="$LIBS"
52803    OLD_CXX="$CXX"
52804    LIBS="$STATIC_STDCXX_FLAGS"
52805    CXX="$CC"
52806    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52807/* end confdefs.h.  */
52808
52809int
52810main ()
52811{
52812return 0;
52813  ;
52814  return 0;
52815}
52816_ACEOF
52817if ac_fn_cxx_try_link "$LINENO"; then :
52818  has_static_libstdcxx=yes
52819else
52820  has_static_libstdcxx=no
52821fi
52822rm -f core conftest.err conftest.$ac_objext \
52823    conftest$ac_exeext conftest.$ac_ext
52824    LIBS="$OLD_LIBS"
52825    CXX="$OLD_CXX"
52826    ac_ext=cpp
52827ac_cpp='$CXXCPP $CPPFLAGS'
52828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52831
52832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
52833$as_echo "$has_static_libstdcxx" >&6; }
52834
52835    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
52836      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
52837    fi
52838
52839    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
52840      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
52841    fi
52842
52843    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
52844      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
52845    fi
52846
52847    # If dynamic was requested, it's available since it would fail above otherwise.
52848    # If dynamic wasn't requested, go with static unless it isn't available.
52849    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
52850$as_echo_n "checking how to link with libstdc++... " >&6; }
52851    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52852      LIBCXX="$LIBCXX -lstdc++"
52853      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52854      JVM_LIBS="-lstdc++ $JVM_LIBS"
52855      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52856      # just use the same setting as for the TARGET toolchain.
52857      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
52858      LDCXX="$CXX"
52859      STATIC_CXX_SETTING="STATIC_CXX=false"
52860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
52861$as_echo "dynamic" >&6; }
52862    else
52863      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
52864      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
52865      # To help comparisons with old build, put stdc++ first in JVM_LIBS
52866      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
52867      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
52868      # just use the same setting as for the TARGET toolchain.
52869      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
52870      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
52871      LDCXX="$CC"
52872      STATIC_CXX_SETTING="STATIC_CXX=true"
52873      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
52874$as_echo "static" >&6; }
52875    fi
52876  fi
52877
52878
52879  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
52880  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
52881    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
52882  fi
52883
52884  # TODO better (platform agnostic) test
52885  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
52886    LIBCXX="-lstdc++"
52887  fi
52888
52889
52890  # Setup Windows runtime dlls
52891  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52892
52893
52894# Check whether --with-msvcr-dll was given.
52895if test "${with_msvcr_dll+set}" = set; then :
52896  withval=$with_msvcr_dll;
52897fi
52898
52899
52900  if test "x$with_msvcr_dll" != x; then
52901    # If given explicitely by user, do not probe. If not present, fail directly.
52902
52903  DLL_NAME="$MSVCR_NAME"
52904  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
52905  METHOD="--with-msvcr-dll"
52906  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52908$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52909
52910    # Need to check if the found msvcr is correct architecture
52911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52912$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52913    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52915      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52916      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52917      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52918        CORRECT_MSVCR_ARCH="PE32 executable"
52919      else
52920        CORRECT_MSVCR_ARCH="PE32+ executable"
52921      fi
52922    else
52923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52924        CORRECT_MSVCR_ARCH=386
52925      else
52926        CORRECT_MSVCR_ARCH=x86-64
52927      fi
52928    fi
52929    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52931$as_echo "ok" >&6; }
52932      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52933
52934  # Only process if variable expands to non-empty
52935
52936  if test "x$MSVC_DLL" != x; then
52937    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52938
52939  # Input might be given as Windows format, start by converting to
52940  # unix format.
52941  path="$MSVC_DLL"
52942  new_path=`$CYGPATH -u "$path"`
52943
52944  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52945  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52946  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52947  # "foo.exe" is OK but "foo" is an error.
52948  #
52949  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52950  # It is also a way to make sure we got the proper file name for the real test later on.
52951  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52952  if test "x$test_shortpath" = x; then
52953    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52954$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52955    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52956  fi
52957
52958  # Call helper function which possibly converts this using DOS-style short mode.
52959  # If so, the updated path is stored in $new_path.
52960
52961  input_path="$new_path"
52962  # Check if we need to convert this using DOS-style short mode. If the path
52963  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52964  # take no chances and rewrite it.
52965  # Note: m4 eats our [], so we need to use [ and ] instead.
52966  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52967  if test "x$has_forbidden_chars" != x; then
52968    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52969    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52970    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52971    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52972      # Going to short mode and back again did indeed matter. Since short mode is
52973      # case insensitive, let's make it lowercase to improve readability.
52974      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52975      # Now convert it back to Unix-style (cygpath)
52976      input_path=`$CYGPATH -u "$shortmode_path"`
52977      new_path="$input_path"
52978    fi
52979  fi
52980
52981  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52982  if test "x$test_cygdrive_prefix" = x; then
52983    # As a simple fix, exclude /usr/bin since it's not a real path.
52984    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52985      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52986      # a path prefixed by /cygdrive for fixpath to work.
52987      new_path="$CYGWIN_ROOT_PATH$input_path"
52988    fi
52989  fi
52990
52991
52992  if test "x$path" != "x$new_path"; then
52993    MSVC_DLL="$new_path"
52994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52995$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52996  fi
52997
52998    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52999
53000  path="$MSVC_DLL"
53001  has_colon=`$ECHO $path | $GREP ^.:`
53002  new_path="$path"
53003  if test "x$has_colon" = x; then
53004    # Not in mixed or Windows style, start by that.
53005    new_path=`cmd //c echo $path`
53006  fi
53007
53008
53009  input_path="$new_path"
53010  # Check if we need to convert this using DOS-style short mode. If the path
53011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53012  # take no chances and rewrite it.
53013  # Note: m4 eats our [], so we need to use [ and ] instead.
53014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53015  if test "x$has_forbidden_chars" != x; then
53016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53017    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53018  fi
53019
53020
53021  windows_path="$new_path"
53022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53023    unix_path=`$CYGPATH -u "$windows_path"`
53024    new_path="$unix_path"
53025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53027    new_path="$unix_path"
53028  fi
53029
53030  if test "x$path" != "x$new_path"; then
53031    MSVC_DLL="$new_path"
53032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53033$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53034  fi
53035
53036  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53037  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53038
53039    else
53040      # We're on a unix platform. Hooray! :)
53041      path="$MSVC_DLL"
53042      has_space=`$ECHO "$path" | $GREP " "`
53043      if test "x$has_space" != x; then
53044        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53045$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53046        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53047      fi
53048
53049      # Use eval to expand a potential ~
53050      eval path="$path"
53051      if test ! -f "$path" && test ! -d "$path"; then
53052        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53053      fi
53054
53055      if test -d "$path"; then
53056        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53057      else
53058        dir="`$DIRNAME "$path"`"
53059        base="`$BASENAME "$path"`"
53060        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53061      fi
53062    fi
53063  fi
53064
53065      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53066$as_echo_n "checking for $DLL_NAME... " >&6; }
53067      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53068$as_echo "$MSVC_DLL" >&6; }
53069    else
53070      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53071$as_echo "incorrect, ignoring" >&6; }
53072      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53073$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53074    fi
53075  fi
53076
53077    if test "x$MSVC_DLL" = x; then
53078      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53079    fi
53080    MSVCR_DLL="$MSVC_DLL"
53081  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53082
53083  DLL_NAME="$MSVCR_NAME"
53084  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53085  METHOD="devkit"
53086  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53087    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53088$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53089
53090    # Need to check if the found msvcr is correct architecture
53091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53092$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53093    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53094    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53095      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53096      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53097      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53098        CORRECT_MSVCR_ARCH="PE32 executable"
53099      else
53100        CORRECT_MSVCR_ARCH="PE32+ executable"
53101      fi
53102    else
53103      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53104        CORRECT_MSVCR_ARCH=386
53105      else
53106        CORRECT_MSVCR_ARCH=x86-64
53107      fi
53108    fi
53109    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53111$as_echo "ok" >&6; }
53112      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53113
53114  # Only process if variable expands to non-empty
53115
53116  if test "x$MSVC_DLL" != x; then
53117    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53118
53119  # Input might be given as Windows format, start by converting to
53120  # unix format.
53121  path="$MSVC_DLL"
53122  new_path=`$CYGPATH -u "$path"`
53123
53124  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53125  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53126  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53127  # "foo.exe" is OK but "foo" is an error.
53128  #
53129  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53130  # It is also a way to make sure we got the proper file name for the real test later on.
53131  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53132  if test "x$test_shortpath" = x; then
53133    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53134$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53135    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53136  fi
53137
53138  # Call helper function which possibly converts this using DOS-style short mode.
53139  # If so, the updated path is stored in $new_path.
53140
53141  input_path="$new_path"
53142  # Check if we need to convert this using DOS-style short mode. If the path
53143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53144  # take no chances and rewrite it.
53145  # Note: m4 eats our [], so we need to use [ and ] instead.
53146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53147  if test "x$has_forbidden_chars" != x; then
53148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53149    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53150    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53151    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53152      # Going to short mode and back again did indeed matter. Since short mode is
53153      # case insensitive, let's make it lowercase to improve readability.
53154      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53155      # Now convert it back to Unix-style (cygpath)
53156      input_path=`$CYGPATH -u "$shortmode_path"`
53157      new_path="$input_path"
53158    fi
53159  fi
53160
53161  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53162  if test "x$test_cygdrive_prefix" = x; then
53163    # As a simple fix, exclude /usr/bin since it's not a real path.
53164    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53165      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53166      # a path prefixed by /cygdrive for fixpath to work.
53167      new_path="$CYGWIN_ROOT_PATH$input_path"
53168    fi
53169  fi
53170
53171
53172  if test "x$path" != "x$new_path"; then
53173    MSVC_DLL="$new_path"
53174    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53175$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53176  fi
53177
53178    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53179
53180  path="$MSVC_DLL"
53181  has_colon=`$ECHO $path | $GREP ^.:`
53182  new_path="$path"
53183  if test "x$has_colon" = x; then
53184    # Not in mixed or Windows style, start by that.
53185    new_path=`cmd //c echo $path`
53186  fi
53187
53188
53189  input_path="$new_path"
53190  # Check if we need to convert this using DOS-style short mode. If the path
53191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53192  # take no chances and rewrite it.
53193  # Note: m4 eats our [], so we need to use [ and ] instead.
53194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53195  if test "x$has_forbidden_chars" != x; then
53196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53198  fi
53199
53200
53201  windows_path="$new_path"
53202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53203    unix_path=`$CYGPATH -u "$windows_path"`
53204    new_path="$unix_path"
53205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53207    new_path="$unix_path"
53208  fi
53209
53210  if test "x$path" != "x$new_path"; then
53211    MSVC_DLL="$new_path"
53212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53213$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53214  fi
53215
53216  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53217  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53218
53219    else
53220      # We're on a unix platform. Hooray! :)
53221      path="$MSVC_DLL"
53222      has_space=`$ECHO "$path" | $GREP " "`
53223      if test "x$has_space" != x; then
53224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53225$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53226        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53227      fi
53228
53229      # Use eval to expand a potential ~
53230      eval path="$path"
53231      if test ! -f "$path" && test ! -d "$path"; then
53232        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53233      fi
53234
53235      if test -d "$path"; then
53236        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53237      else
53238        dir="`$DIRNAME "$path"`"
53239        base="`$BASENAME "$path"`"
53240        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53241      fi
53242    fi
53243  fi
53244
53245      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53246$as_echo_n "checking for $DLL_NAME... " >&6; }
53247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53248$as_echo "$MSVC_DLL" >&6; }
53249    else
53250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53251$as_echo "incorrect, ignoring" >&6; }
53252      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53253$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53254    fi
53255  fi
53256
53257    if test "x$MSVC_DLL" = x; then
53258      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53259    fi
53260    MSVCR_DLL="$MSVC_DLL"
53261  else
53262
53263  DLL_NAME="${MSVCR_NAME}"
53264  MSVC_DLL=
53265
53266  if test "x$MSVC_DLL" = x; then
53267    # Probe: Using well-known location from Visual Studio 10.0
53268    if test "x$VCINSTALLDIR" != x; then
53269      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53270
53271  windows_path="$CYGWIN_VC_INSTALL_DIR"
53272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53273    unix_path=`$CYGPATH -u "$windows_path"`
53274    CYGWIN_VC_INSTALL_DIR="$unix_path"
53275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53277    CYGWIN_VC_INSTALL_DIR="$unix_path"
53278  fi
53279
53280      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53281        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53282      else
53283        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53284      fi
53285      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53286
53287  DLL_NAME="$DLL_NAME"
53288  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53289  METHOD="well-known location in VCINSTALLDIR"
53290  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53291    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53292$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53293
53294    # Need to check if the found msvcr is correct architecture
53295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53296$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53297    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53298    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53299      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53300      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53301      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53302        CORRECT_MSVCR_ARCH="PE32 executable"
53303      else
53304        CORRECT_MSVCR_ARCH="PE32+ executable"
53305      fi
53306    else
53307      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53308        CORRECT_MSVCR_ARCH=386
53309      else
53310        CORRECT_MSVCR_ARCH=x86-64
53311      fi
53312    fi
53313    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53314      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53315$as_echo "ok" >&6; }
53316      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53317
53318  # Only process if variable expands to non-empty
53319
53320  if test "x$MSVC_DLL" != x; then
53321    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53322
53323  # Input might be given as Windows format, start by converting to
53324  # unix format.
53325  path="$MSVC_DLL"
53326  new_path=`$CYGPATH -u "$path"`
53327
53328  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53329  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53330  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53331  # "foo.exe" is OK but "foo" is an error.
53332  #
53333  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53334  # It is also a way to make sure we got the proper file name for the real test later on.
53335  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53336  if test "x$test_shortpath" = x; then
53337    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53338$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53339    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53340  fi
53341
53342  # Call helper function which possibly converts this using DOS-style short mode.
53343  # If so, the updated path is stored in $new_path.
53344
53345  input_path="$new_path"
53346  # Check if we need to convert this using DOS-style short mode. If the path
53347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53348  # take no chances and rewrite it.
53349  # Note: m4 eats our [], so we need to use [ and ] instead.
53350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53351  if test "x$has_forbidden_chars" != x; then
53352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53356      # Going to short mode and back again did indeed matter. Since short mode is
53357      # case insensitive, let's make it lowercase to improve readability.
53358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53359      # Now convert it back to Unix-style (cygpath)
53360      input_path=`$CYGPATH -u "$shortmode_path"`
53361      new_path="$input_path"
53362    fi
53363  fi
53364
53365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53366  if test "x$test_cygdrive_prefix" = x; then
53367    # As a simple fix, exclude /usr/bin since it's not a real path.
53368    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53370      # a path prefixed by /cygdrive for fixpath to work.
53371      new_path="$CYGWIN_ROOT_PATH$input_path"
53372    fi
53373  fi
53374
53375
53376  if test "x$path" != "x$new_path"; then
53377    MSVC_DLL="$new_path"
53378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53379$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53380  fi
53381
53382    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53383
53384  path="$MSVC_DLL"
53385  has_colon=`$ECHO $path | $GREP ^.:`
53386  new_path="$path"
53387  if test "x$has_colon" = x; then
53388    # Not in mixed or Windows style, start by that.
53389    new_path=`cmd //c echo $path`
53390  fi
53391
53392
53393  input_path="$new_path"
53394  # Check if we need to convert this using DOS-style short mode. If the path
53395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53396  # take no chances and rewrite it.
53397  # Note: m4 eats our [], so we need to use [ and ] instead.
53398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53399  if test "x$has_forbidden_chars" != x; then
53400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53401    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53402  fi
53403
53404
53405  windows_path="$new_path"
53406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53407    unix_path=`$CYGPATH -u "$windows_path"`
53408    new_path="$unix_path"
53409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53411    new_path="$unix_path"
53412  fi
53413
53414  if test "x$path" != "x$new_path"; then
53415    MSVC_DLL="$new_path"
53416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53417$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53418  fi
53419
53420  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53421  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53422
53423    else
53424      # We're on a unix platform. Hooray! :)
53425      path="$MSVC_DLL"
53426      has_space=`$ECHO "$path" | $GREP " "`
53427      if test "x$has_space" != x; then
53428        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53429$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53430        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53431      fi
53432
53433      # Use eval to expand a potential ~
53434      eval path="$path"
53435      if test ! -f "$path" && test ! -d "$path"; then
53436        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53437      fi
53438
53439      if test -d "$path"; then
53440        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53441      else
53442        dir="`$DIRNAME "$path"`"
53443        base="`$BASENAME "$path"`"
53444        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53445      fi
53446    fi
53447  fi
53448
53449      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53450$as_echo_n "checking for $DLL_NAME... " >&6; }
53451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53452$as_echo "$MSVC_DLL" >&6; }
53453    else
53454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53455$as_echo "incorrect, ignoring" >&6; }
53456      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53457$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53458    fi
53459  fi
53460
53461    fi
53462  fi
53463
53464  if test "x$MSVC_DLL" = x; then
53465    # Probe: Check in the Boot JDK directory.
53466    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53467
53468  DLL_NAME="$DLL_NAME"
53469  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53470  METHOD="well-known location in Boot JDK"
53471  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53472    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53473$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53474
53475    # Need to check if the found msvcr is correct architecture
53476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53477$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53478    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53479    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53480      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53481      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53482      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53483        CORRECT_MSVCR_ARCH="PE32 executable"
53484      else
53485        CORRECT_MSVCR_ARCH="PE32+ executable"
53486      fi
53487    else
53488      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53489        CORRECT_MSVCR_ARCH=386
53490      else
53491        CORRECT_MSVCR_ARCH=x86-64
53492      fi
53493    fi
53494    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53496$as_echo "ok" >&6; }
53497      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53498
53499  # Only process if variable expands to non-empty
53500
53501  if test "x$MSVC_DLL" != x; then
53502    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53503
53504  # Input might be given as Windows format, start by converting to
53505  # unix format.
53506  path="$MSVC_DLL"
53507  new_path=`$CYGPATH -u "$path"`
53508
53509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53512  # "foo.exe" is OK but "foo" is an error.
53513  #
53514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53515  # It is also a way to make sure we got the proper file name for the real test later on.
53516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53517  if test "x$test_shortpath" = x; then
53518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53519$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53520    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53521  fi
53522
53523  # Call helper function which possibly converts this using DOS-style short mode.
53524  # If so, the updated path is stored in $new_path.
53525
53526  input_path="$new_path"
53527  # Check if we need to convert this using DOS-style short mode. If the path
53528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53529  # take no chances and rewrite it.
53530  # Note: m4 eats our [], so we need to use [ and ] instead.
53531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53532  if test "x$has_forbidden_chars" != x; then
53533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53537      # Going to short mode and back again did indeed matter. Since short mode is
53538      # case insensitive, let's make it lowercase to improve readability.
53539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53540      # Now convert it back to Unix-style (cygpath)
53541      input_path=`$CYGPATH -u "$shortmode_path"`
53542      new_path="$input_path"
53543    fi
53544  fi
53545
53546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53547  if test "x$test_cygdrive_prefix" = x; then
53548    # As a simple fix, exclude /usr/bin since it's not a real path.
53549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53551      # a path prefixed by /cygdrive for fixpath to work.
53552      new_path="$CYGWIN_ROOT_PATH$input_path"
53553    fi
53554  fi
53555
53556
53557  if test "x$path" != "x$new_path"; then
53558    MSVC_DLL="$new_path"
53559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53560$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53561  fi
53562
53563    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53564
53565  path="$MSVC_DLL"
53566  has_colon=`$ECHO $path | $GREP ^.:`
53567  new_path="$path"
53568  if test "x$has_colon" = x; then
53569    # Not in mixed or Windows style, start by that.
53570    new_path=`cmd //c echo $path`
53571  fi
53572
53573
53574  input_path="$new_path"
53575  # Check if we need to convert this using DOS-style short mode. If the path
53576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53577  # take no chances and rewrite it.
53578  # Note: m4 eats our [], so we need to use [ and ] instead.
53579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53580  if test "x$has_forbidden_chars" != x; then
53581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53583  fi
53584
53585
53586  windows_path="$new_path"
53587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53588    unix_path=`$CYGPATH -u "$windows_path"`
53589    new_path="$unix_path"
53590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53592    new_path="$unix_path"
53593  fi
53594
53595  if test "x$path" != "x$new_path"; then
53596    MSVC_DLL="$new_path"
53597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53598$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53599  fi
53600
53601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53603
53604    else
53605      # We're on a unix platform. Hooray! :)
53606      path="$MSVC_DLL"
53607      has_space=`$ECHO "$path" | $GREP " "`
53608      if test "x$has_space" != x; then
53609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53610$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53611        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53612      fi
53613
53614      # Use eval to expand a potential ~
53615      eval path="$path"
53616      if test ! -f "$path" && test ! -d "$path"; then
53617        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53618      fi
53619
53620      if test -d "$path"; then
53621        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53622      else
53623        dir="`$DIRNAME "$path"`"
53624        base="`$BASENAME "$path"`"
53625        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53626      fi
53627    fi
53628  fi
53629
53630      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53631$as_echo_n "checking for $DLL_NAME... " >&6; }
53632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53633$as_echo "$MSVC_DLL" >&6; }
53634    else
53635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53636$as_echo "incorrect, ignoring" >&6; }
53637      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53638$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53639    fi
53640  fi
53641
53642  fi
53643
53644  if test "x$MSVC_DLL" = x; then
53645    # Probe: Look in the Windows system32 directory
53646    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53647
53648  windows_path="$CYGWIN_SYSTEMROOT"
53649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53650    unix_path=`$CYGPATH -u "$windows_path"`
53651    CYGWIN_SYSTEMROOT="$unix_path"
53652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53654    CYGWIN_SYSTEMROOT="$unix_path"
53655  fi
53656
53657    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
53658
53659  DLL_NAME="$DLL_NAME"
53660  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53661  METHOD="well-known location in SYSTEMROOT"
53662  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53664$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53665
53666    # Need to check if the found msvcr is correct architecture
53667    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53668$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53669    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53671      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53672      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53673      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53674        CORRECT_MSVCR_ARCH="PE32 executable"
53675      else
53676        CORRECT_MSVCR_ARCH="PE32+ executable"
53677      fi
53678    else
53679      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53680        CORRECT_MSVCR_ARCH=386
53681      else
53682        CORRECT_MSVCR_ARCH=x86-64
53683      fi
53684    fi
53685    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53687$as_echo "ok" >&6; }
53688      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53689
53690  # Only process if variable expands to non-empty
53691
53692  if test "x$MSVC_DLL" != x; then
53693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53694
53695  # Input might be given as Windows format, start by converting to
53696  # unix format.
53697  path="$MSVC_DLL"
53698  new_path=`$CYGPATH -u "$path"`
53699
53700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53703  # "foo.exe" is OK but "foo" is an error.
53704  #
53705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53706  # It is also a way to make sure we got the proper file name for the real test later on.
53707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53708  if test "x$test_shortpath" = x; then
53709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53710$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53711    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53712  fi
53713
53714  # Call helper function which possibly converts this using DOS-style short mode.
53715  # If so, the updated path is stored in $new_path.
53716
53717  input_path="$new_path"
53718  # Check if we need to convert this using DOS-style short mode. If the path
53719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53720  # take no chances and rewrite it.
53721  # Note: m4 eats our [], so we need to use [ and ] instead.
53722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53723  if test "x$has_forbidden_chars" != x; then
53724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53728      # Going to short mode and back again did indeed matter. Since short mode is
53729      # case insensitive, let's make it lowercase to improve readability.
53730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53731      # Now convert it back to Unix-style (cygpath)
53732      input_path=`$CYGPATH -u "$shortmode_path"`
53733      new_path="$input_path"
53734    fi
53735  fi
53736
53737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53738  if test "x$test_cygdrive_prefix" = x; then
53739    # As a simple fix, exclude /usr/bin since it's not a real path.
53740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53742      # a path prefixed by /cygdrive for fixpath to work.
53743      new_path="$CYGWIN_ROOT_PATH$input_path"
53744    fi
53745  fi
53746
53747
53748  if test "x$path" != "x$new_path"; then
53749    MSVC_DLL="$new_path"
53750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53751$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53752  fi
53753
53754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53755
53756  path="$MSVC_DLL"
53757  has_colon=`$ECHO $path | $GREP ^.:`
53758  new_path="$path"
53759  if test "x$has_colon" = x; then
53760    # Not in mixed or Windows style, start by that.
53761    new_path=`cmd //c echo $path`
53762  fi
53763
53764
53765  input_path="$new_path"
53766  # Check if we need to convert this using DOS-style short mode. If the path
53767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53768  # take no chances and rewrite it.
53769  # Note: m4 eats our [], so we need to use [ and ] instead.
53770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53771  if test "x$has_forbidden_chars" != x; then
53772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53774  fi
53775
53776
53777  windows_path="$new_path"
53778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53779    unix_path=`$CYGPATH -u "$windows_path"`
53780    new_path="$unix_path"
53781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53783    new_path="$unix_path"
53784  fi
53785
53786  if test "x$path" != "x$new_path"; then
53787    MSVC_DLL="$new_path"
53788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53789$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53790  fi
53791
53792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53794
53795    else
53796      # We're on a unix platform. Hooray! :)
53797      path="$MSVC_DLL"
53798      has_space=`$ECHO "$path" | $GREP " "`
53799      if test "x$has_space" != x; then
53800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53801$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53803      fi
53804
53805      # Use eval to expand a potential ~
53806      eval path="$path"
53807      if test ! -f "$path" && test ! -d "$path"; then
53808        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53809      fi
53810
53811      if test -d "$path"; then
53812        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53813      else
53814        dir="`$DIRNAME "$path"`"
53815        base="`$BASENAME "$path"`"
53816        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53817      fi
53818    fi
53819  fi
53820
53821      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53822$as_echo_n "checking for $DLL_NAME... " >&6; }
53823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53824$as_echo "$MSVC_DLL" >&6; }
53825    else
53826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53827$as_echo "incorrect, ignoring" >&6; }
53828      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53829$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53830    fi
53831  fi
53832
53833  fi
53834
53835  if test "x$MSVC_DLL" = x; then
53836    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
53837    if test "x$VS100COMNTOOLS" != x; then
53838      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
53839
53840  windows_path="$CYGWIN_VS_TOOLS_DIR"
53841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53842    unix_path=`$CYGPATH -u "$windows_path"`
53843    CYGWIN_VS_TOOLS_DIR="$unix_path"
53844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53846    CYGWIN_VS_TOOLS_DIR="$unix_path"
53847  fi
53848
53849      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53850        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53851	    | $GREP -i /x64/ | $HEAD --lines 1`
53852      else
53853        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
53854	    | $GREP -i /x86/ | $HEAD --lines 1`
53855      fi
53856
53857  DLL_NAME="$DLL_NAME"
53858  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53859  METHOD="search of VS100COMNTOOLS"
53860  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53861    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53862$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53863
53864    # Need to check if the found msvcr is correct architecture
53865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53866$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53867    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53868    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53869      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53870      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53871      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53872        CORRECT_MSVCR_ARCH="PE32 executable"
53873      else
53874        CORRECT_MSVCR_ARCH="PE32+ executable"
53875      fi
53876    else
53877      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53878        CORRECT_MSVCR_ARCH=386
53879      else
53880        CORRECT_MSVCR_ARCH=x86-64
53881      fi
53882    fi
53883    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53885$as_echo "ok" >&6; }
53886      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53887
53888  # Only process if variable expands to non-empty
53889
53890  if test "x$MSVC_DLL" != x; then
53891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53892
53893  # Input might be given as Windows format, start by converting to
53894  # unix format.
53895  path="$MSVC_DLL"
53896  new_path=`$CYGPATH -u "$path"`
53897
53898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53901  # "foo.exe" is OK but "foo" is an error.
53902  #
53903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53904  # It is also a way to make sure we got the proper file name for the real test later on.
53905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53906  if test "x$test_shortpath" = x; then
53907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53908$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53909    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53910  fi
53911
53912  # Call helper function which possibly converts this using DOS-style short mode.
53913  # If so, the updated path is stored in $new_path.
53914
53915  input_path="$new_path"
53916  # Check if we need to convert this using DOS-style short mode. If the path
53917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53918  # take no chances and rewrite it.
53919  # Note: m4 eats our [], so we need to use [ and ] instead.
53920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53921  if test "x$has_forbidden_chars" != x; then
53922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53926      # Going to short mode and back again did indeed matter. Since short mode is
53927      # case insensitive, let's make it lowercase to improve readability.
53928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53929      # Now convert it back to Unix-style (cygpath)
53930      input_path=`$CYGPATH -u "$shortmode_path"`
53931      new_path="$input_path"
53932    fi
53933  fi
53934
53935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53936  if test "x$test_cygdrive_prefix" = x; then
53937    # As a simple fix, exclude /usr/bin since it's not a real path.
53938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53940      # a path prefixed by /cygdrive for fixpath to work.
53941      new_path="$CYGWIN_ROOT_PATH$input_path"
53942    fi
53943  fi
53944
53945
53946  if test "x$path" != "x$new_path"; then
53947    MSVC_DLL="$new_path"
53948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53949$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53950  fi
53951
53952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53953
53954  path="$MSVC_DLL"
53955  has_colon=`$ECHO $path | $GREP ^.:`
53956  new_path="$path"
53957  if test "x$has_colon" = x; then
53958    # Not in mixed or Windows style, start by that.
53959    new_path=`cmd //c echo $path`
53960  fi
53961
53962
53963  input_path="$new_path"
53964  # Check if we need to convert this using DOS-style short mode. If the path
53965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53966  # take no chances and rewrite it.
53967  # Note: m4 eats our [], so we need to use [ and ] instead.
53968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53969  if test "x$has_forbidden_chars" != x; then
53970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53972  fi
53973
53974
53975  windows_path="$new_path"
53976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53977    unix_path=`$CYGPATH -u "$windows_path"`
53978    new_path="$unix_path"
53979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53981    new_path="$unix_path"
53982  fi
53983
53984  if test "x$path" != "x$new_path"; then
53985    MSVC_DLL="$new_path"
53986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53987$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53988  fi
53989
53990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53992
53993    else
53994      # We're on a unix platform. Hooray! :)
53995      path="$MSVC_DLL"
53996      has_space=`$ECHO "$path" | $GREP " "`
53997      if test "x$has_space" != x; then
53998        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53999$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54000        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54001      fi
54002
54003      # Use eval to expand a potential ~
54004      eval path="$path"
54005      if test ! -f "$path" && test ! -d "$path"; then
54006        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54007      fi
54008
54009      if test -d "$path"; then
54010        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54011      else
54012        dir="`$DIRNAME "$path"`"
54013        base="`$BASENAME "$path"`"
54014        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54015      fi
54016    fi
54017  fi
54018
54019      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54020$as_echo_n "checking for $DLL_NAME... " >&6; }
54021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54022$as_echo "$MSVC_DLL" >&6; }
54023    else
54024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54025$as_echo "incorrect, ignoring" >&6; }
54026      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54027$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54028    fi
54029  fi
54030
54031    fi
54032  fi
54033
54034  if test "x$MSVC_DLL" = x; then
54035    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54036    # (This was the original behaviour; kept since it might turn something up)
54037    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54038      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54039        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54040	    | $GREP x64 | $HEAD --lines 1`
54041      else
54042        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54043	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54044        if test "x$POSSIBLE_MSVC_DLL" = x; then
54045          # We're grasping at straws now...
54046          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54047	      | $HEAD --lines 1`
54048        fi
54049      fi
54050
54051
54052  DLL_NAME="$DLL_NAME"
54053  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54054  METHOD="search of VCINSTALLDIR"
54055  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54056    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54057$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54058
54059    # Need to check if the found msvcr is correct architecture
54060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54061$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54062    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54064      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54065      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54066      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54067        CORRECT_MSVCR_ARCH="PE32 executable"
54068      else
54069        CORRECT_MSVCR_ARCH="PE32+ executable"
54070      fi
54071    else
54072      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54073        CORRECT_MSVCR_ARCH=386
54074      else
54075        CORRECT_MSVCR_ARCH=x86-64
54076      fi
54077    fi
54078    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54079      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54080$as_echo "ok" >&6; }
54081      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54082
54083  # Only process if variable expands to non-empty
54084
54085  if test "x$MSVC_DLL" != x; then
54086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54087
54088  # Input might be given as Windows format, start by converting to
54089  # unix format.
54090  path="$MSVC_DLL"
54091  new_path=`$CYGPATH -u "$path"`
54092
54093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54096  # "foo.exe" is OK but "foo" is an error.
54097  #
54098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54099  # It is also a way to make sure we got the proper file name for the real test later on.
54100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54101  if test "x$test_shortpath" = x; then
54102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54103$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54104    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54105  fi
54106
54107  # Call helper function which possibly converts this using DOS-style short mode.
54108  # If so, the updated path is stored in $new_path.
54109
54110  input_path="$new_path"
54111  # Check if we need to convert this using DOS-style short mode. If the path
54112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54113  # take no chances and rewrite it.
54114  # Note: m4 eats our [], so we need to use [ and ] instead.
54115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54116  if test "x$has_forbidden_chars" != x; then
54117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54121      # Going to short mode and back again did indeed matter. Since short mode is
54122      # case insensitive, let's make it lowercase to improve readability.
54123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54124      # Now convert it back to Unix-style (cygpath)
54125      input_path=`$CYGPATH -u "$shortmode_path"`
54126      new_path="$input_path"
54127    fi
54128  fi
54129
54130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54131  if test "x$test_cygdrive_prefix" = x; then
54132    # As a simple fix, exclude /usr/bin since it's not a real path.
54133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54135      # a path prefixed by /cygdrive for fixpath to work.
54136      new_path="$CYGWIN_ROOT_PATH$input_path"
54137    fi
54138  fi
54139
54140
54141  if test "x$path" != "x$new_path"; then
54142    MSVC_DLL="$new_path"
54143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54144$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54145  fi
54146
54147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54148
54149  path="$MSVC_DLL"
54150  has_colon=`$ECHO $path | $GREP ^.:`
54151  new_path="$path"
54152  if test "x$has_colon" = x; then
54153    # Not in mixed or Windows style, start by that.
54154    new_path=`cmd //c echo $path`
54155  fi
54156
54157
54158  input_path="$new_path"
54159  # Check if we need to convert this using DOS-style short mode. If the path
54160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54161  # take no chances and rewrite it.
54162  # Note: m4 eats our [], so we need to use [ and ] instead.
54163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54164  if test "x$has_forbidden_chars" != x; then
54165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54167  fi
54168
54169
54170  windows_path="$new_path"
54171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54172    unix_path=`$CYGPATH -u "$windows_path"`
54173    new_path="$unix_path"
54174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54176    new_path="$unix_path"
54177  fi
54178
54179  if test "x$path" != "x$new_path"; then
54180    MSVC_DLL="$new_path"
54181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54182$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54183  fi
54184
54185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54187
54188    else
54189      # We're on a unix platform. Hooray! :)
54190      path="$MSVC_DLL"
54191      has_space=`$ECHO "$path" | $GREP " "`
54192      if test "x$has_space" != x; then
54193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54194$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54196      fi
54197
54198      # Use eval to expand a potential ~
54199      eval path="$path"
54200      if test ! -f "$path" && test ! -d "$path"; then
54201        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54202      fi
54203
54204      if test -d "$path"; then
54205        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54206      else
54207        dir="`$DIRNAME "$path"`"
54208        base="`$BASENAME "$path"`"
54209        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54210      fi
54211    fi
54212  fi
54213
54214      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54215$as_echo_n "checking for $DLL_NAME... " >&6; }
54216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54217$as_echo "$MSVC_DLL" >&6; }
54218    else
54219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54220$as_echo "incorrect, ignoring" >&6; }
54221      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54222$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54223    fi
54224  fi
54225
54226    fi
54227  fi
54228
54229  if test "x$MSVC_DLL" = x; then
54230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54231$as_echo_n "checking for $DLL_NAME... " >&6; }
54232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54233$as_echo "no" >&6; }
54234    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54235  fi
54236
54237    MSVCR_DLL="$MSVC_DLL"
54238  fi
54239
54240
54241
54242# Check whether --with-msvcp-dll was given.
54243if test "${with_msvcp_dll+set}" = set; then :
54244  withval=$with_msvcp_dll;
54245fi
54246
54247
54248  if test "x$MSVCP_NAME" != "x"; then
54249    if test "x$with_msvcp_dll" != x; then
54250      # If given explicitely by user, do not probe. If not present, fail directly.
54251
54252  DLL_NAME="$MSVCP_NAME"
54253  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54254  METHOD="--with-msvcp-dll"
54255  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54256    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54257$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54258
54259    # Need to check if the found msvcr is correct architecture
54260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54261$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54262    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54264      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54265      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54266      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54267        CORRECT_MSVCR_ARCH="PE32 executable"
54268      else
54269        CORRECT_MSVCR_ARCH="PE32+ executable"
54270      fi
54271    else
54272      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54273        CORRECT_MSVCR_ARCH=386
54274      else
54275        CORRECT_MSVCR_ARCH=x86-64
54276      fi
54277    fi
54278    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54280$as_echo "ok" >&6; }
54281      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54282
54283  # Only process if variable expands to non-empty
54284
54285  if test "x$MSVC_DLL" != x; then
54286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54287
54288  # Input might be given as Windows format, start by converting to
54289  # unix format.
54290  path="$MSVC_DLL"
54291  new_path=`$CYGPATH -u "$path"`
54292
54293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54296  # "foo.exe" is OK but "foo" is an error.
54297  #
54298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54299  # It is also a way to make sure we got the proper file name for the real test later on.
54300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54301  if test "x$test_shortpath" = x; then
54302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54303$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54304    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54305  fi
54306
54307  # Call helper function which possibly converts this using DOS-style short mode.
54308  # If so, the updated path is stored in $new_path.
54309
54310  input_path="$new_path"
54311  # Check if we need to convert this using DOS-style short mode. If the path
54312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54313  # take no chances and rewrite it.
54314  # Note: m4 eats our [], so we need to use [ and ] instead.
54315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54316  if test "x$has_forbidden_chars" != x; then
54317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54321      # Going to short mode and back again did indeed matter. Since short mode is
54322      # case insensitive, let's make it lowercase to improve readability.
54323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54324      # Now convert it back to Unix-style (cygpath)
54325      input_path=`$CYGPATH -u "$shortmode_path"`
54326      new_path="$input_path"
54327    fi
54328  fi
54329
54330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54331  if test "x$test_cygdrive_prefix" = x; then
54332    # As a simple fix, exclude /usr/bin since it's not a real path.
54333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54335      # a path prefixed by /cygdrive for fixpath to work.
54336      new_path="$CYGWIN_ROOT_PATH$input_path"
54337    fi
54338  fi
54339
54340
54341  if test "x$path" != "x$new_path"; then
54342    MSVC_DLL="$new_path"
54343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54344$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54345  fi
54346
54347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54348
54349  path="$MSVC_DLL"
54350  has_colon=`$ECHO $path | $GREP ^.:`
54351  new_path="$path"
54352  if test "x$has_colon" = x; then
54353    # Not in mixed or Windows style, start by that.
54354    new_path=`cmd //c echo $path`
54355  fi
54356
54357
54358  input_path="$new_path"
54359  # Check if we need to convert this using DOS-style short mode. If the path
54360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54361  # take no chances and rewrite it.
54362  # Note: m4 eats our [], so we need to use [ and ] instead.
54363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54364  if test "x$has_forbidden_chars" != x; then
54365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54367  fi
54368
54369
54370  windows_path="$new_path"
54371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54372    unix_path=`$CYGPATH -u "$windows_path"`
54373    new_path="$unix_path"
54374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54376    new_path="$unix_path"
54377  fi
54378
54379  if test "x$path" != "x$new_path"; then
54380    MSVC_DLL="$new_path"
54381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54382$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54383  fi
54384
54385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54387
54388    else
54389      # We're on a unix platform. Hooray! :)
54390      path="$MSVC_DLL"
54391      has_space=`$ECHO "$path" | $GREP " "`
54392      if test "x$has_space" != x; then
54393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54394$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54396      fi
54397
54398      # Use eval to expand a potential ~
54399      eval path="$path"
54400      if test ! -f "$path" && test ! -d "$path"; then
54401        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54402      fi
54403
54404      if test -d "$path"; then
54405        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54406      else
54407        dir="`$DIRNAME "$path"`"
54408        base="`$BASENAME "$path"`"
54409        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54410      fi
54411    fi
54412  fi
54413
54414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54415$as_echo_n "checking for $DLL_NAME... " >&6; }
54416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54417$as_echo "$MSVC_DLL" >&6; }
54418    else
54419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54420$as_echo "incorrect, ignoring" >&6; }
54421      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54422$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54423    fi
54424  fi
54425
54426      if test "x$MSVC_DLL" = x; then
54427        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54428      fi
54429      MSVCP_DLL="$MSVC_DLL"
54430    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54431
54432  DLL_NAME="$MSVCP_NAME"
54433  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54434  METHOD="devkit"
54435  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54437$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54438
54439    # Need to check if the found msvcr is correct architecture
54440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54441$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54442    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54444      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54445      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54447        CORRECT_MSVCR_ARCH="PE32 executable"
54448      else
54449        CORRECT_MSVCR_ARCH="PE32+ executable"
54450      fi
54451    else
54452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54453        CORRECT_MSVCR_ARCH=386
54454      else
54455        CORRECT_MSVCR_ARCH=x86-64
54456      fi
54457    fi
54458    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54460$as_echo "ok" >&6; }
54461      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54462
54463  # Only process if variable expands to non-empty
54464
54465  if test "x$MSVC_DLL" != x; then
54466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54467
54468  # Input might be given as Windows format, start by converting to
54469  # unix format.
54470  path="$MSVC_DLL"
54471  new_path=`$CYGPATH -u "$path"`
54472
54473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54476  # "foo.exe" is OK but "foo" is an error.
54477  #
54478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54479  # It is also a way to make sure we got the proper file name for the real test later on.
54480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54481  if test "x$test_shortpath" = x; then
54482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54484    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54485  fi
54486
54487  # Call helper function which possibly converts this using DOS-style short mode.
54488  # If so, the updated path is stored in $new_path.
54489
54490  input_path="$new_path"
54491  # Check if we need to convert this using DOS-style short mode. If the path
54492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54493  # take no chances and rewrite it.
54494  # Note: m4 eats our [], so we need to use [ and ] instead.
54495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54496  if test "x$has_forbidden_chars" != x; then
54497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54501      # Going to short mode and back again did indeed matter. Since short mode is
54502      # case insensitive, let's make it lowercase to improve readability.
54503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54504      # Now convert it back to Unix-style (cygpath)
54505      input_path=`$CYGPATH -u "$shortmode_path"`
54506      new_path="$input_path"
54507    fi
54508  fi
54509
54510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54511  if test "x$test_cygdrive_prefix" = x; then
54512    # As a simple fix, exclude /usr/bin since it's not a real path.
54513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54515      # a path prefixed by /cygdrive for fixpath to work.
54516      new_path="$CYGWIN_ROOT_PATH$input_path"
54517    fi
54518  fi
54519
54520
54521  if test "x$path" != "x$new_path"; then
54522    MSVC_DLL="$new_path"
54523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54524$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54525  fi
54526
54527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54528
54529  path="$MSVC_DLL"
54530  has_colon=`$ECHO $path | $GREP ^.:`
54531  new_path="$path"
54532  if test "x$has_colon" = x; then
54533    # Not in mixed or Windows style, start by that.
54534    new_path=`cmd //c echo $path`
54535  fi
54536
54537
54538  input_path="$new_path"
54539  # Check if we need to convert this using DOS-style short mode. If the path
54540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54541  # take no chances and rewrite it.
54542  # Note: m4 eats our [], so we need to use [ and ] instead.
54543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54544  if test "x$has_forbidden_chars" != x; then
54545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54547  fi
54548
54549
54550  windows_path="$new_path"
54551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54552    unix_path=`$CYGPATH -u "$windows_path"`
54553    new_path="$unix_path"
54554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54556    new_path="$unix_path"
54557  fi
54558
54559  if test "x$path" != "x$new_path"; then
54560    MSVC_DLL="$new_path"
54561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54563  fi
54564
54565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54567
54568    else
54569      # We're on a unix platform. Hooray! :)
54570      path="$MSVC_DLL"
54571      has_space=`$ECHO "$path" | $GREP " "`
54572      if test "x$has_space" != x; then
54573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54574$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54576      fi
54577
54578      # Use eval to expand a potential ~
54579      eval path="$path"
54580      if test ! -f "$path" && test ! -d "$path"; then
54581        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54582      fi
54583
54584      if test -d "$path"; then
54585        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54586      else
54587        dir="`$DIRNAME "$path"`"
54588        base="`$BASENAME "$path"`"
54589        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54590      fi
54591    fi
54592  fi
54593
54594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54595$as_echo_n "checking for $DLL_NAME... " >&6; }
54596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54597$as_echo "$MSVC_DLL" >&6; }
54598    else
54599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54600$as_echo "incorrect, ignoring" >&6; }
54601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54603    fi
54604  fi
54605
54606      if test "x$MSVC_DLL" = x; then
54607        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54608      fi
54609      MSVCP_DLL="$MSVC_DLL"
54610    else
54611
54612  DLL_NAME="${MSVCP_NAME}"
54613  MSVC_DLL=
54614
54615  if test "x$MSVC_DLL" = x; then
54616    # Probe: Using well-known location from Visual Studio 10.0
54617    if test "x$VCINSTALLDIR" != x; then
54618      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54619
54620  windows_path="$CYGWIN_VC_INSTALL_DIR"
54621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54622    unix_path=`$CYGPATH -u "$windows_path"`
54623    CYGWIN_VC_INSTALL_DIR="$unix_path"
54624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54626    CYGWIN_VC_INSTALL_DIR="$unix_path"
54627  fi
54628
54629      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54630        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54631      else
54632        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54633      fi
54634      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54635
54636  DLL_NAME="$DLL_NAME"
54637  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54638  METHOD="well-known location in VCINSTALLDIR"
54639  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54641$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54642
54643    # Need to check if the found msvcr is correct architecture
54644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54645$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54646    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54648      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54649      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54651        CORRECT_MSVCR_ARCH="PE32 executable"
54652      else
54653        CORRECT_MSVCR_ARCH="PE32+ executable"
54654      fi
54655    else
54656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54657        CORRECT_MSVCR_ARCH=386
54658      else
54659        CORRECT_MSVCR_ARCH=x86-64
54660      fi
54661    fi
54662    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54664$as_echo "ok" >&6; }
54665      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54666
54667  # Only process if variable expands to non-empty
54668
54669  if test "x$MSVC_DLL" != x; then
54670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54671
54672  # Input might be given as Windows format, start by converting to
54673  # unix format.
54674  path="$MSVC_DLL"
54675  new_path=`$CYGPATH -u "$path"`
54676
54677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54680  # "foo.exe" is OK but "foo" is an error.
54681  #
54682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54683  # It is also a way to make sure we got the proper file name for the real test later on.
54684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54685  if test "x$test_shortpath" = x; then
54686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54687$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54688    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54689  fi
54690
54691  # Call helper function which possibly converts this using DOS-style short mode.
54692  # If so, the updated path is stored in $new_path.
54693
54694  input_path="$new_path"
54695  # Check if we need to convert this using DOS-style short mode. If the path
54696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54697  # take no chances and rewrite it.
54698  # Note: m4 eats our [], so we need to use [ and ] instead.
54699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54700  if test "x$has_forbidden_chars" != x; then
54701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54705      # Going to short mode and back again did indeed matter. Since short mode is
54706      # case insensitive, let's make it lowercase to improve readability.
54707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54708      # Now convert it back to Unix-style (cygpath)
54709      input_path=`$CYGPATH -u "$shortmode_path"`
54710      new_path="$input_path"
54711    fi
54712  fi
54713
54714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54715  if test "x$test_cygdrive_prefix" = x; then
54716    # As a simple fix, exclude /usr/bin since it's not a real path.
54717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54719      # a path prefixed by /cygdrive for fixpath to work.
54720      new_path="$CYGWIN_ROOT_PATH$input_path"
54721    fi
54722  fi
54723
54724
54725  if test "x$path" != "x$new_path"; then
54726    MSVC_DLL="$new_path"
54727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54728$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54729  fi
54730
54731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54732
54733  path="$MSVC_DLL"
54734  has_colon=`$ECHO $path | $GREP ^.:`
54735  new_path="$path"
54736  if test "x$has_colon" = x; then
54737    # Not in mixed or Windows style, start by that.
54738    new_path=`cmd //c echo $path`
54739  fi
54740
54741
54742  input_path="$new_path"
54743  # Check if we need to convert this using DOS-style short mode. If the path
54744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54745  # take no chances and rewrite it.
54746  # Note: m4 eats our [], so we need to use [ and ] instead.
54747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54748  if test "x$has_forbidden_chars" != x; then
54749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54751  fi
54752
54753
54754  windows_path="$new_path"
54755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54756    unix_path=`$CYGPATH -u "$windows_path"`
54757    new_path="$unix_path"
54758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54760    new_path="$unix_path"
54761  fi
54762
54763  if test "x$path" != "x$new_path"; then
54764    MSVC_DLL="$new_path"
54765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54767  fi
54768
54769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54771
54772    else
54773      # We're on a unix platform. Hooray! :)
54774      path="$MSVC_DLL"
54775      has_space=`$ECHO "$path" | $GREP " "`
54776      if test "x$has_space" != x; then
54777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54778$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54780      fi
54781
54782      # Use eval to expand a potential ~
54783      eval path="$path"
54784      if test ! -f "$path" && test ! -d "$path"; then
54785        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54786      fi
54787
54788      if test -d "$path"; then
54789        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54790      else
54791        dir="`$DIRNAME "$path"`"
54792        base="`$BASENAME "$path"`"
54793        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54794      fi
54795    fi
54796  fi
54797
54798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54799$as_echo_n "checking for $DLL_NAME... " >&6; }
54800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54801$as_echo "$MSVC_DLL" >&6; }
54802    else
54803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54804$as_echo "incorrect, ignoring" >&6; }
54805      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54806$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54807    fi
54808  fi
54809
54810    fi
54811  fi
54812
54813  if test "x$MSVC_DLL" = x; then
54814    # Probe: Check in the Boot JDK directory.
54815    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54816
54817  DLL_NAME="$DLL_NAME"
54818  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54819  METHOD="well-known location in Boot JDK"
54820  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54821    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54822$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54823
54824    # Need to check if the found msvcr is correct architecture
54825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54826$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54827    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54829      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54830      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54832        CORRECT_MSVCR_ARCH="PE32 executable"
54833      else
54834        CORRECT_MSVCR_ARCH="PE32+ executable"
54835      fi
54836    else
54837      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54838        CORRECT_MSVCR_ARCH=386
54839      else
54840        CORRECT_MSVCR_ARCH=x86-64
54841      fi
54842    fi
54843    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54845$as_echo "ok" >&6; }
54846      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54847
54848  # Only process if variable expands to non-empty
54849
54850  if test "x$MSVC_DLL" != x; then
54851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54852
54853  # Input might be given as Windows format, start by converting to
54854  # unix format.
54855  path="$MSVC_DLL"
54856  new_path=`$CYGPATH -u "$path"`
54857
54858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54861  # "foo.exe" is OK but "foo" is an error.
54862  #
54863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54864  # It is also a way to make sure we got the proper file name for the real test later on.
54865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54866  if test "x$test_shortpath" = x; then
54867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54869    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54870  fi
54871
54872  # Call helper function which possibly converts this using DOS-style short mode.
54873  # If so, the updated path is stored in $new_path.
54874
54875  input_path="$new_path"
54876  # Check if we need to convert this using DOS-style short mode. If the path
54877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54878  # take no chances and rewrite it.
54879  # Note: m4 eats our [], so we need to use [ and ] instead.
54880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54881  if test "x$has_forbidden_chars" != x; then
54882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54886      # Going to short mode and back again did indeed matter. Since short mode is
54887      # case insensitive, let's make it lowercase to improve readability.
54888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54889      # Now convert it back to Unix-style (cygpath)
54890      input_path=`$CYGPATH -u "$shortmode_path"`
54891      new_path="$input_path"
54892    fi
54893  fi
54894
54895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54896  if test "x$test_cygdrive_prefix" = x; then
54897    # As a simple fix, exclude /usr/bin since it's not a real path.
54898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54900      # a path prefixed by /cygdrive for fixpath to work.
54901      new_path="$CYGWIN_ROOT_PATH$input_path"
54902    fi
54903  fi
54904
54905
54906  if test "x$path" != "x$new_path"; then
54907    MSVC_DLL="$new_path"
54908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54909$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54910  fi
54911
54912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54913
54914  path="$MSVC_DLL"
54915  has_colon=`$ECHO $path | $GREP ^.:`
54916  new_path="$path"
54917  if test "x$has_colon" = x; then
54918    # Not in mixed or Windows style, start by that.
54919    new_path=`cmd //c echo $path`
54920  fi
54921
54922
54923  input_path="$new_path"
54924  # Check if we need to convert this using DOS-style short mode. If the path
54925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54926  # take no chances and rewrite it.
54927  # Note: m4 eats our [], so we need to use [ and ] instead.
54928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54929  if test "x$has_forbidden_chars" != x; then
54930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54932  fi
54933
54934
54935  windows_path="$new_path"
54936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54937    unix_path=`$CYGPATH -u "$windows_path"`
54938    new_path="$unix_path"
54939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54941    new_path="$unix_path"
54942  fi
54943
54944  if test "x$path" != "x$new_path"; then
54945    MSVC_DLL="$new_path"
54946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54948  fi
54949
54950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54952
54953    else
54954      # We're on a unix platform. Hooray! :)
54955      path="$MSVC_DLL"
54956      has_space=`$ECHO "$path" | $GREP " "`
54957      if test "x$has_space" != x; then
54958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54959$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54961      fi
54962
54963      # Use eval to expand a potential ~
54964      eval path="$path"
54965      if test ! -f "$path" && test ! -d "$path"; then
54966        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54967      fi
54968
54969      if test -d "$path"; then
54970        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54971      else
54972        dir="`$DIRNAME "$path"`"
54973        base="`$BASENAME "$path"`"
54974        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54975      fi
54976    fi
54977  fi
54978
54979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54980$as_echo_n "checking for $DLL_NAME... " >&6; }
54981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54982$as_echo "$MSVC_DLL" >&6; }
54983    else
54984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54985$as_echo "incorrect, ignoring" >&6; }
54986      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54987$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54988    fi
54989  fi
54990
54991  fi
54992
54993  if test "x$MSVC_DLL" = x; then
54994    # Probe: Look in the Windows system32 directory
54995    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54996
54997  windows_path="$CYGWIN_SYSTEMROOT"
54998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54999    unix_path=`$CYGPATH -u "$windows_path"`
55000    CYGWIN_SYSTEMROOT="$unix_path"
55001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55003    CYGWIN_SYSTEMROOT="$unix_path"
55004  fi
55005
55006    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55007
55008  DLL_NAME="$DLL_NAME"
55009  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55010  METHOD="well-known location in SYSTEMROOT"
55011  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55012    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55013$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55014
55015    # Need to check if the found msvcr is correct architecture
55016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55017$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55018    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55020      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55021      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55022      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55023        CORRECT_MSVCR_ARCH="PE32 executable"
55024      else
55025        CORRECT_MSVCR_ARCH="PE32+ executable"
55026      fi
55027    else
55028      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55029        CORRECT_MSVCR_ARCH=386
55030      else
55031        CORRECT_MSVCR_ARCH=x86-64
55032      fi
55033    fi
55034    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55036$as_echo "ok" >&6; }
55037      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55038
55039  # Only process if variable expands to non-empty
55040
55041  if test "x$MSVC_DLL" != x; then
55042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55043
55044  # Input might be given as Windows format, start by converting to
55045  # unix format.
55046  path="$MSVC_DLL"
55047  new_path=`$CYGPATH -u "$path"`
55048
55049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55052  # "foo.exe" is OK but "foo" is an error.
55053  #
55054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55055  # It is also a way to make sure we got the proper file name for the real test later on.
55056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55057  if test "x$test_shortpath" = x; then
55058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55059$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55060    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55061  fi
55062
55063  # Call helper function which possibly converts this using DOS-style short mode.
55064  # If so, the updated path is stored in $new_path.
55065
55066  input_path="$new_path"
55067  # Check if we need to convert this using DOS-style short mode. If the path
55068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55069  # take no chances and rewrite it.
55070  # Note: m4 eats our [], so we need to use [ and ] instead.
55071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55072  if test "x$has_forbidden_chars" != x; then
55073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55077      # Going to short mode and back again did indeed matter. Since short mode is
55078      # case insensitive, let's make it lowercase to improve readability.
55079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55080      # Now convert it back to Unix-style (cygpath)
55081      input_path=`$CYGPATH -u "$shortmode_path"`
55082      new_path="$input_path"
55083    fi
55084  fi
55085
55086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55087  if test "x$test_cygdrive_prefix" = x; then
55088    # As a simple fix, exclude /usr/bin since it's not a real path.
55089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55091      # a path prefixed by /cygdrive for fixpath to work.
55092      new_path="$CYGWIN_ROOT_PATH$input_path"
55093    fi
55094  fi
55095
55096
55097  if test "x$path" != "x$new_path"; then
55098    MSVC_DLL="$new_path"
55099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55100$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55101  fi
55102
55103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55104
55105  path="$MSVC_DLL"
55106  has_colon=`$ECHO $path | $GREP ^.:`
55107  new_path="$path"
55108  if test "x$has_colon" = x; then
55109    # Not in mixed or Windows style, start by that.
55110    new_path=`cmd //c echo $path`
55111  fi
55112
55113
55114  input_path="$new_path"
55115  # Check if we need to convert this using DOS-style short mode. If the path
55116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55117  # take no chances and rewrite it.
55118  # Note: m4 eats our [], so we need to use [ and ] instead.
55119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55120  if test "x$has_forbidden_chars" != x; then
55121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55123  fi
55124
55125
55126  windows_path="$new_path"
55127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55128    unix_path=`$CYGPATH -u "$windows_path"`
55129    new_path="$unix_path"
55130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55132    new_path="$unix_path"
55133  fi
55134
55135  if test "x$path" != "x$new_path"; then
55136    MSVC_DLL="$new_path"
55137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55139  fi
55140
55141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55143
55144    else
55145      # We're on a unix platform. Hooray! :)
55146      path="$MSVC_DLL"
55147      has_space=`$ECHO "$path" | $GREP " "`
55148      if test "x$has_space" != x; then
55149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55152      fi
55153
55154      # Use eval to expand a potential ~
55155      eval path="$path"
55156      if test ! -f "$path" && test ! -d "$path"; then
55157        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55158      fi
55159
55160      if test -d "$path"; then
55161        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55162      else
55163        dir="`$DIRNAME "$path"`"
55164        base="`$BASENAME "$path"`"
55165        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55166      fi
55167    fi
55168  fi
55169
55170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55171$as_echo_n "checking for $DLL_NAME... " >&6; }
55172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55173$as_echo "$MSVC_DLL" >&6; }
55174    else
55175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55176$as_echo "incorrect, ignoring" >&6; }
55177      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55178$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55179    fi
55180  fi
55181
55182  fi
55183
55184  if test "x$MSVC_DLL" = x; then
55185    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55186    if test "x$VS100COMNTOOLS" != x; then
55187      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55188
55189  windows_path="$CYGWIN_VS_TOOLS_DIR"
55190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55191    unix_path=`$CYGPATH -u "$windows_path"`
55192    CYGWIN_VS_TOOLS_DIR="$unix_path"
55193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55195    CYGWIN_VS_TOOLS_DIR="$unix_path"
55196  fi
55197
55198      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55199        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55200	    | $GREP -i /x64/ | $HEAD --lines 1`
55201      else
55202        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55203	    | $GREP -i /x86/ | $HEAD --lines 1`
55204      fi
55205
55206  DLL_NAME="$DLL_NAME"
55207  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55208  METHOD="search of VS100COMNTOOLS"
55209  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55210    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55211$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55212
55213    # Need to check if the found msvcr is correct architecture
55214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55215$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55216    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55218      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55219      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55221        CORRECT_MSVCR_ARCH="PE32 executable"
55222      else
55223        CORRECT_MSVCR_ARCH="PE32+ executable"
55224      fi
55225    else
55226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55227        CORRECT_MSVCR_ARCH=386
55228      else
55229        CORRECT_MSVCR_ARCH=x86-64
55230      fi
55231    fi
55232    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55234$as_echo "ok" >&6; }
55235      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55236
55237  # Only process if variable expands to non-empty
55238
55239  if test "x$MSVC_DLL" != x; then
55240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55241
55242  # Input might be given as Windows format, start by converting to
55243  # unix format.
55244  path="$MSVC_DLL"
55245  new_path=`$CYGPATH -u "$path"`
55246
55247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55250  # "foo.exe" is OK but "foo" is an error.
55251  #
55252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55253  # It is also a way to make sure we got the proper file name for the real test later on.
55254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55255  if test "x$test_shortpath" = x; then
55256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55258    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55259  fi
55260
55261  # Call helper function which possibly converts this using DOS-style short mode.
55262  # If so, the updated path is stored in $new_path.
55263
55264  input_path="$new_path"
55265  # Check if we need to convert this using DOS-style short mode. If the path
55266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55267  # take no chances and rewrite it.
55268  # Note: m4 eats our [], so we need to use [ and ] instead.
55269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55270  if test "x$has_forbidden_chars" != x; then
55271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55275      # Going to short mode and back again did indeed matter. Since short mode is
55276      # case insensitive, let's make it lowercase to improve readability.
55277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55278      # Now convert it back to Unix-style (cygpath)
55279      input_path=`$CYGPATH -u "$shortmode_path"`
55280      new_path="$input_path"
55281    fi
55282  fi
55283
55284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55285  if test "x$test_cygdrive_prefix" = x; then
55286    # As a simple fix, exclude /usr/bin since it's not a real path.
55287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55289      # a path prefixed by /cygdrive for fixpath to work.
55290      new_path="$CYGWIN_ROOT_PATH$input_path"
55291    fi
55292  fi
55293
55294
55295  if test "x$path" != "x$new_path"; then
55296    MSVC_DLL="$new_path"
55297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55298$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55299  fi
55300
55301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55302
55303  path="$MSVC_DLL"
55304  has_colon=`$ECHO $path | $GREP ^.:`
55305  new_path="$path"
55306  if test "x$has_colon" = x; then
55307    # Not in mixed or Windows style, start by that.
55308    new_path=`cmd //c echo $path`
55309  fi
55310
55311
55312  input_path="$new_path"
55313  # Check if we need to convert this using DOS-style short mode. If the path
55314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55315  # take no chances and rewrite it.
55316  # Note: m4 eats our [], so we need to use [ and ] instead.
55317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55318  if test "x$has_forbidden_chars" != x; then
55319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55321  fi
55322
55323
55324  windows_path="$new_path"
55325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55326    unix_path=`$CYGPATH -u "$windows_path"`
55327    new_path="$unix_path"
55328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55330    new_path="$unix_path"
55331  fi
55332
55333  if test "x$path" != "x$new_path"; then
55334    MSVC_DLL="$new_path"
55335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55337  fi
55338
55339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55341
55342    else
55343      # We're on a unix platform. Hooray! :)
55344      path="$MSVC_DLL"
55345      has_space=`$ECHO "$path" | $GREP " "`
55346      if test "x$has_space" != x; then
55347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55348$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55350      fi
55351
55352      # Use eval to expand a potential ~
55353      eval path="$path"
55354      if test ! -f "$path" && test ! -d "$path"; then
55355        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55356      fi
55357
55358      if test -d "$path"; then
55359        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55360      else
55361        dir="`$DIRNAME "$path"`"
55362        base="`$BASENAME "$path"`"
55363        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55364      fi
55365    fi
55366  fi
55367
55368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55369$as_echo_n "checking for $DLL_NAME... " >&6; }
55370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55371$as_echo "$MSVC_DLL" >&6; }
55372    else
55373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55374$as_echo "incorrect, ignoring" >&6; }
55375      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55376$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55377    fi
55378  fi
55379
55380    fi
55381  fi
55382
55383  if test "x$MSVC_DLL" = x; then
55384    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55385    # (This was the original behaviour; kept since it might turn something up)
55386    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55387      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55388        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55389	    | $GREP x64 | $HEAD --lines 1`
55390      else
55391        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55392	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55393        if test "x$POSSIBLE_MSVC_DLL" = x; then
55394          # We're grasping at straws now...
55395          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55396	      | $HEAD --lines 1`
55397        fi
55398      fi
55399
55400
55401  DLL_NAME="$DLL_NAME"
55402  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55403  METHOD="search of VCINSTALLDIR"
55404  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55405    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55406$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55407
55408    # Need to check if the found msvcr is correct architecture
55409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55410$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55411    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55413      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55414      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55415      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55416        CORRECT_MSVCR_ARCH="PE32 executable"
55417      else
55418        CORRECT_MSVCR_ARCH="PE32+ executable"
55419      fi
55420    else
55421      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55422        CORRECT_MSVCR_ARCH=386
55423      else
55424        CORRECT_MSVCR_ARCH=x86-64
55425      fi
55426    fi
55427    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55429$as_echo "ok" >&6; }
55430      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55431
55432  # Only process if variable expands to non-empty
55433
55434  if test "x$MSVC_DLL" != x; then
55435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55436
55437  # Input might be given as Windows format, start by converting to
55438  # unix format.
55439  path="$MSVC_DLL"
55440  new_path=`$CYGPATH -u "$path"`
55441
55442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55445  # "foo.exe" is OK but "foo" is an error.
55446  #
55447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55448  # It is also a way to make sure we got the proper file name for the real test later on.
55449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55450  if test "x$test_shortpath" = x; then
55451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55452$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55453    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55454  fi
55455
55456  # Call helper function which possibly converts this using DOS-style short mode.
55457  # If so, the updated path is stored in $new_path.
55458
55459  input_path="$new_path"
55460  # Check if we need to convert this using DOS-style short mode. If the path
55461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55462  # take no chances and rewrite it.
55463  # Note: m4 eats our [], so we need to use [ and ] instead.
55464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55465  if test "x$has_forbidden_chars" != x; then
55466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55470      # Going to short mode and back again did indeed matter. Since short mode is
55471      # case insensitive, let's make it lowercase to improve readability.
55472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55473      # Now convert it back to Unix-style (cygpath)
55474      input_path=`$CYGPATH -u "$shortmode_path"`
55475      new_path="$input_path"
55476    fi
55477  fi
55478
55479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55480  if test "x$test_cygdrive_prefix" = x; then
55481    # As a simple fix, exclude /usr/bin since it's not a real path.
55482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55484      # a path prefixed by /cygdrive for fixpath to work.
55485      new_path="$CYGWIN_ROOT_PATH$input_path"
55486    fi
55487  fi
55488
55489
55490  if test "x$path" != "x$new_path"; then
55491    MSVC_DLL="$new_path"
55492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55493$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55494  fi
55495
55496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497
55498  path="$MSVC_DLL"
55499  has_colon=`$ECHO $path | $GREP ^.:`
55500  new_path="$path"
55501  if test "x$has_colon" = x; then
55502    # Not in mixed or Windows style, start by that.
55503    new_path=`cmd //c echo $path`
55504  fi
55505
55506
55507  input_path="$new_path"
55508  # Check if we need to convert this using DOS-style short mode. If the path
55509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55510  # take no chances and rewrite it.
55511  # Note: m4 eats our [], so we need to use [ and ] instead.
55512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55513  if test "x$has_forbidden_chars" != x; then
55514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55516  fi
55517
55518
55519  windows_path="$new_path"
55520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55521    unix_path=`$CYGPATH -u "$windows_path"`
55522    new_path="$unix_path"
55523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55525    new_path="$unix_path"
55526  fi
55527
55528  if test "x$path" != "x$new_path"; then
55529    MSVC_DLL="$new_path"
55530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55531$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55532  fi
55533
55534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55536
55537    else
55538      # We're on a unix platform. Hooray! :)
55539      path="$MSVC_DLL"
55540      has_space=`$ECHO "$path" | $GREP " "`
55541      if test "x$has_space" != x; then
55542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55543$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55545      fi
55546
55547      # Use eval to expand a potential ~
55548      eval path="$path"
55549      if test ! -f "$path" && test ! -d "$path"; then
55550        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55551      fi
55552
55553      if test -d "$path"; then
55554        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55555      else
55556        dir="`$DIRNAME "$path"`"
55557        base="`$BASENAME "$path"`"
55558        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55559      fi
55560    fi
55561  fi
55562
55563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55564$as_echo_n "checking for $DLL_NAME... " >&6; }
55565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55566$as_echo "$MSVC_DLL" >&6; }
55567    else
55568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55569$as_echo "incorrect, ignoring" >&6; }
55570      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55571$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55572    fi
55573  fi
55574
55575    fi
55576  fi
55577
55578  if test "x$MSVC_DLL" = x; then
55579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55580$as_echo_n "checking for $DLL_NAME... " >&6; }
55581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55582$as_echo "no" >&6; }
55583    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55584  fi
55585
55586      MSVCP_DLL="$MSVC_DLL"
55587    fi
55588
55589  fi
55590
55591  fi
55592
55593
55594  if test "x$NEEDS_LIB_X11" = xfalse; then
55595    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55596      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55597$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55598    fi
55599    X_CFLAGS=
55600    X_LIBS=
55601  else
55602
55603    if test "x${with_x}" = xno; then
55604      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55605    fi
55606
55607    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55608      # The user has specified a X11 base directory. Use it for includes and
55609      # libraries, unless explicitely overridden.
55610      if test "x$x_includes" = xNONE; then
55611        x_includes="${with_x}/include"
55612      fi
55613      if test "x$x_libraries" = xNONE; then
55614        x_libraries="${with_x}/lib"
55615      fi
55616    else
55617      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55618      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55619      # --x-libraries for the sysroot, if that seems to be correct.
55620      if test "x$SYSROOT" != "x"; then
55621        if test "x$x_includes" = xNONE; then
55622          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55623            x_includes="$SYSROOT/usr/X11R6/include"
55624          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55625            x_includes="$SYSROOT/usr/include"
55626          fi
55627        fi
55628        if test "x$x_libraries" = xNONE; then
55629          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55630            x_libraries="$SYSROOT/usr/X11R6/lib"
55631          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55632            x_libraries="$SYSROOT/usr/lib64"
55633          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55634            x_libraries="$SYSROOT/usr/lib"
55635          fi
55636        fi
55637      fi
55638    fi
55639
55640    # Now let autoconf do it's magic
55641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55642$as_echo_n "checking for X... " >&6; }
55643
55644
55645# Check whether --with-x was given.
55646if test "${with_x+set}" = set; then :
55647  withval=$with_x;
55648fi
55649
55650# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
55651if test "x$with_x" = xno; then
55652  # The user explicitly disabled X.
55653  have_x=disabled
55654else
55655  case $x_includes,$x_libraries in #(
55656    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
55657    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
55658  $as_echo_n "(cached) " >&6
55659else
55660  # One or both of the vars are not set, and there is no cached value.
55661ac_x_includes=no ac_x_libraries=no
55662rm -f -r conftest.dir
55663if mkdir conftest.dir; then
55664  cd conftest.dir
55665  cat >Imakefile <<'_ACEOF'
55666incroot:
55667	@echo incroot='${INCROOT}'
55668usrlibdir:
55669	@echo usrlibdir='${USRLIBDIR}'
55670libdir:
55671	@echo libdir='${LIBDIR}'
55672_ACEOF
55673  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
55674    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
55675    for ac_var in incroot usrlibdir libdir; do
55676      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
55677    done
55678    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
55679    for ac_extension in a so sl dylib la dll; do
55680      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
55681	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
55682	ac_im_usrlibdir=$ac_im_libdir; break
55683      fi
55684    done
55685    # Screen out bogus values from the imake configuration.  They are
55686    # bogus both because they are the default anyway, and because
55687    # using them would break gcc on systems where it needs fixed includes.
55688    case $ac_im_incroot in
55689	/usr/include) ac_x_includes= ;;
55690	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
55691    esac
55692    case $ac_im_usrlibdir in
55693	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
55694	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
55695    esac
55696  fi
55697  cd ..
55698  rm -f -r conftest.dir
55699fi
55700
55701# Standard set of common directories for X headers.
55702# Check X11 before X11Rn because it is often a symlink to the current release.
55703ac_x_header_dirs='
55704/usr/X11/include
55705/usr/X11R7/include
55706/usr/X11R6/include
55707/usr/X11R5/include
55708/usr/X11R4/include
55709
55710/usr/include/X11
55711/usr/include/X11R7
55712/usr/include/X11R6
55713/usr/include/X11R5
55714/usr/include/X11R4
55715
55716/usr/local/X11/include
55717/usr/local/X11R7/include
55718/usr/local/X11R6/include
55719/usr/local/X11R5/include
55720/usr/local/X11R4/include
55721
55722/usr/local/include/X11
55723/usr/local/include/X11R7
55724/usr/local/include/X11R6
55725/usr/local/include/X11R5
55726/usr/local/include/X11R4
55727
55728/usr/X386/include
55729/usr/x386/include
55730/usr/XFree86/include/X11
55731
55732/usr/include
55733/usr/local/include
55734/usr/unsupported/include
55735/usr/athena/include
55736/usr/local/x11r5/include
55737/usr/lpp/Xamples/include
55738
55739/usr/openwin/include
55740/usr/openwin/share/include'
55741
55742if test "$ac_x_includes" = no; then
55743  # Guess where to find include files, by looking for Xlib.h.
55744  # First, try using that file with no special directory specified.
55745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55746/* end confdefs.h.  */
55747#include <X11/Xlib.h>
55748_ACEOF
55749if ac_fn_cxx_try_cpp "$LINENO"; then :
55750  # We can compile using X headers with no special include directory.
55751ac_x_includes=
55752else
55753  for ac_dir in $ac_x_header_dirs; do
55754  if test -r "$ac_dir/X11/Xlib.h"; then
55755    ac_x_includes=$ac_dir
55756    break
55757  fi
55758done
55759fi
55760rm -f conftest.err conftest.i conftest.$ac_ext
55761fi # $ac_x_includes = no
55762
55763if test "$ac_x_libraries" = no; then
55764  # Check for the libraries.
55765  # See if we find them without any special options.
55766  # Don't add to $LIBS permanently.
55767  ac_save_LIBS=$LIBS
55768  LIBS="-lX11 $LIBS"
55769  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55770/* end confdefs.h.  */
55771#include <X11/Xlib.h>
55772int
55773main ()
55774{
55775XrmInitialize ()
55776  ;
55777  return 0;
55778}
55779_ACEOF
55780if ac_fn_cxx_try_link "$LINENO"; then :
55781  LIBS=$ac_save_LIBS
55782# We can link X programs with no special library path.
55783ac_x_libraries=
55784else
55785  LIBS=$ac_save_LIBS
55786for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
55787do
55788  # Don't even attempt the hair of trying to link an X program!
55789  for ac_extension in a so sl dylib la dll; do
55790    if test -r "$ac_dir/libX11.$ac_extension"; then
55791      ac_x_libraries=$ac_dir
55792      break 2
55793    fi
55794  done
55795done
55796fi
55797rm -f core conftest.err conftest.$ac_objext \
55798    conftest$ac_exeext conftest.$ac_ext
55799fi # $ac_x_libraries = no
55800
55801case $ac_x_includes,$ac_x_libraries in #(
55802  no,* | *,no | *\'*)
55803    # Didn't find X, or a directory has "'" in its name.
55804    ac_cv_have_x="have_x=no";; #(
55805  *)
55806    # Record where we found X for the cache.
55807    ac_cv_have_x="have_x=yes\
55808	ac_x_includes='$ac_x_includes'\
55809	ac_x_libraries='$ac_x_libraries'"
55810esac
55811fi
55812;; #(
55813    *) have_x=yes;;
55814  esac
55815  eval "$ac_cv_have_x"
55816fi # $with_x != no
55817
55818if test "$have_x" != yes; then
55819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
55820$as_echo "$have_x" >&6; }
55821  no_x=yes
55822else
55823  # If each of the values was on the command line, it overrides each guess.
55824  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
55825  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
55826  # Update the cache value to reflect the command line values.
55827  ac_cv_have_x="have_x=yes\
55828	ac_x_includes='$x_includes'\
55829	ac_x_libraries='$x_libraries'"
55830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
55831$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
55832fi
55833
55834    if test "$no_x" = yes; then
55835  # Not all programs may use this symbol, but it does not hurt to define it.
55836
55837$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
55838
55839  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
55840else
55841  if test -n "$x_includes"; then
55842    X_CFLAGS="$X_CFLAGS -I$x_includes"
55843  fi
55844
55845  # It would also be nice to do this for all -L options, not just this one.
55846  if test -n "$x_libraries"; then
55847    X_LIBS="$X_LIBS -L$x_libraries"
55848    # For Solaris; some versions of Sun CC require a space after -R and
55849    # others require no space.  Words are not sufficient . . . .
55850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
55851$as_echo_n "checking whether -R must be followed by a space... " >&6; }
55852    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
55853    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
55854    ac_cxx_werror_flag=yes
55855    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55856/* end confdefs.h.  */
55857
55858int
55859main ()
55860{
55861
55862  ;
55863  return 0;
55864}
55865_ACEOF
55866if ac_fn_cxx_try_link "$LINENO"; then :
55867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55868$as_echo "no" >&6; }
55869       X_LIBS="$X_LIBS -R$x_libraries"
55870else
55871  LIBS="$ac_xsave_LIBS -R $x_libraries"
55872       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55873/* end confdefs.h.  */
55874
55875int
55876main ()
55877{
55878
55879  ;
55880  return 0;
55881}
55882_ACEOF
55883if ac_fn_cxx_try_link "$LINENO"; then :
55884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55885$as_echo "yes" >&6; }
55886	  X_LIBS="$X_LIBS -R $x_libraries"
55887else
55888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
55889$as_echo "neither works" >&6; }
55890fi
55891rm -f core conftest.err conftest.$ac_objext \
55892    conftest$ac_exeext conftest.$ac_ext
55893fi
55894rm -f core conftest.err conftest.$ac_objext \
55895    conftest$ac_exeext conftest.$ac_ext
55896    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
55897    LIBS=$ac_xsave_LIBS
55898  fi
55899
55900  # Check for system-dependent libraries X programs must link with.
55901  # Do this before checking for the system-independent R6 libraries
55902  # (-lICE), since we may need -lsocket or whatever for X linking.
55903
55904  if test "$ISC" = yes; then
55905    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
55906  else
55907    # Martyn Johnson says this is needed for Ultrix, if the X
55908    # libraries were built with DECnet support.  And Karl Berry says
55909    # the Alpha needs dnet_stub (dnet does not exist).
55910    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
55911    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55912/* end confdefs.h.  */
55913
55914/* Override any GCC internal prototype to avoid an error.
55915   Use char because int might match the return type of a GCC
55916   builtin and then its argument prototype would still apply.  */
55917#ifdef __cplusplus
55918extern "C"
55919#endif
55920char XOpenDisplay ();
55921int
55922main ()
55923{
55924return XOpenDisplay ();
55925  ;
55926  return 0;
55927}
55928_ACEOF
55929if ac_fn_cxx_try_link "$LINENO"; then :
55930
55931else
55932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
55933$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
55934if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
55935  $as_echo_n "(cached) " >&6
55936else
55937  ac_check_lib_save_LIBS=$LIBS
55938LIBS="-ldnet  $LIBS"
55939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55940/* end confdefs.h.  */
55941
55942/* Override any GCC internal prototype to avoid an error.
55943   Use char because int might match the return type of a GCC
55944   builtin and then its argument prototype would still apply.  */
55945#ifdef __cplusplus
55946extern "C"
55947#endif
55948char dnet_ntoa ();
55949int
55950main ()
55951{
55952return dnet_ntoa ();
55953  ;
55954  return 0;
55955}
55956_ACEOF
55957if ac_fn_cxx_try_link "$LINENO"; then :
55958  ac_cv_lib_dnet_dnet_ntoa=yes
55959else
55960  ac_cv_lib_dnet_dnet_ntoa=no
55961fi
55962rm -f core conftest.err conftest.$ac_objext \
55963    conftest$ac_exeext conftest.$ac_ext
55964LIBS=$ac_check_lib_save_LIBS
55965fi
55966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
55967$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
55968if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
55969  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
55970fi
55971
55972    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
55973      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
55974$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
55975if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
55976  $as_echo_n "(cached) " >&6
55977else
55978  ac_check_lib_save_LIBS=$LIBS
55979LIBS="-ldnet_stub  $LIBS"
55980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55981/* end confdefs.h.  */
55982
55983/* Override any GCC internal prototype to avoid an error.
55984   Use char because int might match the return type of a GCC
55985   builtin and then its argument prototype would still apply.  */
55986#ifdef __cplusplus
55987extern "C"
55988#endif
55989char dnet_ntoa ();
55990int
55991main ()
55992{
55993return dnet_ntoa ();
55994  ;
55995  return 0;
55996}
55997_ACEOF
55998if ac_fn_cxx_try_link "$LINENO"; then :
55999  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56000else
56001  ac_cv_lib_dnet_stub_dnet_ntoa=no
56002fi
56003rm -f core conftest.err conftest.$ac_objext \
56004    conftest$ac_exeext conftest.$ac_ext
56005LIBS=$ac_check_lib_save_LIBS
56006fi
56007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56008$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56009if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56010  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56011fi
56012
56013    fi
56014fi
56015rm -f core conftest.err conftest.$ac_objext \
56016    conftest$ac_exeext conftest.$ac_ext
56017    LIBS="$ac_xsave_LIBS"
56018
56019    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56020    # to get the SysV transport functions.
56021    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56022    # needs -lnsl.
56023    # The nsl library prevents programs from opening the X display
56024    # on Irix 5.2, according to T.E. Dickey.
56025    # The functions gethostbyname, getservbyname, and inet_addr are
56026    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56027    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56028if test "x$ac_cv_func_gethostbyname" = xyes; then :
56029
56030fi
56031
56032    if test $ac_cv_func_gethostbyname = no; then
56033      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56034$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56035if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56036  $as_echo_n "(cached) " >&6
56037else
56038  ac_check_lib_save_LIBS=$LIBS
56039LIBS="-lnsl  $LIBS"
56040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56041/* end confdefs.h.  */
56042
56043/* Override any GCC internal prototype to avoid an error.
56044   Use char because int might match the return type of a GCC
56045   builtin and then its argument prototype would still apply.  */
56046#ifdef __cplusplus
56047extern "C"
56048#endif
56049char gethostbyname ();
56050int
56051main ()
56052{
56053return gethostbyname ();
56054  ;
56055  return 0;
56056}
56057_ACEOF
56058if ac_fn_cxx_try_link "$LINENO"; then :
56059  ac_cv_lib_nsl_gethostbyname=yes
56060else
56061  ac_cv_lib_nsl_gethostbyname=no
56062fi
56063rm -f core conftest.err conftest.$ac_objext \
56064    conftest$ac_exeext conftest.$ac_ext
56065LIBS=$ac_check_lib_save_LIBS
56066fi
56067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56068$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56069if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56070  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56071fi
56072
56073      if test $ac_cv_lib_nsl_gethostbyname = no; then
56074	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56075$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56076if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56077  $as_echo_n "(cached) " >&6
56078else
56079  ac_check_lib_save_LIBS=$LIBS
56080LIBS="-lbsd  $LIBS"
56081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56082/* end confdefs.h.  */
56083
56084/* Override any GCC internal prototype to avoid an error.
56085   Use char because int might match the return type of a GCC
56086   builtin and then its argument prototype would still apply.  */
56087#ifdef __cplusplus
56088extern "C"
56089#endif
56090char gethostbyname ();
56091int
56092main ()
56093{
56094return gethostbyname ();
56095  ;
56096  return 0;
56097}
56098_ACEOF
56099if ac_fn_cxx_try_link "$LINENO"; then :
56100  ac_cv_lib_bsd_gethostbyname=yes
56101else
56102  ac_cv_lib_bsd_gethostbyname=no
56103fi
56104rm -f core conftest.err conftest.$ac_objext \
56105    conftest$ac_exeext conftest.$ac_ext
56106LIBS=$ac_check_lib_save_LIBS
56107fi
56108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56109$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56110if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56111  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56112fi
56113
56114      fi
56115    fi
56116
56117    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56118    # socket/setsockopt and other routines are undefined under SCO ODT
56119    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56120    # on later versions), says Simon Leinen: it contains gethostby*
56121    # variants that don't use the name server (or something).  -lsocket
56122    # must be given before -lnsl if both are needed.  We assume that
56123    # if connect needs -lnsl, so does gethostbyname.
56124    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56125if test "x$ac_cv_func_connect" = xyes; then :
56126
56127fi
56128
56129    if test $ac_cv_func_connect = no; then
56130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56131$as_echo_n "checking for connect in -lsocket... " >&6; }
56132if ${ac_cv_lib_socket_connect+:} false; then :
56133  $as_echo_n "(cached) " >&6
56134else
56135  ac_check_lib_save_LIBS=$LIBS
56136LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56138/* end confdefs.h.  */
56139
56140/* Override any GCC internal prototype to avoid an error.
56141   Use char because int might match the return type of a GCC
56142   builtin and then its argument prototype would still apply.  */
56143#ifdef __cplusplus
56144extern "C"
56145#endif
56146char connect ();
56147int
56148main ()
56149{
56150return connect ();
56151  ;
56152  return 0;
56153}
56154_ACEOF
56155if ac_fn_cxx_try_link "$LINENO"; then :
56156  ac_cv_lib_socket_connect=yes
56157else
56158  ac_cv_lib_socket_connect=no
56159fi
56160rm -f core conftest.err conftest.$ac_objext \
56161    conftest$ac_exeext conftest.$ac_ext
56162LIBS=$ac_check_lib_save_LIBS
56163fi
56164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56165$as_echo "$ac_cv_lib_socket_connect" >&6; }
56166if test "x$ac_cv_lib_socket_connect" = xyes; then :
56167  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56168fi
56169
56170    fi
56171
56172    # Guillermo Gomez says -lposix is necessary on A/UX.
56173    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56174if test "x$ac_cv_func_remove" = xyes; then :
56175
56176fi
56177
56178    if test $ac_cv_func_remove = no; then
56179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56180$as_echo_n "checking for remove in -lposix... " >&6; }
56181if ${ac_cv_lib_posix_remove+:} false; then :
56182  $as_echo_n "(cached) " >&6
56183else
56184  ac_check_lib_save_LIBS=$LIBS
56185LIBS="-lposix  $LIBS"
56186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56187/* end confdefs.h.  */
56188
56189/* Override any GCC internal prototype to avoid an error.
56190   Use char because int might match the return type of a GCC
56191   builtin and then its argument prototype would still apply.  */
56192#ifdef __cplusplus
56193extern "C"
56194#endif
56195char remove ();
56196int
56197main ()
56198{
56199return remove ();
56200  ;
56201  return 0;
56202}
56203_ACEOF
56204if ac_fn_cxx_try_link "$LINENO"; then :
56205  ac_cv_lib_posix_remove=yes
56206else
56207  ac_cv_lib_posix_remove=no
56208fi
56209rm -f core conftest.err conftest.$ac_objext \
56210    conftest$ac_exeext conftest.$ac_ext
56211LIBS=$ac_check_lib_save_LIBS
56212fi
56213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56214$as_echo "$ac_cv_lib_posix_remove" >&6; }
56215if test "x$ac_cv_lib_posix_remove" = xyes; then :
56216  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56217fi
56218
56219    fi
56220
56221    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56222    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56223if test "x$ac_cv_func_shmat" = xyes; then :
56224
56225fi
56226
56227    if test $ac_cv_func_shmat = no; then
56228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56229$as_echo_n "checking for shmat in -lipc... " >&6; }
56230if ${ac_cv_lib_ipc_shmat+:} false; then :
56231  $as_echo_n "(cached) " >&6
56232else
56233  ac_check_lib_save_LIBS=$LIBS
56234LIBS="-lipc  $LIBS"
56235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56236/* end confdefs.h.  */
56237
56238/* Override any GCC internal prototype to avoid an error.
56239   Use char because int might match the return type of a GCC
56240   builtin and then its argument prototype would still apply.  */
56241#ifdef __cplusplus
56242extern "C"
56243#endif
56244char shmat ();
56245int
56246main ()
56247{
56248return shmat ();
56249  ;
56250  return 0;
56251}
56252_ACEOF
56253if ac_fn_cxx_try_link "$LINENO"; then :
56254  ac_cv_lib_ipc_shmat=yes
56255else
56256  ac_cv_lib_ipc_shmat=no
56257fi
56258rm -f core conftest.err conftest.$ac_objext \
56259    conftest$ac_exeext conftest.$ac_ext
56260LIBS=$ac_check_lib_save_LIBS
56261fi
56262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56263$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56264if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56265  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56266fi
56267
56268    fi
56269  fi
56270
56271  # Check for libraries that X11R6 Xt/Xaw programs need.
56272  ac_save_LDFLAGS=$LDFLAGS
56273  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56274  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56275  # check for ICE first), but we must link in the order -lSM -lICE or
56276  # we get undefined symbols.  So assume we have SM if we have ICE.
56277  # These have to be linked with before -lX11, unlike the other
56278  # libraries we check for below, so use a different variable.
56279  # John Interrante, Karl Berry
56280  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56281$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56282if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56283  $as_echo_n "(cached) " >&6
56284else
56285  ac_check_lib_save_LIBS=$LIBS
56286LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56288/* end confdefs.h.  */
56289
56290/* Override any GCC internal prototype to avoid an error.
56291   Use char because int might match the return type of a GCC
56292   builtin and then its argument prototype would still apply.  */
56293#ifdef __cplusplus
56294extern "C"
56295#endif
56296char IceConnectionNumber ();
56297int
56298main ()
56299{
56300return IceConnectionNumber ();
56301  ;
56302  return 0;
56303}
56304_ACEOF
56305if ac_fn_cxx_try_link "$LINENO"; then :
56306  ac_cv_lib_ICE_IceConnectionNumber=yes
56307else
56308  ac_cv_lib_ICE_IceConnectionNumber=no
56309fi
56310rm -f core conftest.err conftest.$ac_objext \
56311    conftest$ac_exeext conftest.$ac_ext
56312LIBS=$ac_check_lib_save_LIBS
56313fi
56314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56315$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56316if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56317  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56318fi
56319
56320  LDFLAGS=$ac_save_LDFLAGS
56321
56322fi
56323
56324
56325    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56326    # this doesn't make sense so we remove it.
56327    if test "x$COMPILE_TYPE" = xcross; then
56328      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56329    fi
56330
56331    if test "x$no_x" = xyes; then
56332
56333  # Print a helpful message on how to acquire the necessary build dependency.
56334  # x11 is the help tag: freetype, cups, alsa etc
56335  MISSING_DEPENDENCY=x11
56336
56337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56338    cygwin_help $MISSING_DEPENDENCY
56339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56340    msys_help $MISSING_DEPENDENCY
56341  else
56342    PKGHANDLER_COMMAND=
56343
56344    case $PKGHANDLER in
56345      apt-get)
56346        apt_help     $MISSING_DEPENDENCY ;;
56347      yum)
56348        yum_help     $MISSING_DEPENDENCY ;;
56349      port)
56350        port_help    $MISSING_DEPENDENCY ;;
56351      pkgutil)
56352        pkgutil_help $MISSING_DEPENDENCY ;;
56353      pkgadd)
56354        pkgadd_help  $MISSING_DEPENDENCY ;;
56355    esac
56356
56357    if test "x$PKGHANDLER_COMMAND" != x; then
56358      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56359    fi
56360  fi
56361
56362      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56363    fi
56364
56365    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56366      OPENWIN_HOME="/usr/openwin"
56367      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56368      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56369          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56370          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56371          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56372    fi
56373
56374    ac_ext=c
56375ac_cpp='$CPP $CPPFLAGS'
56376ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56377ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56378ac_compiler_gnu=$ac_cv_c_compiler_gnu
56379
56380    OLD_CFLAGS="$CFLAGS"
56381    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56382
56383    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56384    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56385do :
56386  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56387ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56388          # include <X11/Xlib.h>
56389          # include <X11/Xutil.h>
56390
56391
56392"
56393if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56394  cat >>confdefs.h <<_ACEOF
56395#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56396_ACEOF
56397 X11_HEADERS_OK=yes
56398else
56399  X11_HEADERS_OK=no; break
56400fi
56401
56402done
56403
56404
56405    if test "x$X11_HEADERS_OK" = xno; then
56406
56407  # Print a helpful message on how to acquire the necessary build dependency.
56408  # x11 is the help tag: freetype, cups, alsa etc
56409  MISSING_DEPENDENCY=x11
56410
56411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56412    cygwin_help $MISSING_DEPENDENCY
56413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56414    msys_help $MISSING_DEPENDENCY
56415  else
56416    PKGHANDLER_COMMAND=
56417
56418    case $PKGHANDLER in
56419      apt-get)
56420        apt_help     $MISSING_DEPENDENCY ;;
56421      yum)
56422        yum_help     $MISSING_DEPENDENCY ;;
56423      port)
56424        port_help    $MISSING_DEPENDENCY ;;
56425      pkgutil)
56426        pkgutil_help $MISSING_DEPENDENCY ;;
56427      pkgadd)
56428        pkgadd_help  $MISSING_DEPENDENCY ;;
56429    esac
56430
56431    if test "x$PKGHANDLER_COMMAND" != x; then
56432      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56433    fi
56434  fi
56435
56436      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56437    fi
56438
56439    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56440    # defined in libawt_xawt.
56441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56442$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56443    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56444/* end confdefs.h.  */
56445#include <X11/extensions/Xrender.h>
56446int
56447main ()
56448{
56449XLinearGradient x;
56450  ;
56451  return 0;
56452}
56453_ACEOF
56454if ac_fn_c_try_compile "$LINENO"; then :
56455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56456$as_echo "yes" >&6; }
56457else
56458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56459$as_echo "no" >&6; }
56460         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56461fi
56462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56463
56464    CFLAGS="$OLD_CFLAGS"
56465    ac_ext=cpp
56466ac_cpp='$CXXCPP $CPPFLAGS'
56467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56470
56471  fi # NEEDS_LIB_X11
56472
56473
56474
56475
56476
56477
56478# Check whether --with-cups was given.
56479if test "${with_cups+set}" = set; then :
56480  withval=$with_cups;
56481fi
56482
56483
56484# Check whether --with-cups-include was given.
56485if test "${with_cups_include+set}" = set; then :
56486  withval=$with_cups_include;
56487fi
56488
56489
56490  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56491    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56492        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56493      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56494$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56495    fi
56496    CUPS_CFLAGS=
56497  else
56498    CUPS_FOUND=no
56499
56500    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56501      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56502    fi
56503
56504    if test "x${with_cups}" != x; then
56505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56506$as_echo_n "checking for cups headers... " >&6; }
56507      if test -s "${with_cups}/include/cups/cups.h"; then
56508        CUPS_CFLAGS="-I${with_cups}/include"
56509        CUPS_FOUND=yes
56510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56511$as_echo "$CUPS_FOUND" >&6; }
56512      else
56513        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56514      fi
56515    fi
56516    if test "x${with_cups_include}" != x; then
56517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56518$as_echo_n "checking for cups headers... " >&6; }
56519      if test -s "${with_cups_include}/cups/cups.h"; then
56520        CUPS_CFLAGS="-I${with_cups_include}"
56521        CUPS_FOUND=yes
56522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56523$as_echo "$CUPS_FOUND" >&6; }
56524      else
56525        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56526      fi
56527    fi
56528    if test "x$CUPS_FOUND" = xno; then
56529      # Are the cups headers installed in the default /usr/include location?
56530      for ac_header in cups/cups.h cups/ppd.h
56531do :
56532  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56533ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56534if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56535  cat >>confdefs.h <<_ACEOF
56536#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56537_ACEOF
56538
56539          CUPS_FOUND=yes
56540          CUPS_CFLAGS=
56541          DEFAULT_CUPS=yes
56542
56543fi
56544
56545done
56546
56547    fi
56548    if test "x$CUPS_FOUND" = xno; then
56549      # Getting nervous now? Lets poke around for standard Solaris third-party
56550      # package installation locations.
56551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56552$as_echo_n "checking for cups headers... " >&6; }
56553      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56554        # An SFW package seems to be installed!
56555        CUPS_FOUND=yes
56556        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56557      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56558        # A CSW package seems to be installed!
56559        CUPS_FOUND=yes
56560        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56561      fi
56562      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56563$as_echo "$CUPS_FOUND" >&6; }
56564    fi
56565    if test "x$CUPS_FOUND" = xno; then
56566
56567  # Print a helpful message on how to acquire the necessary build dependency.
56568  # cups is the help tag: freetype, cups, alsa etc
56569  MISSING_DEPENDENCY=cups
56570
56571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56572    cygwin_help $MISSING_DEPENDENCY
56573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56574    msys_help $MISSING_DEPENDENCY
56575  else
56576    PKGHANDLER_COMMAND=
56577
56578    case $PKGHANDLER in
56579      apt-get)
56580        apt_help     $MISSING_DEPENDENCY ;;
56581      yum)
56582        yum_help     $MISSING_DEPENDENCY ;;
56583      port)
56584        port_help    $MISSING_DEPENDENCY ;;
56585      pkgutil)
56586        pkgutil_help $MISSING_DEPENDENCY ;;
56587      pkgadd)
56588        pkgadd_help  $MISSING_DEPENDENCY ;;
56589    esac
56590
56591    if test "x$PKGHANDLER_COMMAND" != x; then
56592      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56593    fi
56594  fi
56595
56596      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56597    fi
56598  fi
56599
56600
56601
56602
56603
56604# Check whether --with-freetype was given.
56605if test "${with_freetype+set}" = set; then :
56606  withval=$with_freetype;
56607fi
56608
56609
56610# Check whether --with-freetype-include was given.
56611if test "${with_freetype_include+set}" = set; then :
56612  withval=$with_freetype_include;
56613fi
56614
56615
56616# Check whether --with-freetype-lib was given.
56617if test "${with_freetype_lib+set}" = set; then :
56618  withval=$with_freetype_lib;
56619fi
56620
56621
56622# Check whether --with-freetype-src was given.
56623if test "${with_freetype_src+set}" = set; then :
56624  withval=$with_freetype_src;
56625fi
56626
56627  # Check whether --enable-freetype-bundling was given.
56628if test "${enable_freetype_bundling+set}" = set; then :
56629  enableval=$enable_freetype_bundling;
56630fi
56631
56632
56633  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56634  FREETYPE_BASE_NAME=freetype
56635  FREETYPE_CFLAGS=
56636  FREETYPE_LIBS=
56637  FREETYPE_BUNDLE_LIB_PATH=
56638
56639  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56640    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56641        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56642        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56643        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56645$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56646    fi
56647    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56648      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56649$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56650    fi
56651  else
56652    # freetype is needed to build; go get it!
56653
56654    BUNDLE_FREETYPE="$enable_freetype_bundling"
56655
56656    if  test "x$with_freetype_src" != x; then
56657      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56658        # Try to build freetype if --with-freetype-src was given on Windows
56659
56660  FREETYPE_SRC_PATH="$with_freetype_src"
56661  BUILD_FREETYPE=yes
56662
56663  # Check if the freetype sources are acessible..
56664  if ! test -d $FREETYPE_SRC_PATH; then
56665    { $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
56666$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
56667    BUILD_FREETYPE=no
56668  fi
56669  # ..and contain a vc2010 project file
56670  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
56671  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
56672    { $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
56673$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
56674    BUILD_FREETYPE=no
56675  fi
56676  # Now check if configure found a version of 'msbuild.exe'
56677  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
56678    { $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
56679$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;}
56680    BUILD_FREETYPE=no
56681  fi
56682
56683  # Ready to go..
56684  if test "x$BUILD_FREETYPE" = xyes; then
56685    # msbuild requires trailing slashes for output directories
56686    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
56687    freetype_lib_path_unix="$freetype_lib_path"
56688    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
56689
56690  unix_path="$vcxproj_path"
56691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56692    windows_path=`$CYGPATH -m "$unix_path"`
56693    vcxproj_path="$windows_path"
56694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56695    windows_path=`cmd //c echo $unix_path`
56696    vcxproj_path="$windows_path"
56697  fi
56698
56699
56700  unix_path="$freetype_lib_path"
56701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56702    windows_path=`$CYGPATH -m "$unix_path"`
56703    freetype_lib_path="$windows_path"
56704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56705    windows_path=`cmd //c echo $unix_path`
56706    freetype_lib_path="$windows_path"
56707  fi
56708
56709
56710  unix_path="$freetype_obj_path"
56711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56712    windows_path=`$CYGPATH -m "$unix_path"`
56713    freetype_obj_path="$windows_path"
56714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56715    windows_path=`cmd //c echo $unix_path`
56716    freetype_obj_path="$windows_path"
56717  fi
56718
56719    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56720      freetype_platform=x64
56721    else
56722      freetype_platform=win32
56723    fi
56724
56725    # The original freetype project file is for VS 2010 (i.e. 'v100'),
56726    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
56727    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
56728    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
56729    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
56730$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
56731
56732    # First we try to build the freetype.dll
56733    $ECHO -e "@echo off\n"\
56734        "$MSBUILD $vcxproj_path "\
56735        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56736        "/p:Configuration=\"Release Multithreaded\" "\
56737        "/p:Platform=$freetype_platform "\
56738        "/p:ConfigurationType=DynamicLibrary "\
56739        "/p:TargetName=freetype "\
56740        "/p:OutDir=\"$freetype_lib_path\" "\
56741        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
56742    cmd /c freetype.bat
56743
56744    if test -s "$freetype_lib_path_unix/freetype.dll"; then
56745      # If that succeeds we also build freetype.lib
56746      $ECHO -e "@echo off\n"\
56747          "$MSBUILD $vcxproj_path "\
56748          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
56749          "/p:Configuration=\"Release Multithreaded\" "\
56750          "/p:Platform=$freetype_platform "\
56751          "/p:ConfigurationType=StaticLibrary "\
56752          "/p:TargetName=freetype "\
56753          "/p:OutDir=\"$freetype_lib_path\" "\
56754          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
56755      cmd /c freetype.bat
56756
56757      if test -s "$freetype_lib_path_unix/freetype.lib"; then
56758        # Once we build both, lib and dll, set freetype lib and include path appropriately
56759        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
56760        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
56761        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
56762$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
56763      else
56764        BUILD_FREETYPE=no
56765      fi
56766    else
56767      BUILD_FREETYPE=no
56768    fi
56769  fi
56770
56771        if test "x$BUILD_FREETYPE" = xyes; then
56772          # Okay, we built it. Check that it works.
56773
56774  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56775  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
56776  METHOD="--with-freetype-src"
56777
56778  # Let's start with an optimistic view of the world :-)
56779  FOUND_FREETYPE=yes
56780
56781  # First look for the canonical freetype main include file ft2build.h.
56782  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56783    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
56784    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
56785    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
56786      # Fail.
56787      FOUND_FREETYPE=no
56788    fi
56789  fi
56790
56791  if test "x$FOUND_FREETYPE" = xyes; then
56792    # Include file found, let's continue the sanity check.
56793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
56794$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
56795
56796    # Reset to default value
56797    FREETYPE_BASE_NAME=freetype
56798    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56799    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
56800      if test "x$OPENJDK_TARGET_OS" = xmacosx \
56801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
56802        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
56803        # for the .6 version explicitly.
56804        FREETYPE_BASE_NAME=freetype.6
56805        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
56806        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
56807$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
56808      else
56809        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
56810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
56811        FOUND_FREETYPE=no
56812      fi
56813    else
56814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
56815        # On Windows, we will need both .lib and .dll file.
56816        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
56817          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
56818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
56819          FOUND_FREETYPE=no
56820        fi
56821      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
56822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
56823        # Found lib in isa dir, use that instead.
56824        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
56825        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
56826$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
56827      fi
56828    fi
56829  fi
56830
56831  if test "x$FOUND_FREETYPE" = xyes; then
56832
56833  # Only process if variable expands to non-empty
56834
56835  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
56836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56837
56838  # Input might be given as Windows format, start by converting to
56839  # unix format.
56840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56841  new_path=`$CYGPATH -u "$path"`
56842
56843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56846  # "foo.exe" is OK but "foo" is an error.
56847  #
56848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56849  # It is also a way to make sure we got the proper file name for the real test later on.
56850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56851  if test "x$test_shortpath" = x; then
56852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
56855  fi
56856
56857  # Call helper function which possibly converts this using DOS-style short mode.
56858  # If so, the updated path is stored in $new_path.
56859
56860  input_path="$new_path"
56861  # Check if we need to convert this using DOS-style short mode. If the path
56862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56863  # take no chances and rewrite it.
56864  # Note: m4 eats our [], so we need to use [ and ] instead.
56865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56866  if test "x$has_forbidden_chars" != x; then
56867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56871      # Going to short mode and back again did indeed matter. Since short mode is
56872      # case insensitive, let's make it lowercase to improve readability.
56873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56874      # Now convert it back to Unix-style (cygpath)
56875      input_path=`$CYGPATH -u "$shortmode_path"`
56876      new_path="$input_path"
56877    fi
56878  fi
56879
56880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56881  if test "x$test_cygdrive_prefix" = x; then
56882    # As a simple fix, exclude /usr/bin since it's not a real path.
56883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56885      # a path prefixed by /cygdrive for fixpath to work.
56886      new_path="$CYGWIN_ROOT_PATH$input_path"
56887    fi
56888  fi
56889
56890
56891  if test "x$path" != "x$new_path"; then
56892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56895  fi
56896
56897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56898
56899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56900  has_colon=`$ECHO $path | $GREP ^.:`
56901  new_path="$path"
56902  if test "x$has_colon" = x; then
56903    # Not in mixed or Windows style, start by that.
56904    new_path=`cmd //c echo $path`
56905  fi
56906
56907
56908  input_path="$new_path"
56909  # Check if we need to convert this using DOS-style short mode. If the path
56910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56911  # take no chances and rewrite it.
56912  # Note: m4 eats our [], so we need to use [ and ] instead.
56913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56914  if test "x$has_forbidden_chars" != x; then
56915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56917  fi
56918
56919
56920  windows_path="$new_path"
56921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56922    unix_path=`$CYGPATH -u "$windows_path"`
56923    new_path="$unix_path"
56924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56926    new_path="$unix_path"
56927  fi
56928
56929  if test "x$path" != "x$new_path"; then
56930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
56931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
56932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
56933  fi
56934
56935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56937
56938    else
56939      # We're on a unix platform. Hooray! :)
56940      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
56941      has_space=`$ECHO "$path" | $GREP " "`
56942      if test "x$has_space" != x; then
56943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
56944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
56945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56946      fi
56947
56948      # Use eval to expand a potential ~
56949      eval path="$path"
56950      if test ! -f "$path" && test ! -d "$path"; then
56951        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
56952      fi
56953
56954      if test -d "$path"; then
56955        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
56956      else
56957        dir="`$DIRNAME "$path"`"
56958        base="`$BASENAME "$path"`"
56959        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
56960      fi
56961    fi
56962  fi
56963
56964
56965  # Only process if variable expands to non-empty
56966
56967  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
56968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56969
56970  # Input might be given as Windows format, start by converting to
56971  # unix format.
56972  path="$POTENTIAL_FREETYPE_LIB_PATH"
56973  new_path=`$CYGPATH -u "$path"`
56974
56975  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56976  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56977  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56978  # "foo.exe" is OK but "foo" is an error.
56979  #
56980  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56981  # It is also a way to make sure we got the proper file name for the real test later on.
56982  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56983  if test "x$test_shortpath" = x; then
56984    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
56985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
56986    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
56987  fi
56988
56989  # Call helper function which possibly converts this using DOS-style short mode.
56990  # If so, the updated path is stored in $new_path.
56991
56992  input_path="$new_path"
56993  # Check if we need to convert this using DOS-style short mode. If the path
56994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56995  # take no chances and rewrite it.
56996  # Note: m4 eats our [], so we need to use [ and ] instead.
56997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56998  if test "x$has_forbidden_chars" != x; then
56999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57000    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57001    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57002    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57003      # Going to short mode and back again did indeed matter. Since short mode is
57004      # case insensitive, let's make it lowercase to improve readability.
57005      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57006      # Now convert it back to Unix-style (cygpath)
57007      input_path=`$CYGPATH -u "$shortmode_path"`
57008      new_path="$input_path"
57009    fi
57010  fi
57011
57012  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57013  if test "x$test_cygdrive_prefix" = x; then
57014    # As a simple fix, exclude /usr/bin since it's not a real path.
57015    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57016      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57017      # a path prefixed by /cygdrive for fixpath to work.
57018      new_path="$CYGWIN_ROOT_PATH$input_path"
57019    fi
57020  fi
57021
57022
57023  if test "x$path" != "x$new_path"; then
57024    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57025    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57026$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57027  fi
57028
57029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57030
57031  path="$POTENTIAL_FREETYPE_LIB_PATH"
57032  has_colon=`$ECHO $path | $GREP ^.:`
57033  new_path="$path"
57034  if test "x$has_colon" = x; then
57035    # Not in mixed or Windows style, start by that.
57036    new_path=`cmd //c echo $path`
57037  fi
57038
57039
57040  input_path="$new_path"
57041  # Check if we need to convert this using DOS-style short mode. If the path
57042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57043  # take no chances and rewrite it.
57044  # Note: m4 eats our [], so we need to use [ and ] instead.
57045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57046  if test "x$has_forbidden_chars" != x; then
57047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57048    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57049  fi
57050
57051
57052  windows_path="$new_path"
57053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57054    unix_path=`$CYGPATH -u "$windows_path"`
57055    new_path="$unix_path"
57056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57058    new_path="$unix_path"
57059  fi
57060
57061  if test "x$path" != "x$new_path"; then
57062    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57063    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57064$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57065  fi
57066
57067  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57068  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57069
57070    else
57071      # We're on a unix platform. Hooray! :)
57072      path="$POTENTIAL_FREETYPE_LIB_PATH"
57073      has_space=`$ECHO "$path" | $GREP " "`
57074      if test "x$has_space" != x; then
57075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57076$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57077        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57078      fi
57079
57080      # Use eval to expand a potential ~
57081      eval path="$path"
57082      if test ! -f "$path" && test ! -d "$path"; then
57083        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57084      fi
57085
57086      if test -d "$path"; then
57087        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57088      else
57089        dir="`$DIRNAME "$path"`"
57090        base="`$BASENAME "$path"`"
57091        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57092      fi
57093    fi
57094  fi
57095
57096
57097    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57099$as_echo_n "checking for freetype includes... " >&6; }
57100    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57101$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57102    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57104$as_echo_n "checking for freetype libraries... " >&6; }
57105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57106$as_echo "$FREETYPE_LIB_PATH" >&6; }
57107  fi
57108
57109          if test "x$FOUND_FREETYPE" != xyes; then
57110            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57111          fi
57112        else
57113          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57114$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57115          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57116        fi
57117      else
57118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57119$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57120      fi
57121    fi
57122
57123    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57124      # User has specified settings
57125
57126      if test "x$BUNDLE_FREETYPE" = x; then
57127        # If not specified, default is to bundle freetype
57128        BUNDLE_FREETYPE=yes
57129      fi
57130
57131      if test "x$with_freetype" != x; then
57132        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57133        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57134      fi
57135
57136      # Allow --with-freetype-lib and --with-freetype-include to override
57137      if test "x$with_freetype_include" != x; then
57138        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57139      fi
57140      if test "x$with_freetype_lib" != x; then
57141        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57142      fi
57143
57144      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57145        # Okay, we got it. Check that it works.
57146
57147  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57148  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57149  METHOD="--with-freetype"
57150
57151  # Let's start with an optimistic view of the world :-)
57152  FOUND_FREETYPE=yes
57153
57154  # First look for the canonical freetype main include file ft2build.h.
57155  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57156    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57157    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57158    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57159      # Fail.
57160      FOUND_FREETYPE=no
57161    fi
57162  fi
57163
57164  if test "x$FOUND_FREETYPE" = xyes; then
57165    # Include file found, let's continue the sanity check.
57166    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57167$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57168
57169    # Reset to default value
57170    FREETYPE_BASE_NAME=freetype
57171    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57172    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57173      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57174          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57175        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57176        # for the .6 version explicitly.
57177        FREETYPE_BASE_NAME=freetype.6
57178        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57179        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57180$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57181      else
57182        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57183$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57184        FOUND_FREETYPE=no
57185      fi
57186    else
57187      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57188        # On Windows, we will need both .lib and .dll file.
57189        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57190          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57192          FOUND_FREETYPE=no
57193        fi
57194      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57195          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57196        # Found lib in isa dir, use that instead.
57197        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57198        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57199$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57200      fi
57201    fi
57202  fi
57203
57204  if test "x$FOUND_FREETYPE" = xyes; then
57205
57206  # Only process if variable expands to non-empty
57207
57208  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57210
57211  # Input might be given as Windows format, start by converting to
57212  # unix format.
57213  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57214  new_path=`$CYGPATH -u "$path"`
57215
57216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57219  # "foo.exe" is OK but "foo" is an error.
57220  #
57221  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57222  # It is also a way to make sure we got the proper file name for the real test later on.
57223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57224  if test "x$test_shortpath" = x; then
57225    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57227    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57228  fi
57229
57230  # Call helper function which possibly converts this using DOS-style short mode.
57231  # If so, the updated path is stored in $new_path.
57232
57233  input_path="$new_path"
57234  # Check if we need to convert this using DOS-style short mode. If the path
57235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57236  # take no chances and rewrite it.
57237  # Note: m4 eats our [], so we need to use [ and ] instead.
57238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57239  if test "x$has_forbidden_chars" != x; then
57240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57241    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57242    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57243    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57244      # Going to short mode and back again did indeed matter. Since short mode is
57245      # case insensitive, let's make it lowercase to improve readability.
57246      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57247      # Now convert it back to Unix-style (cygpath)
57248      input_path=`$CYGPATH -u "$shortmode_path"`
57249      new_path="$input_path"
57250    fi
57251  fi
57252
57253  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57254  if test "x$test_cygdrive_prefix" = x; then
57255    # As a simple fix, exclude /usr/bin since it's not a real path.
57256    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57257      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57258      # a path prefixed by /cygdrive for fixpath to work.
57259      new_path="$CYGWIN_ROOT_PATH$input_path"
57260    fi
57261  fi
57262
57263
57264  if test "x$path" != "x$new_path"; then
57265    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57267$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57268  fi
57269
57270    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57271
57272  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57273  has_colon=`$ECHO $path | $GREP ^.:`
57274  new_path="$path"
57275  if test "x$has_colon" = x; then
57276    # Not in mixed or Windows style, start by that.
57277    new_path=`cmd //c echo $path`
57278  fi
57279
57280
57281  input_path="$new_path"
57282  # Check if we need to convert this using DOS-style short mode. If the path
57283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57284  # take no chances and rewrite it.
57285  # Note: m4 eats our [], so we need to use [ and ] instead.
57286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57287  if test "x$has_forbidden_chars" != x; then
57288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57289    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57290  fi
57291
57292
57293  windows_path="$new_path"
57294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57295    unix_path=`$CYGPATH -u "$windows_path"`
57296    new_path="$unix_path"
57297  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57298    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57299    new_path="$unix_path"
57300  fi
57301
57302  if test "x$path" != "x$new_path"; then
57303    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57305$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57306  fi
57307
57308  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57309  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57310
57311    else
57312      # We're on a unix platform. Hooray! :)
57313      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57314      has_space=`$ECHO "$path" | $GREP " "`
57315      if test "x$has_space" != x; then
57316        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57317$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57318        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57319      fi
57320
57321      # Use eval to expand a potential ~
57322      eval path="$path"
57323      if test ! -f "$path" && test ! -d "$path"; then
57324        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57325      fi
57326
57327      if test -d "$path"; then
57328        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57329      else
57330        dir="`$DIRNAME "$path"`"
57331        base="`$BASENAME "$path"`"
57332        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57333      fi
57334    fi
57335  fi
57336
57337
57338  # Only process if variable expands to non-empty
57339
57340  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57342
57343  # Input might be given as Windows format, start by converting to
57344  # unix format.
57345  path="$POTENTIAL_FREETYPE_LIB_PATH"
57346  new_path=`$CYGPATH -u "$path"`
57347
57348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57351  # "foo.exe" is OK but "foo" is an error.
57352  #
57353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57354  # It is also a way to make sure we got the proper file name for the real test later on.
57355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57356  if test "x$test_shortpath" = x; then
57357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57358$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57359    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57360  fi
57361
57362  # Call helper function which possibly converts this using DOS-style short mode.
57363  # If so, the updated path is stored in $new_path.
57364
57365  input_path="$new_path"
57366  # Check if we need to convert this using DOS-style short mode. If the path
57367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57368  # take no chances and rewrite it.
57369  # Note: m4 eats our [], so we need to use [ and ] instead.
57370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57371  if test "x$has_forbidden_chars" != x; then
57372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57376      # Going to short mode and back again did indeed matter. Since short mode is
57377      # case insensitive, let's make it lowercase to improve readability.
57378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57379      # Now convert it back to Unix-style (cygpath)
57380      input_path=`$CYGPATH -u "$shortmode_path"`
57381      new_path="$input_path"
57382    fi
57383  fi
57384
57385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57386  if test "x$test_cygdrive_prefix" = x; then
57387    # As a simple fix, exclude /usr/bin since it's not a real path.
57388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57390      # a path prefixed by /cygdrive for fixpath to work.
57391      new_path="$CYGWIN_ROOT_PATH$input_path"
57392    fi
57393  fi
57394
57395
57396  if test "x$path" != "x$new_path"; then
57397    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57400  fi
57401
57402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57403
57404  path="$POTENTIAL_FREETYPE_LIB_PATH"
57405  has_colon=`$ECHO $path | $GREP ^.:`
57406  new_path="$path"
57407  if test "x$has_colon" = x; then
57408    # Not in mixed or Windows style, start by that.
57409    new_path=`cmd //c echo $path`
57410  fi
57411
57412
57413  input_path="$new_path"
57414  # Check if we need to convert this using DOS-style short mode. If the path
57415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57416  # take no chances and rewrite it.
57417  # Note: m4 eats our [], so we need to use [ and ] instead.
57418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57419  if test "x$has_forbidden_chars" != x; then
57420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57422  fi
57423
57424
57425  windows_path="$new_path"
57426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57427    unix_path=`$CYGPATH -u "$windows_path"`
57428    new_path="$unix_path"
57429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57431    new_path="$unix_path"
57432  fi
57433
57434  if test "x$path" != "x$new_path"; then
57435    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57437$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57438  fi
57439
57440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57442
57443    else
57444      # We're on a unix platform. Hooray! :)
57445      path="$POTENTIAL_FREETYPE_LIB_PATH"
57446      has_space=`$ECHO "$path" | $GREP " "`
57447      if test "x$has_space" != x; then
57448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57449$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57451      fi
57452
57453      # Use eval to expand a potential ~
57454      eval path="$path"
57455      if test ! -f "$path" && test ! -d "$path"; then
57456        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57457      fi
57458
57459      if test -d "$path"; then
57460        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57461      else
57462        dir="`$DIRNAME "$path"`"
57463        base="`$BASENAME "$path"`"
57464        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57465      fi
57466    fi
57467  fi
57468
57469
57470    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57472$as_echo_n "checking for freetype includes... " >&6; }
57473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57474$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57475    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57477$as_echo_n "checking for freetype libraries... " >&6; }
57478    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57479$as_echo "$FREETYPE_LIB_PATH" >&6; }
57480  fi
57481
57482        if test "x$FOUND_FREETYPE" != xyes; then
57483          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57484        fi
57485      else
57486        # User specified only one of lib or include. This is an error.
57487        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57488          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57489$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57490          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57491        else
57492          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57493$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57494          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57495        fi
57496      fi
57497    else
57498      # User did not specify settings, but we need freetype. Try to locate it.
57499
57500      if test "x$BUNDLE_FREETYPE" = x; then
57501        # If not specified, default is to bundle freetype only on windows
57502        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57503          BUNDLE_FREETYPE=yes
57504        else
57505          BUNDLE_FREETYPE=no
57506        fi
57507      fi
57508
57509      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57510      if test "x$SYSROOT" = x; then
57511        if test "x$FOUND_FREETYPE" != xyes; then
57512          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57513          if test "x$PKG_CONFIG" != x; then
57514
57515pkg_failed=no
57516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57517$as_echo_n "checking for FREETYPE... " >&6; }
57518
57519if test -n "$FREETYPE_CFLAGS"; then
57520    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57521 elif test -n "$PKG_CONFIG"; then
57522    if test -n "$PKG_CONFIG" && \
57523    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57524  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57525  ac_status=$?
57526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57527  test $ac_status = 0; }; then
57528  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57529else
57530  pkg_failed=yes
57531fi
57532 else
57533    pkg_failed=untried
57534fi
57535if test -n "$FREETYPE_LIBS"; then
57536    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57537 elif test -n "$PKG_CONFIG"; then
57538    if test -n "$PKG_CONFIG" && \
57539    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57540  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57541  ac_status=$?
57542  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57543  test $ac_status = 0; }; then
57544  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57545else
57546  pkg_failed=yes
57547fi
57548 else
57549    pkg_failed=untried
57550fi
57551
57552
57553
57554if test $pkg_failed = yes; then
57555
57556if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57557        _pkg_short_errors_supported=yes
57558else
57559        _pkg_short_errors_supported=no
57560fi
57561        if test $_pkg_short_errors_supported = yes; then
57562	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57563        else
57564	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57565        fi
57566	# Put the nasty error message in config.log where it belongs
57567	echo "$FREETYPE_PKG_ERRORS" >&5
57568
57569	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57570$as_echo "no" >&6; }
57571                FOUND_FREETYPE=no
57572elif test $pkg_failed = untried; then
57573	FOUND_FREETYPE=no
57574else
57575	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57576	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57577        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57578$as_echo "yes" >&6; }
57579	FOUND_FREETYPE=yes
57580fi
57581            if test "x$FOUND_FREETYPE" = xyes; then
57582              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57583              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57584              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57585              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57586                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57587              fi
57588              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57589              if test "x$BUNDLE_FREETYPE" = xyes; then
57590                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57591$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57592                FOUND_FREETYPE=no
57593              else
57594                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57595$as_echo_n "checking for freetype... " >&6; }
57596                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57597$as_echo "yes (using pkg-config)" >&6; }
57598              fi
57599            fi
57600          fi
57601        fi
57602      fi
57603
57604      if test "x$FOUND_FREETYPE" != xyes; then
57605        # Check in well-known locations
57606        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57607          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57608
57609  windows_path="$FREETYPE_BASE_DIR"
57610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57611    unix_path=`$CYGPATH -u "$windows_path"`
57612    FREETYPE_BASE_DIR="$unix_path"
57613  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57614    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57615    FREETYPE_BASE_DIR="$unix_path"
57616  fi
57617
57618
57619  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57620  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57621  METHOD="well-known location"
57622
57623  # Let's start with an optimistic view of the world :-)
57624  FOUND_FREETYPE=yes
57625
57626  # First look for the canonical freetype main include file ft2build.h.
57627  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57628    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57629    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57630    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57631      # Fail.
57632      FOUND_FREETYPE=no
57633    fi
57634  fi
57635
57636  if test "x$FOUND_FREETYPE" = xyes; then
57637    # Include file found, let's continue the sanity check.
57638    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57639$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57640
57641    # Reset to default value
57642    FREETYPE_BASE_NAME=freetype
57643    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57644    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57645      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57647        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57648        # for the .6 version explicitly.
57649        FREETYPE_BASE_NAME=freetype.6
57650        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57651        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57652$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57653      else
57654        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57655$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57656        FOUND_FREETYPE=no
57657      fi
57658    else
57659      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57660        # On Windows, we will need both .lib and .dll file.
57661        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57662          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57663$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57664          FOUND_FREETYPE=no
57665        fi
57666      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57668        # Found lib in isa dir, use that instead.
57669        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57670        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57671$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57672      fi
57673    fi
57674  fi
57675
57676  if test "x$FOUND_FREETYPE" = xyes; then
57677
57678  # Only process if variable expands to non-empty
57679
57680  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57681    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57682
57683  # Input might be given as Windows format, start by converting to
57684  # unix format.
57685  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57686  new_path=`$CYGPATH -u "$path"`
57687
57688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57691  # "foo.exe" is OK but "foo" is an error.
57692  #
57693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57694  # It is also a way to make sure we got the proper file name for the real test later on.
57695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57696  if test "x$test_shortpath" = x; then
57697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57698$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57699    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57700  fi
57701
57702  # Call helper function which possibly converts this using DOS-style short mode.
57703  # If so, the updated path is stored in $new_path.
57704
57705  input_path="$new_path"
57706  # Check if we need to convert this using DOS-style short mode. If the path
57707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57708  # take no chances and rewrite it.
57709  # Note: m4 eats our [], so we need to use [ and ] instead.
57710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57711  if test "x$has_forbidden_chars" != x; then
57712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57716      # Going to short mode and back again did indeed matter. Since short mode is
57717      # case insensitive, let's make it lowercase to improve readability.
57718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57719      # Now convert it back to Unix-style (cygpath)
57720      input_path=`$CYGPATH -u "$shortmode_path"`
57721      new_path="$input_path"
57722    fi
57723  fi
57724
57725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57726  if test "x$test_cygdrive_prefix" = x; then
57727    # As a simple fix, exclude /usr/bin since it's not a real path.
57728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57730      # a path prefixed by /cygdrive for fixpath to work.
57731      new_path="$CYGWIN_ROOT_PATH$input_path"
57732    fi
57733  fi
57734
57735
57736  if test "x$path" != "x$new_path"; then
57737    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57740  fi
57741
57742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57743
57744  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57745  has_colon=`$ECHO $path | $GREP ^.:`
57746  new_path="$path"
57747  if test "x$has_colon" = x; then
57748    # Not in mixed or Windows style, start by that.
57749    new_path=`cmd //c echo $path`
57750  fi
57751
57752
57753  input_path="$new_path"
57754  # Check if we need to convert this using DOS-style short mode. If the path
57755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57756  # take no chances and rewrite it.
57757  # Note: m4 eats our [], so we need to use [ and ] instead.
57758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57759  if test "x$has_forbidden_chars" != x; then
57760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57762  fi
57763
57764
57765  windows_path="$new_path"
57766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57767    unix_path=`$CYGPATH -u "$windows_path"`
57768    new_path="$unix_path"
57769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57771    new_path="$unix_path"
57772  fi
57773
57774  if test "x$path" != "x$new_path"; then
57775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57778  fi
57779
57780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57782
57783    else
57784      # We're on a unix platform. Hooray! :)
57785      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57786      has_space=`$ECHO "$path" | $GREP " "`
57787      if test "x$has_space" != x; then
57788        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57789$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57790        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57791      fi
57792
57793      # Use eval to expand a potential ~
57794      eval path="$path"
57795      if test ! -f "$path" && test ! -d "$path"; then
57796        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57797      fi
57798
57799      if test -d "$path"; then
57800        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57801      else
57802        dir="`$DIRNAME "$path"`"
57803        base="`$BASENAME "$path"`"
57804        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57805      fi
57806    fi
57807  fi
57808
57809
57810  # Only process if variable expands to non-empty
57811
57812  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57813    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57814
57815  # Input might be given as Windows format, start by converting to
57816  # unix format.
57817  path="$POTENTIAL_FREETYPE_LIB_PATH"
57818  new_path=`$CYGPATH -u "$path"`
57819
57820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57823  # "foo.exe" is OK but "foo" is an error.
57824  #
57825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57826  # It is also a way to make sure we got the proper file name for the real test later on.
57827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57828  if test "x$test_shortpath" = x; then
57829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57830$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57831    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57832  fi
57833
57834  # Call helper function which possibly converts this using DOS-style short mode.
57835  # If so, the updated path is stored in $new_path.
57836
57837  input_path="$new_path"
57838  # Check if we need to convert this using DOS-style short mode. If the path
57839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57840  # take no chances and rewrite it.
57841  # Note: m4 eats our [], so we need to use [ and ] instead.
57842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57843  if test "x$has_forbidden_chars" != x; then
57844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57848      # Going to short mode and back again did indeed matter. Since short mode is
57849      # case insensitive, let's make it lowercase to improve readability.
57850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57851      # Now convert it back to Unix-style (cygpath)
57852      input_path=`$CYGPATH -u "$shortmode_path"`
57853      new_path="$input_path"
57854    fi
57855  fi
57856
57857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57858  if test "x$test_cygdrive_prefix" = x; then
57859    # As a simple fix, exclude /usr/bin since it's not a real path.
57860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57862      # a path prefixed by /cygdrive for fixpath to work.
57863      new_path="$CYGWIN_ROOT_PATH$input_path"
57864    fi
57865  fi
57866
57867
57868  if test "x$path" != "x$new_path"; then
57869    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57871$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57872  fi
57873
57874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57875
57876  path="$POTENTIAL_FREETYPE_LIB_PATH"
57877  has_colon=`$ECHO $path | $GREP ^.:`
57878  new_path="$path"
57879  if test "x$has_colon" = x; then
57880    # Not in mixed or Windows style, start by that.
57881    new_path=`cmd //c echo $path`
57882  fi
57883
57884
57885  input_path="$new_path"
57886  # Check if we need to convert this using DOS-style short mode. If the path
57887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57888  # take no chances and rewrite it.
57889  # Note: m4 eats our [], so we need to use [ and ] instead.
57890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57891  if test "x$has_forbidden_chars" != x; then
57892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57894  fi
57895
57896
57897  windows_path="$new_path"
57898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57899    unix_path=`$CYGPATH -u "$windows_path"`
57900    new_path="$unix_path"
57901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57903    new_path="$unix_path"
57904  fi
57905
57906  if test "x$path" != "x$new_path"; then
57907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57910  fi
57911
57912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57914
57915    else
57916      # We're on a unix platform. Hooray! :)
57917      path="$POTENTIAL_FREETYPE_LIB_PATH"
57918      has_space=`$ECHO "$path" | $GREP " "`
57919      if test "x$has_space" != x; then
57920        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57921$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57922        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57923      fi
57924
57925      # Use eval to expand a potential ~
57926      eval path="$path"
57927      if test ! -f "$path" && test ! -d "$path"; then
57928        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57929      fi
57930
57931      if test -d "$path"; then
57932        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57933      else
57934        dir="`$DIRNAME "$path"`"
57935        base="`$BASENAME "$path"`"
57936        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57937      fi
57938    fi
57939  fi
57940
57941
57942    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57944$as_echo_n "checking for freetype includes... " >&6; }
57945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57946$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57947    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57948    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57949$as_echo_n "checking for freetype libraries... " >&6; }
57950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57951$as_echo "$FREETYPE_LIB_PATH" >&6; }
57952  fi
57953
57954          if test "x$FOUND_FREETYPE" != xyes; then
57955            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
57956
57957  windows_path="$FREETYPE_BASE_DIR"
57958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57959    unix_path=`$CYGPATH -u "$windows_path"`
57960    FREETYPE_BASE_DIR="$unix_path"
57961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57963    FREETYPE_BASE_DIR="$unix_path"
57964  fi
57965
57966
57967  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57968  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57969  METHOD="well-known location"
57970
57971  # Let's start with an optimistic view of the world :-)
57972  FOUND_FREETYPE=yes
57973
57974  # First look for the canonical freetype main include file ft2build.h.
57975  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57976    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57977    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57978    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57979      # Fail.
57980      FOUND_FREETYPE=no
57981    fi
57982  fi
57983
57984  if test "x$FOUND_FREETYPE" = xyes; then
57985    # Include file found, let's continue the sanity check.
57986    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57987$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57988
57989    # Reset to default value
57990    FREETYPE_BASE_NAME=freetype
57991    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57992    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57993      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57994          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57995        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57996        # for the .6 version explicitly.
57997        FREETYPE_BASE_NAME=freetype.6
57998        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57999        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58000$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58001      else
58002        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58003$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58004        FOUND_FREETYPE=no
58005      fi
58006    else
58007      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58008        # On Windows, we will need both .lib and .dll file.
58009        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58010          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58011$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58012          FOUND_FREETYPE=no
58013        fi
58014      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58015          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58016        # Found lib in isa dir, use that instead.
58017        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58018        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58019$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58020      fi
58021    fi
58022  fi
58023
58024  if test "x$FOUND_FREETYPE" = xyes; then
58025
58026  # Only process if variable expands to non-empty
58027
58028  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58029    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58030
58031  # Input might be given as Windows format, start by converting to
58032  # unix format.
58033  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58034  new_path=`$CYGPATH -u "$path"`
58035
58036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58039  # "foo.exe" is OK but "foo" is an error.
58040  #
58041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58042  # It is also a way to make sure we got the proper file name for the real test later on.
58043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58044  if test "x$test_shortpath" = x; then
58045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58047    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58048  fi
58049
58050  # Call helper function which possibly converts this using DOS-style short mode.
58051  # If so, the updated path is stored in $new_path.
58052
58053  input_path="$new_path"
58054  # Check if we need to convert this using DOS-style short mode. If the path
58055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58056  # take no chances and rewrite it.
58057  # Note: m4 eats our [], so we need to use [ and ] instead.
58058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58059  if test "x$has_forbidden_chars" != x; then
58060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58064      # Going to short mode and back again did indeed matter. Since short mode is
58065      # case insensitive, let's make it lowercase to improve readability.
58066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58067      # Now convert it back to Unix-style (cygpath)
58068      input_path=`$CYGPATH -u "$shortmode_path"`
58069      new_path="$input_path"
58070    fi
58071  fi
58072
58073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58074  if test "x$test_cygdrive_prefix" = x; then
58075    # As a simple fix, exclude /usr/bin since it's not a real path.
58076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58078      # a path prefixed by /cygdrive for fixpath to work.
58079      new_path="$CYGWIN_ROOT_PATH$input_path"
58080    fi
58081  fi
58082
58083
58084  if test "x$path" != "x$new_path"; then
58085    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58088  fi
58089
58090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58091
58092  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58093  has_colon=`$ECHO $path | $GREP ^.:`
58094  new_path="$path"
58095  if test "x$has_colon" = x; then
58096    # Not in mixed or Windows style, start by that.
58097    new_path=`cmd //c echo $path`
58098  fi
58099
58100
58101  input_path="$new_path"
58102  # Check if we need to convert this using DOS-style short mode. If the path
58103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58104  # take no chances and rewrite it.
58105  # Note: m4 eats our [], so we need to use [ and ] instead.
58106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58107  if test "x$has_forbidden_chars" != x; then
58108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58110  fi
58111
58112
58113  windows_path="$new_path"
58114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58115    unix_path=`$CYGPATH -u "$windows_path"`
58116    new_path="$unix_path"
58117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58119    new_path="$unix_path"
58120  fi
58121
58122  if test "x$path" != "x$new_path"; then
58123    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58126  fi
58127
58128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58130
58131    else
58132      # We're on a unix platform. Hooray! :)
58133      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58134      has_space=`$ECHO "$path" | $GREP " "`
58135      if test "x$has_space" != x; then
58136        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58138        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58139      fi
58140
58141      # Use eval to expand a potential ~
58142      eval path="$path"
58143      if test ! -f "$path" && test ! -d "$path"; then
58144        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58145      fi
58146
58147      if test -d "$path"; then
58148        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58149      else
58150        dir="`$DIRNAME "$path"`"
58151        base="`$BASENAME "$path"`"
58152        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58153      fi
58154    fi
58155  fi
58156
58157
58158  # Only process if variable expands to non-empty
58159
58160  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58162
58163  # Input might be given as Windows format, start by converting to
58164  # unix format.
58165  path="$POTENTIAL_FREETYPE_LIB_PATH"
58166  new_path=`$CYGPATH -u "$path"`
58167
58168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58171  # "foo.exe" is OK but "foo" is an error.
58172  #
58173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58174  # It is also a way to make sure we got the proper file name for the real test later on.
58175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58176  if test "x$test_shortpath" = x; then
58177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58178$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58179    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58180  fi
58181
58182  # Call helper function which possibly converts this using DOS-style short mode.
58183  # If so, the updated path is stored in $new_path.
58184
58185  input_path="$new_path"
58186  # Check if we need to convert this using DOS-style short mode. If the path
58187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58188  # take no chances and rewrite it.
58189  # Note: m4 eats our [], so we need to use [ and ] instead.
58190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58191  if test "x$has_forbidden_chars" != x; then
58192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58196      # Going to short mode and back again did indeed matter. Since short mode is
58197      # case insensitive, let's make it lowercase to improve readability.
58198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58199      # Now convert it back to Unix-style (cygpath)
58200      input_path=`$CYGPATH -u "$shortmode_path"`
58201      new_path="$input_path"
58202    fi
58203  fi
58204
58205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58206  if test "x$test_cygdrive_prefix" = x; then
58207    # As a simple fix, exclude /usr/bin since it's not a real path.
58208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58210      # a path prefixed by /cygdrive for fixpath to work.
58211      new_path="$CYGWIN_ROOT_PATH$input_path"
58212    fi
58213  fi
58214
58215
58216  if test "x$path" != "x$new_path"; then
58217    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58219$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58220  fi
58221
58222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58223
58224  path="$POTENTIAL_FREETYPE_LIB_PATH"
58225  has_colon=`$ECHO $path | $GREP ^.:`
58226  new_path="$path"
58227  if test "x$has_colon" = x; then
58228    # Not in mixed or Windows style, start by that.
58229    new_path=`cmd //c echo $path`
58230  fi
58231
58232
58233  input_path="$new_path"
58234  # Check if we need to convert this using DOS-style short mode. If the path
58235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58236  # take no chances and rewrite it.
58237  # Note: m4 eats our [], so we need to use [ and ] instead.
58238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58239  if test "x$has_forbidden_chars" != x; then
58240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58242  fi
58243
58244
58245  windows_path="$new_path"
58246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58247    unix_path=`$CYGPATH -u "$windows_path"`
58248    new_path="$unix_path"
58249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58251    new_path="$unix_path"
58252  fi
58253
58254  if test "x$path" != "x$new_path"; then
58255    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58257$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58258  fi
58259
58260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58262
58263    else
58264      # We're on a unix platform. Hooray! :)
58265      path="$POTENTIAL_FREETYPE_LIB_PATH"
58266      has_space=`$ECHO "$path" | $GREP " "`
58267      if test "x$has_space" != x; then
58268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58269$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58271      fi
58272
58273      # Use eval to expand a potential ~
58274      eval path="$path"
58275      if test ! -f "$path" && test ! -d "$path"; then
58276        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58277      fi
58278
58279      if test -d "$path"; then
58280        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58281      else
58282        dir="`$DIRNAME "$path"`"
58283        base="`$BASENAME "$path"`"
58284        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58285      fi
58286    fi
58287  fi
58288
58289
58290    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58291    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58292$as_echo_n "checking for freetype includes... " >&6; }
58293    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58294$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58295    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58297$as_echo_n "checking for freetype libraries... " >&6; }
58298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58299$as_echo "$FREETYPE_LIB_PATH" >&6; }
58300  fi
58301
58302          fi
58303          if test "x$FOUND_FREETYPE" != xyes; then
58304            FREETYPE_BASE_DIR="$HOME/freetype"
58305
58306  windows_path="$FREETYPE_BASE_DIR"
58307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58308    unix_path=`$CYGPATH -u "$windows_path"`
58309    FREETYPE_BASE_DIR="$unix_path"
58310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58312    FREETYPE_BASE_DIR="$unix_path"
58313  fi
58314
58315            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58316
58317  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58318  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58319  METHOD="well-known location"
58320
58321  # Let's start with an optimistic view of the world :-)
58322  FOUND_FREETYPE=yes
58323
58324  # First look for the canonical freetype main include file ft2build.h.
58325  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58326    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58327    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58328    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58329      # Fail.
58330      FOUND_FREETYPE=no
58331    fi
58332  fi
58333
58334  if test "x$FOUND_FREETYPE" = xyes; then
58335    # Include file found, let's continue the sanity check.
58336    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58337$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58338
58339    # Reset to default value
58340    FREETYPE_BASE_NAME=freetype
58341    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58342    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58343      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58344          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58345        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58346        # for the .6 version explicitly.
58347        FREETYPE_BASE_NAME=freetype.6
58348        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58349        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58350$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58351      else
58352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58353$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58354        FOUND_FREETYPE=no
58355      fi
58356    else
58357      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58358        # On Windows, we will need both .lib and .dll file.
58359        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58360          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58361$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58362          FOUND_FREETYPE=no
58363        fi
58364      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58365          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58366        # Found lib in isa dir, use that instead.
58367        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58368        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58369$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58370      fi
58371    fi
58372  fi
58373
58374  if test "x$FOUND_FREETYPE" = xyes; then
58375
58376  # Only process if variable expands to non-empty
58377
58378  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58379    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58380
58381  # Input might be given as Windows format, start by converting to
58382  # unix format.
58383  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58384  new_path=`$CYGPATH -u "$path"`
58385
58386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58389  # "foo.exe" is OK but "foo" is an error.
58390  #
58391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58392  # It is also a way to make sure we got the proper file name for the real test later on.
58393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58394  if test "x$test_shortpath" = x; then
58395    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58397    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58398  fi
58399
58400  # Call helper function which possibly converts this using DOS-style short mode.
58401  # If so, the updated path is stored in $new_path.
58402
58403  input_path="$new_path"
58404  # Check if we need to convert this using DOS-style short mode. If the path
58405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58406  # take no chances and rewrite it.
58407  # Note: m4 eats our [], so we need to use [ and ] instead.
58408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58409  if test "x$has_forbidden_chars" != x; then
58410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58414      # Going to short mode and back again did indeed matter. Since short mode is
58415      # case insensitive, let's make it lowercase to improve readability.
58416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58417      # Now convert it back to Unix-style (cygpath)
58418      input_path=`$CYGPATH -u "$shortmode_path"`
58419      new_path="$input_path"
58420    fi
58421  fi
58422
58423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58424  if test "x$test_cygdrive_prefix" = x; then
58425    # As a simple fix, exclude /usr/bin since it's not a real path.
58426    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58428      # a path prefixed by /cygdrive for fixpath to work.
58429      new_path="$CYGWIN_ROOT_PATH$input_path"
58430    fi
58431  fi
58432
58433
58434  if test "x$path" != "x$new_path"; then
58435    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58437$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58438  fi
58439
58440    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58441
58442  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58443  has_colon=`$ECHO $path | $GREP ^.:`
58444  new_path="$path"
58445  if test "x$has_colon" = x; then
58446    # Not in mixed or Windows style, start by that.
58447    new_path=`cmd //c echo $path`
58448  fi
58449
58450
58451  input_path="$new_path"
58452  # Check if we need to convert this using DOS-style short mode. If the path
58453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58454  # take no chances and rewrite it.
58455  # Note: m4 eats our [], so we need to use [ and ] instead.
58456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58457  if test "x$has_forbidden_chars" != x; then
58458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58459    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58460  fi
58461
58462
58463  windows_path="$new_path"
58464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58465    unix_path=`$CYGPATH -u "$windows_path"`
58466    new_path="$unix_path"
58467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58469    new_path="$unix_path"
58470  fi
58471
58472  if test "x$path" != "x$new_path"; then
58473    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58476  fi
58477
58478  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58479  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58480
58481    else
58482      # We're on a unix platform. Hooray! :)
58483      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58484      has_space=`$ECHO "$path" | $GREP " "`
58485      if test "x$has_space" != x; then
58486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58487$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58488        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58489      fi
58490
58491      # Use eval to expand a potential ~
58492      eval path="$path"
58493      if test ! -f "$path" && test ! -d "$path"; then
58494        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58495      fi
58496
58497      if test -d "$path"; then
58498        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58499      else
58500        dir="`$DIRNAME "$path"`"
58501        base="`$BASENAME "$path"`"
58502        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58503      fi
58504    fi
58505  fi
58506
58507
58508  # Only process if variable expands to non-empty
58509
58510  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58512
58513  # Input might be given as Windows format, start by converting to
58514  # unix format.
58515  path="$POTENTIAL_FREETYPE_LIB_PATH"
58516  new_path=`$CYGPATH -u "$path"`
58517
58518  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58519  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58520  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58521  # "foo.exe" is OK but "foo" is an error.
58522  #
58523  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58524  # It is also a way to make sure we got the proper file name for the real test later on.
58525  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58526  if test "x$test_shortpath" = x; then
58527    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58528$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58529    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58530  fi
58531
58532  # Call helper function which possibly converts this using DOS-style short mode.
58533  # If so, the updated path is stored in $new_path.
58534
58535  input_path="$new_path"
58536  # Check if we need to convert this using DOS-style short mode. If the path
58537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58538  # take no chances and rewrite it.
58539  # Note: m4 eats our [], so we need to use [ and ] instead.
58540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58541  if test "x$has_forbidden_chars" != x; then
58542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58543    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58544    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58545    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58546      # Going to short mode and back again did indeed matter. Since short mode is
58547      # case insensitive, let's make it lowercase to improve readability.
58548      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58549      # Now convert it back to Unix-style (cygpath)
58550      input_path=`$CYGPATH -u "$shortmode_path"`
58551      new_path="$input_path"
58552    fi
58553  fi
58554
58555  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58556  if test "x$test_cygdrive_prefix" = x; then
58557    # As a simple fix, exclude /usr/bin since it's not a real path.
58558    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58559      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58560      # a path prefixed by /cygdrive for fixpath to work.
58561      new_path="$CYGWIN_ROOT_PATH$input_path"
58562    fi
58563  fi
58564
58565
58566  if test "x$path" != "x$new_path"; then
58567    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58568    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58569$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58570  fi
58571
58572    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58573
58574  path="$POTENTIAL_FREETYPE_LIB_PATH"
58575  has_colon=`$ECHO $path | $GREP ^.:`
58576  new_path="$path"
58577  if test "x$has_colon" = x; then
58578    # Not in mixed or Windows style, start by that.
58579    new_path=`cmd //c echo $path`
58580  fi
58581
58582
58583  input_path="$new_path"
58584  # Check if we need to convert this using DOS-style short mode. If the path
58585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58586  # take no chances and rewrite it.
58587  # Note: m4 eats our [], so we need to use [ and ] instead.
58588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58589  if test "x$has_forbidden_chars" != x; then
58590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58591    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58592  fi
58593
58594
58595  windows_path="$new_path"
58596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58597    unix_path=`$CYGPATH -u "$windows_path"`
58598    new_path="$unix_path"
58599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58601    new_path="$unix_path"
58602  fi
58603
58604  if test "x$path" != "x$new_path"; then
58605    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58607$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58608  fi
58609
58610  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58611  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58612
58613    else
58614      # We're on a unix platform. Hooray! :)
58615      path="$POTENTIAL_FREETYPE_LIB_PATH"
58616      has_space=`$ECHO "$path" | $GREP " "`
58617      if test "x$has_space" != x; then
58618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58619$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58620        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58621      fi
58622
58623      # Use eval to expand a potential ~
58624      eval path="$path"
58625      if test ! -f "$path" && test ! -d "$path"; then
58626        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58627      fi
58628
58629      if test -d "$path"; then
58630        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58631      else
58632        dir="`$DIRNAME "$path"`"
58633        base="`$BASENAME "$path"`"
58634        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58635      fi
58636    fi
58637  fi
58638
58639
58640    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58642$as_echo_n "checking for freetype includes... " >&6; }
58643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58644$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58645    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58647$as_echo_n "checking for freetype libraries... " >&6; }
58648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58649$as_echo "$FREETYPE_LIB_PATH" >&6; }
58650  fi
58651
58652            else
58653
58654  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58655  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
58656  METHOD="well-known location"
58657
58658  # Let's start with an optimistic view of the world :-)
58659  FOUND_FREETYPE=yes
58660
58661  # First look for the canonical freetype main include file ft2build.h.
58662  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58663    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58664    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58665    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58666      # Fail.
58667      FOUND_FREETYPE=no
58668    fi
58669  fi
58670
58671  if test "x$FOUND_FREETYPE" = xyes; then
58672    # Include file found, let's continue the sanity check.
58673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58674$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58675
58676    # Reset to default value
58677    FREETYPE_BASE_NAME=freetype
58678    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58679    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58680      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58681          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58682        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58683        # for the .6 version explicitly.
58684        FREETYPE_BASE_NAME=freetype.6
58685        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58686        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58687$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58688      else
58689        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58690$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58691        FOUND_FREETYPE=no
58692      fi
58693    else
58694      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58695        # On Windows, we will need both .lib and .dll file.
58696        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58697          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58698$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58699          FOUND_FREETYPE=no
58700        fi
58701      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58702          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58703        # Found lib in isa dir, use that instead.
58704        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58705        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58706$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58707      fi
58708    fi
58709  fi
58710
58711  if test "x$FOUND_FREETYPE" = xyes; then
58712
58713  # Only process if variable expands to non-empty
58714
58715  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58717
58718  # Input might be given as Windows format, start by converting to
58719  # unix format.
58720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58721  new_path=`$CYGPATH -u "$path"`
58722
58723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58726  # "foo.exe" is OK but "foo" is an error.
58727  #
58728  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58729  # It is also a way to make sure we got the proper file name for the real test later on.
58730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58731  if test "x$test_shortpath" = x; then
58732    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58733$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58734    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58735  fi
58736
58737  # Call helper function which possibly converts this using DOS-style short mode.
58738  # If so, the updated path is stored in $new_path.
58739
58740  input_path="$new_path"
58741  # Check if we need to convert this using DOS-style short mode. If the path
58742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58743  # take no chances and rewrite it.
58744  # Note: m4 eats our [], so we need to use [ and ] instead.
58745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58746  if test "x$has_forbidden_chars" != x; then
58747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58748    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58749    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58750    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58751      # Going to short mode and back again did indeed matter. Since short mode is
58752      # case insensitive, let's make it lowercase to improve readability.
58753      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58754      # Now convert it back to Unix-style (cygpath)
58755      input_path=`$CYGPATH -u "$shortmode_path"`
58756      new_path="$input_path"
58757    fi
58758  fi
58759
58760  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58761  if test "x$test_cygdrive_prefix" = x; then
58762    # As a simple fix, exclude /usr/bin since it's not a real path.
58763    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58764      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58765      # a path prefixed by /cygdrive for fixpath to work.
58766      new_path="$CYGWIN_ROOT_PATH$input_path"
58767    fi
58768  fi
58769
58770
58771  if test "x$path" != "x$new_path"; then
58772    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58774$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58775  fi
58776
58777    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58778
58779  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58780  has_colon=`$ECHO $path | $GREP ^.:`
58781  new_path="$path"
58782  if test "x$has_colon" = x; then
58783    # Not in mixed or Windows style, start by that.
58784    new_path=`cmd //c echo $path`
58785  fi
58786
58787
58788  input_path="$new_path"
58789  # Check if we need to convert this using DOS-style short mode. If the path
58790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58791  # take no chances and rewrite it.
58792  # Note: m4 eats our [], so we need to use [ and ] instead.
58793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58794  if test "x$has_forbidden_chars" != x; then
58795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58796    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58797  fi
58798
58799
58800  windows_path="$new_path"
58801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58802    unix_path=`$CYGPATH -u "$windows_path"`
58803    new_path="$unix_path"
58804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58806    new_path="$unix_path"
58807  fi
58808
58809  if test "x$path" != "x$new_path"; then
58810    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58811    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58812$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58813  fi
58814
58815  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58816  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58817
58818    else
58819      # We're on a unix platform. Hooray! :)
58820      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58821      has_space=`$ECHO "$path" | $GREP " "`
58822      if test "x$has_space" != x; then
58823        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58824$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58825        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58826      fi
58827
58828      # Use eval to expand a potential ~
58829      eval path="$path"
58830      if test ! -f "$path" && test ! -d "$path"; then
58831        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58832      fi
58833
58834      if test -d "$path"; then
58835        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58836      else
58837        dir="`$DIRNAME "$path"`"
58838        base="`$BASENAME "$path"`"
58839        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58840      fi
58841    fi
58842  fi
58843
58844
58845  # Only process if variable expands to non-empty
58846
58847  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58848    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58849
58850  # Input might be given as Windows format, start by converting to
58851  # unix format.
58852  path="$POTENTIAL_FREETYPE_LIB_PATH"
58853  new_path=`$CYGPATH -u "$path"`
58854
58855  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58856  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58857  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58858  # "foo.exe" is OK but "foo" is an error.
58859  #
58860  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58861  # It is also a way to make sure we got the proper file name for the real test later on.
58862  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58863  if test "x$test_shortpath" = x; then
58864    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58866    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58867  fi
58868
58869  # Call helper function which possibly converts this using DOS-style short mode.
58870  # If so, the updated path is stored in $new_path.
58871
58872  input_path="$new_path"
58873  # Check if we need to convert this using DOS-style short mode. If the path
58874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58875  # take no chances and rewrite it.
58876  # Note: m4 eats our [], so we need to use [ and ] instead.
58877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58878  if test "x$has_forbidden_chars" != x; then
58879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58880    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58881    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58882    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58883      # Going to short mode and back again did indeed matter. Since short mode is
58884      # case insensitive, let's make it lowercase to improve readability.
58885      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58886      # Now convert it back to Unix-style (cygpath)
58887      input_path=`$CYGPATH -u "$shortmode_path"`
58888      new_path="$input_path"
58889    fi
58890  fi
58891
58892  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58893  if test "x$test_cygdrive_prefix" = x; then
58894    # As a simple fix, exclude /usr/bin since it's not a real path.
58895    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58896      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58897      # a path prefixed by /cygdrive for fixpath to work.
58898      new_path="$CYGWIN_ROOT_PATH$input_path"
58899    fi
58900  fi
58901
58902
58903  if test "x$path" != "x$new_path"; then
58904    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58906$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58907  fi
58908
58909    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58910
58911  path="$POTENTIAL_FREETYPE_LIB_PATH"
58912  has_colon=`$ECHO $path | $GREP ^.:`
58913  new_path="$path"
58914  if test "x$has_colon" = x; then
58915    # Not in mixed or Windows style, start by that.
58916    new_path=`cmd //c echo $path`
58917  fi
58918
58919
58920  input_path="$new_path"
58921  # Check if we need to convert this using DOS-style short mode. If the path
58922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58923  # take no chances and rewrite it.
58924  # Note: m4 eats our [], so we need to use [ and ] instead.
58925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58926  if test "x$has_forbidden_chars" != x; then
58927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58928    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58929  fi
58930
58931
58932  windows_path="$new_path"
58933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58934    unix_path=`$CYGPATH -u "$windows_path"`
58935    new_path="$unix_path"
58936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58938    new_path="$unix_path"
58939  fi
58940
58941  if test "x$path" != "x$new_path"; then
58942    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58944$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58945  fi
58946
58947  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58948  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58949
58950    else
58951      # We're on a unix platform. Hooray! :)
58952      path="$POTENTIAL_FREETYPE_LIB_PATH"
58953      has_space=`$ECHO "$path" | $GREP " "`
58954      if test "x$has_space" != x; then
58955        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58957        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58958      fi
58959
58960      # Use eval to expand a potential ~
58961      eval path="$path"
58962      if test ! -f "$path" && test ! -d "$path"; then
58963        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58964      fi
58965
58966      if test -d "$path"; then
58967        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58968      else
58969        dir="`$DIRNAME "$path"`"
58970        base="`$BASENAME "$path"`"
58971        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58972      fi
58973    fi
58974  fi
58975
58976
58977    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58979$as_echo_n "checking for freetype includes... " >&6; }
58980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58981$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58982    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58983    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58984$as_echo_n "checking for freetype libraries... " >&6; }
58985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58986$as_echo "$FREETYPE_LIB_PATH" >&6; }
58987  fi
58988
58989            fi
58990            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
58991                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
58992              # Source is available, as a last resort try to build freetype in default location
58993
58994  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
58995  BUILD_FREETYPE=yes
58996
58997  # Check if the freetype sources are acessible..
58998  if ! test -d $FREETYPE_SRC_PATH; then
58999    { $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
59000$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59001    BUILD_FREETYPE=no
59002  fi
59003  # ..and contain a vc2010 project file
59004  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59005  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59006    { $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
59007$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59008    BUILD_FREETYPE=no
59009  fi
59010  # Now check if configure found a version of 'msbuild.exe'
59011  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59012    { $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
59013$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;}
59014    BUILD_FREETYPE=no
59015  fi
59016
59017  # Ready to go..
59018  if test "x$BUILD_FREETYPE" = xyes; then
59019    # msbuild requires trailing slashes for output directories
59020    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59021    freetype_lib_path_unix="$freetype_lib_path"
59022    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59023
59024  unix_path="$vcxproj_path"
59025  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59026    windows_path=`$CYGPATH -m "$unix_path"`
59027    vcxproj_path="$windows_path"
59028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59029    windows_path=`cmd //c echo $unix_path`
59030    vcxproj_path="$windows_path"
59031  fi
59032
59033
59034  unix_path="$freetype_lib_path"
59035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59036    windows_path=`$CYGPATH -m "$unix_path"`
59037    freetype_lib_path="$windows_path"
59038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59039    windows_path=`cmd //c echo $unix_path`
59040    freetype_lib_path="$windows_path"
59041  fi
59042
59043
59044  unix_path="$freetype_obj_path"
59045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59046    windows_path=`$CYGPATH -m "$unix_path"`
59047    freetype_obj_path="$windows_path"
59048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59049    windows_path=`cmd //c echo $unix_path`
59050    freetype_obj_path="$windows_path"
59051  fi
59052
59053    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59054      freetype_platform=x64
59055    else
59056      freetype_platform=win32
59057    fi
59058
59059    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59060    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59061    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59062    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59063    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59064$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59065
59066    # First we try to build the freetype.dll
59067    $ECHO -e "@echo off\n"\
59068        "$MSBUILD $vcxproj_path "\
59069        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59070        "/p:Configuration=\"Release Multithreaded\" "\
59071        "/p:Platform=$freetype_platform "\
59072        "/p:ConfigurationType=DynamicLibrary "\
59073        "/p:TargetName=freetype "\
59074        "/p:OutDir=\"$freetype_lib_path\" "\
59075        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59076    cmd /c freetype.bat
59077
59078    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59079      # If that succeeds we also build freetype.lib
59080      $ECHO -e "@echo off\n"\
59081          "$MSBUILD $vcxproj_path "\
59082          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59083          "/p:Configuration=\"Release Multithreaded\" "\
59084          "/p:Platform=$freetype_platform "\
59085          "/p:ConfigurationType=StaticLibrary "\
59086          "/p:TargetName=freetype "\
59087          "/p:OutDir=\"$freetype_lib_path\" "\
59088          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59089      cmd /c freetype.bat
59090
59091      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59092        # Once we build both, lib and dll, set freetype lib and include path appropriately
59093        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59094        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59095        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59096$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59097      else
59098        BUILD_FREETYPE=no
59099      fi
59100    else
59101      BUILD_FREETYPE=no
59102    fi
59103  fi
59104
59105              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59106
59107  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59108  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59109  METHOD="well-known location"
59110
59111  # Let's start with an optimistic view of the world :-)
59112  FOUND_FREETYPE=yes
59113
59114  # First look for the canonical freetype main include file ft2build.h.
59115  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59116    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59117    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59118    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59119      # Fail.
59120      FOUND_FREETYPE=no
59121    fi
59122  fi
59123
59124  if test "x$FOUND_FREETYPE" = xyes; then
59125    # Include file found, let's continue the sanity check.
59126    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59127$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59128
59129    # Reset to default value
59130    FREETYPE_BASE_NAME=freetype
59131    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59132    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59133      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59134          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59135        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59136        # for the .6 version explicitly.
59137        FREETYPE_BASE_NAME=freetype.6
59138        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59139        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59140$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59141      else
59142        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59143$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59144        FOUND_FREETYPE=no
59145      fi
59146    else
59147      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59148        # On Windows, we will need both .lib and .dll file.
59149        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59150          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59151$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59152          FOUND_FREETYPE=no
59153        fi
59154      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59155          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59156        # Found lib in isa dir, use that instead.
59157        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59158        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59159$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59160      fi
59161    fi
59162  fi
59163
59164  if test "x$FOUND_FREETYPE" = xyes; then
59165
59166  # Only process if variable expands to non-empty
59167
59168  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59170
59171  # Input might be given as Windows format, start by converting to
59172  # unix format.
59173  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59174  new_path=`$CYGPATH -u "$path"`
59175
59176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59179  # "foo.exe" is OK but "foo" is an error.
59180  #
59181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59182  # It is also a way to make sure we got the proper file name for the real test later on.
59183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59184  if test "x$test_shortpath" = x; then
59185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59186$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59187    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59188  fi
59189
59190  # Call helper function which possibly converts this using DOS-style short mode.
59191  # If so, the updated path is stored in $new_path.
59192
59193  input_path="$new_path"
59194  # Check if we need to convert this using DOS-style short mode. If the path
59195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59196  # take no chances and rewrite it.
59197  # Note: m4 eats our [], so we need to use [ and ] instead.
59198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59199  if test "x$has_forbidden_chars" != x; then
59200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59204      # Going to short mode and back again did indeed matter. Since short mode is
59205      # case insensitive, let's make it lowercase to improve readability.
59206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59207      # Now convert it back to Unix-style (cygpath)
59208      input_path=`$CYGPATH -u "$shortmode_path"`
59209      new_path="$input_path"
59210    fi
59211  fi
59212
59213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59214  if test "x$test_cygdrive_prefix" = x; then
59215    # As a simple fix, exclude /usr/bin since it's not a real path.
59216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59218      # a path prefixed by /cygdrive for fixpath to work.
59219      new_path="$CYGWIN_ROOT_PATH$input_path"
59220    fi
59221  fi
59222
59223
59224  if test "x$path" != "x$new_path"; then
59225    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59227$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59228  fi
59229
59230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59231
59232  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59233  has_colon=`$ECHO $path | $GREP ^.:`
59234  new_path="$path"
59235  if test "x$has_colon" = x; then
59236    # Not in mixed or Windows style, start by that.
59237    new_path=`cmd //c echo $path`
59238  fi
59239
59240
59241  input_path="$new_path"
59242  # Check if we need to convert this using DOS-style short mode. If the path
59243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59244  # take no chances and rewrite it.
59245  # Note: m4 eats our [], so we need to use [ and ] instead.
59246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59247  if test "x$has_forbidden_chars" != x; then
59248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59250  fi
59251
59252
59253  windows_path="$new_path"
59254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59255    unix_path=`$CYGPATH -u "$windows_path"`
59256    new_path="$unix_path"
59257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59259    new_path="$unix_path"
59260  fi
59261
59262  if test "x$path" != "x$new_path"; then
59263    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59265$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59266  fi
59267
59268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59270
59271    else
59272      # We're on a unix platform. Hooray! :)
59273      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59274      has_space=`$ECHO "$path" | $GREP " "`
59275      if test "x$has_space" != x; then
59276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59277$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59279      fi
59280
59281      # Use eval to expand a potential ~
59282      eval path="$path"
59283      if test ! -f "$path" && test ! -d "$path"; then
59284        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59285      fi
59286
59287      if test -d "$path"; then
59288        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59289      else
59290        dir="`$DIRNAME "$path"`"
59291        base="`$BASENAME "$path"`"
59292        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59293      fi
59294    fi
59295  fi
59296
59297
59298  # Only process if variable expands to non-empty
59299
59300  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59302
59303  # Input might be given as Windows format, start by converting to
59304  # unix format.
59305  path="$POTENTIAL_FREETYPE_LIB_PATH"
59306  new_path=`$CYGPATH -u "$path"`
59307
59308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59311  # "foo.exe" is OK but "foo" is an error.
59312  #
59313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59314  # It is also a way to make sure we got the proper file name for the real test later on.
59315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59316  if test "x$test_shortpath" = x; then
59317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59319    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59320  fi
59321
59322  # Call helper function which possibly converts this using DOS-style short mode.
59323  # If so, the updated path is stored in $new_path.
59324
59325  input_path="$new_path"
59326  # Check if we need to convert this using DOS-style short mode. If the path
59327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59328  # take no chances and rewrite it.
59329  # Note: m4 eats our [], so we need to use [ and ] instead.
59330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59331  if test "x$has_forbidden_chars" != x; then
59332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59336      # Going to short mode and back again did indeed matter. Since short mode is
59337      # case insensitive, let's make it lowercase to improve readability.
59338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59339      # Now convert it back to Unix-style (cygpath)
59340      input_path=`$CYGPATH -u "$shortmode_path"`
59341      new_path="$input_path"
59342    fi
59343  fi
59344
59345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59346  if test "x$test_cygdrive_prefix" = x; then
59347    # As a simple fix, exclude /usr/bin since it's not a real path.
59348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59350      # a path prefixed by /cygdrive for fixpath to work.
59351      new_path="$CYGWIN_ROOT_PATH$input_path"
59352    fi
59353  fi
59354
59355
59356  if test "x$path" != "x$new_path"; then
59357    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59359$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59360  fi
59361
59362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59363
59364  path="$POTENTIAL_FREETYPE_LIB_PATH"
59365  has_colon=`$ECHO $path | $GREP ^.:`
59366  new_path="$path"
59367  if test "x$has_colon" = x; then
59368    # Not in mixed or Windows style, start by that.
59369    new_path=`cmd //c echo $path`
59370  fi
59371
59372
59373  input_path="$new_path"
59374  # Check if we need to convert this using DOS-style short mode. If the path
59375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59376  # take no chances and rewrite it.
59377  # Note: m4 eats our [], so we need to use [ and ] instead.
59378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59379  if test "x$has_forbidden_chars" != x; then
59380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59382  fi
59383
59384
59385  windows_path="$new_path"
59386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59387    unix_path=`$CYGPATH -u "$windows_path"`
59388    new_path="$unix_path"
59389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59391    new_path="$unix_path"
59392  fi
59393
59394  if test "x$path" != "x$new_path"; then
59395    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59397$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59398  fi
59399
59400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59402
59403    else
59404      # We're on a unix platform. Hooray! :)
59405      path="$POTENTIAL_FREETYPE_LIB_PATH"
59406      has_space=`$ECHO "$path" | $GREP " "`
59407      if test "x$has_space" != x; then
59408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59411      fi
59412
59413      # Use eval to expand a potential ~
59414      eval path="$path"
59415      if test ! -f "$path" && test ! -d "$path"; then
59416        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59417      fi
59418
59419      if test -d "$path"; then
59420        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59421      else
59422        dir="`$DIRNAME "$path"`"
59423        base="`$BASENAME "$path"`"
59424        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59425      fi
59426    fi
59427  fi
59428
59429
59430    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59432$as_echo_n "checking for freetype includes... " >&6; }
59433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59434$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59435    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59437$as_echo_n "checking for freetype libraries... " >&6; }
59438    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59439$as_echo "$FREETYPE_LIB_PATH" >&6; }
59440  fi
59441
59442              else
59443
59444  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59445  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59446  METHOD="well-known location"
59447
59448  # Let's start with an optimistic view of the world :-)
59449  FOUND_FREETYPE=yes
59450
59451  # First look for the canonical freetype main include file ft2build.h.
59452  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59453    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59454    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59455    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59456      # Fail.
59457      FOUND_FREETYPE=no
59458    fi
59459  fi
59460
59461  if test "x$FOUND_FREETYPE" = xyes; then
59462    # Include file found, let's continue the sanity check.
59463    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59464$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59465
59466    # Reset to default value
59467    FREETYPE_BASE_NAME=freetype
59468    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59469    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59470      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59471          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59472        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59473        # for the .6 version explicitly.
59474        FREETYPE_BASE_NAME=freetype.6
59475        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59476        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59477$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59478      else
59479        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59480$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59481        FOUND_FREETYPE=no
59482      fi
59483    else
59484      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59485        # On Windows, we will need both .lib and .dll file.
59486        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59487          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59488$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59489          FOUND_FREETYPE=no
59490        fi
59491      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59492          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59493        # Found lib in isa dir, use that instead.
59494        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59495        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59496$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59497      fi
59498    fi
59499  fi
59500
59501  if test "x$FOUND_FREETYPE" = xyes; then
59502
59503  # Only process if variable expands to non-empty
59504
59505  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59507
59508  # Input might be given as Windows format, start by converting to
59509  # unix format.
59510  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59511  new_path=`$CYGPATH -u "$path"`
59512
59513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59516  # "foo.exe" is OK but "foo" is an error.
59517  #
59518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59519  # It is also a way to make sure we got the proper file name for the real test later on.
59520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59521  if test "x$test_shortpath" = x; then
59522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59524    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59525  fi
59526
59527  # Call helper function which possibly converts this using DOS-style short mode.
59528  # If so, the updated path is stored in $new_path.
59529
59530  input_path="$new_path"
59531  # Check if we need to convert this using DOS-style short mode. If the path
59532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59533  # take no chances and rewrite it.
59534  # Note: m4 eats our [], so we need to use [ and ] instead.
59535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59536  if test "x$has_forbidden_chars" != x; then
59537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59541      # Going to short mode and back again did indeed matter. Since short mode is
59542      # case insensitive, let's make it lowercase to improve readability.
59543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59544      # Now convert it back to Unix-style (cygpath)
59545      input_path=`$CYGPATH -u "$shortmode_path"`
59546      new_path="$input_path"
59547    fi
59548  fi
59549
59550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59551  if test "x$test_cygdrive_prefix" = x; then
59552    # As a simple fix, exclude /usr/bin since it's not a real path.
59553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59555      # a path prefixed by /cygdrive for fixpath to work.
59556      new_path="$CYGWIN_ROOT_PATH$input_path"
59557    fi
59558  fi
59559
59560
59561  if test "x$path" != "x$new_path"; then
59562    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59564$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59565  fi
59566
59567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59568
59569  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59570  has_colon=`$ECHO $path | $GREP ^.:`
59571  new_path="$path"
59572  if test "x$has_colon" = x; then
59573    # Not in mixed or Windows style, start by that.
59574    new_path=`cmd //c echo $path`
59575  fi
59576
59577
59578  input_path="$new_path"
59579  # Check if we need to convert this using DOS-style short mode. If the path
59580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59581  # take no chances and rewrite it.
59582  # Note: m4 eats our [], so we need to use [ and ] instead.
59583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59584  if test "x$has_forbidden_chars" != x; then
59585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59587  fi
59588
59589
59590  windows_path="$new_path"
59591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59592    unix_path=`$CYGPATH -u "$windows_path"`
59593    new_path="$unix_path"
59594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59596    new_path="$unix_path"
59597  fi
59598
59599  if test "x$path" != "x$new_path"; then
59600    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59602$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59603  fi
59604
59605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59607
59608    else
59609      # We're on a unix platform. Hooray! :)
59610      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59611      has_space=`$ECHO "$path" | $GREP " "`
59612      if test "x$has_space" != x; then
59613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59614$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59616      fi
59617
59618      # Use eval to expand a potential ~
59619      eval path="$path"
59620      if test ! -f "$path" && test ! -d "$path"; then
59621        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59622      fi
59623
59624      if test -d "$path"; then
59625        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59626      else
59627        dir="`$DIRNAME "$path"`"
59628        base="`$BASENAME "$path"`"
59629        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59630      fi
59631    fi
59632  fi
59633
59634
59635  # Only process if variable expands to non-empty
59636
59637  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59638    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59639
59640  # Input might be given as Windows format, start by converting to
59641  # unix format.
59642  path="$POTENTIAL_FREETYPE_LIB_PATH"
59643  new_path=`$CYGPATH -u "$path"`
59644
59645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59648  # "foo.exe" is OK but "foo" is an error.
59649  #
59650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59651  # It is also a way to make sure we got the proper file name for the real test later on.
59652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59653  if test "x$test_shortpath" = x; then
59654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59656    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59657  fi
59658
59659  # Call helper function which possibly converts this using DOS-style short mode.
59660  # If so, the updated path is stored in $new_path.
59661
59662  input_path="$new_path"
59663  # Check if we need to convert this using DOS-style short mode. If the path
59664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59665  # take no chances and rewrite it.
59666  # Note: m4 eats our [], so we need to use [ and ] instead.
59667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59668  if test "x$has_forbidden_chars" != x; then
59669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59673      # Going to short mode and back again did indeed matter. Since short mode is
59674      # case insensitive, let's make it lowercase to improve readability.
59675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59676      # Now convert it back to Unix-style (cygpath)
59677      input_path=`$CYGPATH -u "$shortmode_path"`
59678      new_path="$input_path"
59679    fi
59680  fi
59681
59682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59683  if test "x$test_cygdrive_prefix" = x; then
59684    # As a simple fix, exclude /usr/bin since it's not a real path.
59685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59687      # a path prefixed by /cygdrive for fixpath to work.
59688      new_path="$CYGWIN_ROOT_PATH$input_path"
59689    fi
59690  fi
59691
59692
59693  if test "x$path" != "x$new_path"; then
59694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59697  fi
59698
59699    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59700
59701  path="$POTENTIAL_FREETYPE_LIB_PATH"
59702  has_colon=`$ECHO $path | $GREP ^.:`
59703  new_path="$path"
59704  if test "x$has_colon" = x; then
59705    # Not in mixed or Windows style, start by that.
59706    new_path=`cmd //c echo $path`
59707  fi
59708
59709
59710  input_path="$new_path"
59711  # Check if we need to convert this using DOS-style short mode. If the path
59712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59713  # take no chances and rewrite it.
59714  # Note: m4 eats our [], so we need to use [ and ] instead.
59715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59716  if test "x$has_forbidden_chars" != x; then
59717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59719  fi
59720
59721
59722  windows_path="$new_path"
59723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59724    unix_path=`$CYGPATH -u "$windows_path"`
59725    new_path="$unix_path"
59726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59728    new_path="$unix_path"
59729  fi
59730
59731  if test "x$path" != "x$new_path"; then
59732    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59734$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59735  fi
59736
59737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59739
59740    else
59741      # We're on a unix platform. Hooray! :)
59742      path="$POTENTIAL_FREETYPE_LIB_PATH"
59743      has_space=`$ECHO "$path" | $GREP " "`
59744      if test "x$has_space" != x; then
59745        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59746$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59747        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59748      fi
59749
59750      # Use eval to expand a potential ~
59751      eval path="$path"
59752      if test ! -f "$path" && test ! -d "$path"; then
59753        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59754      fi
59755
59756      if test -d "$path"; then
59757        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59758      else
59759        dir="`$DIRNAME "$path"`"
59760        base="`$BASENAME "$path"`"
59761        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59762      fi
59763    fi
59764  fi
59765
59766
59767    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59769$as_echo_n "checking for freetype includes... " >&6; }
59770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59771$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59772    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59774$as_echo_n "checking for freetype libraries... " >&6; }
59775    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59776$as_echo "$FREETYPE_LIB_PATH" >&6; }
59777  fi
59778
59779              fi
59780            fi
59781          fi
59782        else
59783          FREETYPE_BASE_DIR="$SYSROOT/usr"
59784
59785  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59786  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59787  METHOD="well-known location"
59788
59789  # Let's start with an optimistic view of the world :-)
59790  FOUND_FREETYPE=yes
59791
59792  # First look for the canonical freetype main include file ft2build.h.
59793  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59794    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59795    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59796    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59797      # Fail.
59798      FOUND_FREETYPE=no
59799    fi
59800  fi
59801
59802  if test "x$FOUND_FREETYPE" = xyes; then
59803    # Include file found, let's continue the sanity check.
59804    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59805$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59806
59807    # Reset to default value
59808    FREETYPE_BASE_NAME=freetype
59809    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59810    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59811      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59812          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59813        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59814        # for the .6 version explicitly.
59815        FREETYPE_BASE_NAME=freetype.6
59816        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59817        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59818$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59819      else
59820        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59821$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59822        FOUND_FREETYPE=no
59823      fi
59824    else
59825      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59826        # On Windows, we will need both .lib and .dll file.
59827        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59828          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59830          FOUND_FREETYPE=no
59831        fi
59832      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59833          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59834        # Found lib in isa dir, use that instead.
59835        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59836        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59837$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59838      fi
59839    fi
59840  fi
59841
59842  if test "x$FOUND_FREETYPE" = xyes; then
59843
59844  # Only process if variable expands to non-empty
59845
59846  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59848
59849  # Input might be given as Windows format, start by converting to
59850  # unix format.
59851  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59852  new_path=`$CYGPATH -u "$path"`
59853
59854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59857  # "foo.exe" is OK but "foo" is an error.
59858  #
59859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59860  # It is also a way to make sure we got the proper file name for the real test later on.
59861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59862  if test "x$test_shortpath" = x; then
59863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59864$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59865    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59866  fi
59867
59868  # Call helper function which possibly converts this using DOS-style short mode.
59869  # If so, the updated path is stored in $new_path.
59870
59871  input_path="$new_path"
59872  # Check if we need to convert this using DOS-style short mode. If the path
59873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59874  # take no chances and rewrite it.
59875  # Note: m4 eats our [], so we need to use [ and ] instead.
59876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59877  if test "x$has_forbidden_chars" != x; then
59878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59882      # Going to short mode and back again did indeed matter. Since short mode is
59883      # case insensitive, let's make it lowercase to improve readability.
59884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59885      # Now convert it back to Unix-style (cygpath)
59886      input_path=`$CYGPATH -u "$shortmode_path"`
59887      new_path="$input_path"
59888    fi
59889  fi
59890
59891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59892  if test "x$test_cygdrive_prefix" = x; then
59893    # As a simple fix, exclude /usr/bin since it's not a real path.
59894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59896      # a path prefixed by /cygdrive for fixpath to work.
59897      new_path="$CYGWIN_ROOT_PATH$input_path"
59898    fi
59899  fi
59900
59901
59902  if test "x$path" != "x$new_path"; then
59903    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59905$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59906  fi
59907
59908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59909
59910  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59911  has_colon=`$ECHO $path | $GREP ^.:`
59912  new_path="$path"
59913  if test "x$has_colon" = x; then
59914    # Not in mixed or Windows style, start by that.
59915    new_path=`cmd //c echo $path`
59916  fi
59917
59918
59919  input_path="$new_path"
59920  # Check if we need to convert this using DOS-style short mode. If the path
59921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59922  # take no chances and rewrite it.
59923  # Note: m4 eats our [], so we need to use [ and ] instead.
59924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59925  if test "x$has_forbidden_chars" != x; then
59926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59928  fi
59929
59930
59931  windows_path="$new_path"
59932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59933    unix_path=`$CYGPATH -u "$windows_path"`
59934    new_path="$unix_path"
59935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59937    new_path="$unix_path"
59938  fi
59939
59940  if test "x$path" != "x$new_path"; then
59941    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59943$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59944  fi
59945
59946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59948
59949    else
59950      # We're on a unix platform. Hooray! :)
59951      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59952      has_space=`$ECHO "$path" | $GREP " "`
59953      if test "x$has_space" != x; then
59954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59955$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59957      fi
59958
59959      # Use eval to expand a potential ~
59960      eval path="$path"
59961      if test ! -f "$path" && test ! -d "$path"; then
59962        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59963      fi
59964
59965      if test -d "$path"; then
59966        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59967      else
59968        dir="`$DIRNAME "$path"`"
59969        base="`$BASENAME "$path"`"
59970        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59971      fi
59972    fi
59973  fi
59974
59975
59976  # Only process if variable expands to non-empty
59977
59978  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59979    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59980
59981  # Input might be given as Windows format, start by converting to
59982  # unix format.
59983  path="$POTENTIAL_FREETYPE_LIB_PATH"
59984  new_path=`$CYGPATH -u "$path"`
59985
59986  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59987  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59988  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59989  # "foo.exe" is OK but "foo" is an error.
59990  #
59991  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59992  # It is also a way to make sure we got the proper file name for the real test later on.
59993  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59994  if test "x$test_shortpath" = x; then
59995    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59997    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59998  fi
59999
60000  # Call helper function which possibly converts this using DOS-style short mode.
60001  # If so, the updated path is stored in $new_path.
60002
60003  input_path="$new_path"
60004  # Check if we need to convert this using DOS-style short mode. If the path
60005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60006  # take no chances and rewrite it.
60007  # Note: m4 eats our [], so we need to use [ and ] instead.
60008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60009  if test "x$has_forbidden_chars" != x; then
60010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60014      # Going to short mode and back again did indeed matter. Since short mode is
60015      # case insensitive, let's make it lowercase to improve readability.
60016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60017      # Now convert it back to Unix-style (cygpath)
60018      input_path=`$CYGPATH -u "$shortmode_path"`
60019      new_path="$input_path"
60020    fi
60021  fi
60022
60023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60024  if test "x$test_cygdrive_prefix" = x; then
60025    # As a simple fix, exclude /usr/bin since it's not a real path.
60026    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60028      # a path prefixed by /cygdrive for fixpath to work.
60029      new_path="$CYGWIN_ROOT_PATH$input_path"
60030    fi
60031  fi
60032
60033
60034  if test "x$path" != "x$new_path"; then
60035    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60038  fi
60039
60040    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60041
60042  path="$POTENTIAL_FREETYPE_LIB_PATH"
60043  has_colon=`$ECHO $path | $GREP ^.:`
60044  new_path="$path"
60045  if test "x$has_colon" = x; then
60046    # Not in mixed or Windows style, start by that.
60047    new_path=`cmd //c echo $path`
60048  fi
60049
60050
60051  input_path="$new_path"
60052  # Check if we need to convert this using DOS-style short mode. If the path
60053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60054  # take no chances and rewrite it.
60055  # Note: m4 eats our [], so we need to use [ and ] instead.
60056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60057  if test "x$has_forbidden_chars" != x; then
60058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60059    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60060  fi
60061
60062
60063  windows_path="$new_path"
60064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60065    unix_path=`$CYGPATH -u "$windows_path"`
60066    new_path="$unix_path"
60067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60069    new_path="$unix_path"
60070  fi
60071
60072  if test "x$path" != "x$new_path"; then
60073    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60075$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60076  fi
60077
60078  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60079  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60080
60081    else
60082      # We're on a unix platform. Hooray! :)
60083      path="$POTENTIAL_FREETYPE_LIB_PATH"
60084      has_space=`$ECHO "$path" | $GREP " "`
60085      if test "x$has_space" != x; then
60086        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60087$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60088        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60089      fi
60090
60091      # Use eval to expand a potential ~
60092      eval path="$path"
60093      if test ! -f "$path" && test ! -d "$path"; then
60094        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60095      fi
60096
60097      if test -d "$path"; then
60098        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60099      else
60100        dir="`$DIRNAME "$path"`"
60101        base="`$BASENAME "$path"`"
60102        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60103      fi
60104    fi
60105  fi
60106
60107
60108    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60109    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60110$as_echo_n "checking for freetype includes... " >&6; }
60111    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60112$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60113    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60114    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60115$as_echo_n "checking for freetype libraries... " >&6; }
60116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60117$as_echo "$FREETYPE_LIB_PATH" >&6; }
60118  fi
60119
60120
60121          if test "x$FOUND_FREETYPE" != xyes; then
60122            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60123
60124  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60125  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60126  METHOD="well-known location"
60127
60128  # Let's start with an optimistic view of the world :-)
60129  FOUND_FREETYPE=yes
60130
60131  # First look for the canonical freetype main include file ft2build.h.
60132  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60133    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60134    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60135    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60136      # Fail.
60137      FOUND_FREETYPE=no
60138    fi
60139  fi
60140
60141  if test "x$FOUND_FREETYPE" = xyes; then
60142    # Include file found, let's continue the sanity check.
60143    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60144$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60145
60146    # Reset to default value
60147    FREETYPE_BASE_NAME=freetype
60148    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60149    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60150      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60151          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60152        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60153        # for the .6 version explicitly.
60154        FREETYPE_BASE_NAME=freetype.6
60155        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60156        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60157$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60158      else
60159        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60160$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60161        FOUND_FREETYPE=no
60162      fi
60163    else
60164      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60165        # On Windows, we will need both .lib and .dll file.
60166        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60167          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60168$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60169          FOUND_FREETYPE=no
60170        fi
60171      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60172          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60173        # Found lib in isa dir, use that instead.
60174        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60175        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60176$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60177      fi
60178    fi
60179  fi
60180
60181  if test "x$FOUND_FREETYPE" = xyes; then
60182
60183  # Only process if variable expands to non-empty
60184
60185  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60187
60188  # Input might be given as Windows format, start by converting to
60189  # unix format.
60190  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60191  new_path=`$CYGPATH -u "$path"`
60192
60193  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60194  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60195  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60196  # "foo.exe" is OK but "foo" is an error.
60197  #
60198  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60199  # It is also a way to make sure we got the proper file name for the real test later on.
60200  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60201  if test "x$test_shortpath" = x; then
60202    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60203$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60204    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60205  fi
60206
60207  # Call helper function which possibly converts this using DOS-style short mode.
60208  # If so, the updated path is stored in $new_path.
60209
60210  input_path="$new_path"
60211  # Check if we need to convert this using DOS-style short mode. If the path
60212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60213  # take no chances and rewrite it.
60214  # Note: m4 eats our [], so we need to use [ and ] instead.
60215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60216  if test "x$has_forbidden_chars" != x; then
60217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60218    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60219    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60220    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60221      # Going to short mode and back again did indeed matter. Since short mode is
60222      # case insensitive, let's make it lowercase to improve readability.
60223      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60224      # Now convert it back to Unix-style (cygpath)
60225      input_path=`$CYGPATH -u "$shortmode_path"`
60226      new_path="$input_path"
60227    fi
60228  fi
60229
60230  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60231  if test "x$test_cygdrive_prefix" = x; then
60232    # As a simple fix, exclude /usr/bin since it's not a real path.
60233    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60234      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60235      # a path prefixed by /cygdrive for fixpath to work.
60236      new_path="$CYGWIN_ROOT_PATH$input_path"
60237    fi
60238  fi
60239
60240
60241  if test "x$path" != "x$new_path"; then
60242    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60244$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60245  fi
60246
60247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60248
60249  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60250  has_colon=`$ECHO $path | $GREP ^.:`
60251  new_path="$path"
60252  if test "x$has_colon" = x; then
60253    # Not in mixed or Windows style, start by that.
60254    new_path=`cmd //c echo $path`
60255  fi
60256
60257
60258  input_path="$new_path"
60259  # Check if we need to convert this using DOS-style short mode. If the path
60260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60261  # take no chances and rewrite it.
60262  # Note: m4 eats our [], so we need to use [ and ] instead.
60263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60264  if test "x$has_forbidden_chars" != x; then
60265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60267  fi
60268
60269
60270  windows_path="$new_path"
60271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60272    unix_path=`$CYGPATH -u "$windows_path"`
60273    new_path="$unix_path"
60274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60276    new_path="$unix_path"
60277  fi
60278
60279  if test "x$path" != "x$new_path"; then
60280    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60283  fi
60284
60285  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60286  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60287
60288    else
60289      # We're on a unix platform. Hooray! :)
60290      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60291      has_space=`$ECHO "$path" | $GREP " "`
60292      if test "x$has_space" != x; then
60293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60294$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60295        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60296      fi
60297
60298      # Use eval to expand a potential ~
60299      eval path="$path"
60300      if test ! -f "$path" && test ! -d "$path"; then
60301        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60302      fi
60303
60304      if test -d "$path"; then
60305        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60306      else
60307        dir="`$DIRNAME "$path"`"
60308        base="`$BASENAME "$path"`"
60309        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60310      fi
60311    fi
60312  fi
60313
60314
60315  # Only process if variable expands to non-empty
60316
60317  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60319
60320  # Input might be given as Windows format, start by converting to
60321  # unix format.
60322  path="$POTENTIAL_FREETYPE_LIB_PATH"
60323  new_path=`$CYGPATH -u "$path"`
60324
60325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60328  # "foo.exe" is OK but "foo" is an error.
60329  #
60330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60331  # It is also a way to make sure we got the proper file name for the real test later on.
60332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60333  if test "x$test_shortpath" = x; then
60334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60336    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60337  fi
60338
60339  # Call helper function which possibly converts this using DOS-style short mode.
60340  # If so, the updated path is stored in $new_path.
60341
60342  input_path="$new_path"
60343  # Check if we need to convert this using DOS-style short mode. If the path
60344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60345  # take no chances and rewrite it.
60346  # Note: m4 eats our [], so we need to use [ and ] instead.
60347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60348  if test "x$has_forbidden_chars" != x; then
60349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60353      # Going to short mode and back again did indeed matter. Since short mode is
60354      # case insensitive, let's make it lowercase to improve readability.
60355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60356      # Now convert it back to Unix-style (cygpath)
60357      input_path=`$CYGPATH -u "$shortmode_path"`
60358      new_path="$input_path"
60359    fi
60360  fi
60361
60362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60363  if test "x$test_cygdrive_prefix" = x; then
60364    # As a simple fix, exclude /usr/bin since it's not a real path.
60365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60367      # a path prefixed by /cygdrive for fixpath to work.
60368      new_path="$CYGWIN_ROOT_PATH$input_path"
60369    fi
60370  fi
60371
60372
60373  if test "x$path" != "x$new_path"; then
60374    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60377  fi
60378
60379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60380
60381  path="$POTENTIAL_FREETYPE_LIB_PATH"
60382  has_colon=`$ECHO $path | $GREP ^.:`
60383  new_path="$path"
60384  if test "x$has_colon" = x; then
60385    # Not in mixed or Windows style, start by that.
60386    new_path=`cmd //c echo $path`
60387  fi
60388
60389
60390  input_path="$new_path"
60391  # Check if we need to convert this using DOS-style short mode. If the path
60392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60393  # take no chances and rewrite it.
60394  # Note: m4 eats our [], so we need to use [ and ] instead.
60395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60396  if test "x$has_forbidden_chars" != x; then
60397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60399  fi
60400
60401
60402  windows_path="$new_path"
60403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60404    unix_path=`$CYGPATH -u "$windows_path"`
60405    new_path="$unix_path"
60406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60408    new_path="$unix_path"
60409  fi
60410
60411  if test "x$path" != "x$new_path"; then
60412    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60414$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60415  fi
60416
60417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60419
60420    else
60421      # We're on a unix platform. Hooray! :)
60422      path="$POTENTIAL_FREETYPE_LIB_PATH"
60423      has_space=`$ECHO "$path" | $GREP " "`
60424      if test "x$has_space" != x; then
60425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60426$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60428      fi
60429
60430      # Use eval to expand a potential ~
60431      eval path="$path"
60432      if test ! -f "$path" && test ! -d "$path"; then
60433        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60434      fi
60435
60436      if test -d "$path"; then
60437        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60438      else
60439        dir="`$DIRNAME "$path"`"
60440        base="`$BASENAME "$path"`"
60441        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60442      fi
60443    fi
60444  fi
60445
60446
60447    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60448    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60449$as_echo_n "checking for freetype includes... " >&6; }
60450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60451$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60452    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60454$as_echo_n "checking for freetype libraries... " >&6; }
60455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60456$as_echo "$FREETYPE_LIB_PATH" >&6; }
60457  fi
60458
60459          fi
60460
60461          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60462            if test "x$FOUND_FREETYPE" != xyes; then
60463              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60464              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60465
60466  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60467  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60468  METHOD="well-known location"
60469
60470  # Let's start with an optimistic view of the world :-)
60471  FOUND_FREETYPE=yes
60472
60473  # First look for the canonical freetype main include file ft2build.h.
60474  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60475    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60476    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60477    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60478      # Fail.
60479      FOUND_FREETYPE=no
60480    fi
60481  fi
60482
60483  if test "x$FOUND_FREETYPE" = xyes; then
60484    # Include file found, let's continue the sanity check.
60485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60486$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60487
60488    # Reset to default value
60489    FREETYPE_BASE_NAME=freetype
60490    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60491    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60492      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60493          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60494        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60495        # for the .6 version explicitly.
60496        FREETYPE_BASE_NAME=freetype.6
60497        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60498        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60499$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60500      else
60501        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60502$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60503        FOUND_FREETYPE=no
60504      fi
60505    else
60506      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60507        # On Windows, we will need both .lib and .dll file.
60508        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60509          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60510$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60511          FOUND_FREETYPE=no
60512        fi
60513      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60514          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60515        # Found lib in isa dir, use that instead.
60516        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60517        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60518$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60519      fi
60520    fi
60521  fi
60522
60523  if test "x$FOUND_FREETYPE" = xyes; then
60524
60525  # Only process if variable expands to non-empty
60526
60527  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60529
60530  # Input might be given as Windows format, start by converting to
60531  # unix format.
60532  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60533  new_path=`$CYGPATH -u "$path"`
60534
60535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60538  # "foo.exe" is OK but "foo" is an error.
60539  #
60540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60541  # It is also a way to make sure we got the proper file name for the real test later on.
60542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60543  if test "x$test_shortpath" = x; then
60544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60545$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60546    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60547  fi
60548
60549  # Call helper function which possibly converts this using DOS-style short mode.
60550  # If so, the updated path is stored in $new_path.
60551
60552  input_path="$new_path"
60553  # Check if we need to convert this using DOS-style short mode. If the path
60554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60555  # take no chances and rewrite it.
60556  # Note: m4 eats our [], so we need to use [ and ] instead.
60557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60558  if test "x$has_forbidden_chars" != x; then
60559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60563      # Going to short mode and back again did indeed matter. Since short mode is
60564      # case insensitive, let's make it lowercase to improve readability.
60565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60566      # Now convert it back to Unix-style (cygpath)
60567      input_path=`$CYGPATH -u "$shortmode_path"`
60568      new_path="$input_path"
60569    fi
60570  fi
60571
60572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60573  if test "x$test_cygdrive_prefix" = x; then
60574    # As a simple fix, exclude /usr/bin since it's not a real path.
60575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60577      # a path prefixed by /cygdrive for fixpath to work.
60578      new_path="$CYGWIN_ROOT_PATH$input_path"
60579    fi
60580  fi
60581
60582
60583  if test "x$path" != "x$new_path"; then
60584    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60586$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60587  fi
60588
60589    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60590
60591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60592  has_colon=`$ECHO $path | $GREP ^.:`
60593  new_path="$path"
60594  if test "x$has_colon" = x; then
60595    # Not in mixed or Windows style, start by that.
60596    new_path=`cmd //c echo $path`
60597  fi
60598
60599
60600  input_path="$new_path"
60601  # Check if we need to convert this using DOS-style short mode. If the path
60602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60603  # take no chances and rewrite it.
60604  # Note: m4 eats our [], so we need to use [ and ] instead.
60605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60606  if test "x$has_forbidden_chars" != x; then
60607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60609  fi
60610
60611
60612  windows_path="$new_path"
60613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60614    unix_path=`$CYGPATH -u "$windows_path"`
60615    new_path="$unix_path"
60616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60618    new_path="$unix_path"
60619  fi
60620
60621  if test "x$path" != "x$new_path"; then
60622    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60625  fi
60626
60627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60629
60630    else
60631      # We're on a unix platform. Hooray! :)
60632      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60633      has_space=`$ECHO "$path" | $GREP " "`
60634      if test "x$has_space" != x; then
60635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60638      fi
60639
60640      # Use eval to expand a potential ~
60641      eval path="$path"
60642      if test ! -f "$path" && test ! -d "$path"; then
60643        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60644      fi
60645
60646      if test -d "$path"; then
60647        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60648      else
60649        dir="`$DIRNAME "$path"`"
60650        base="`$BASENAME "$path"`"
60651        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60652      fi
60653    fi
60654  fi
60655
60656
60657  # Only process if variable expands to non-empty
60658
60659  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60660    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60661
60662  # Input might be given as Windows format, start by converting to
60663  # unix format.
60664  path="$POTENTIAL_FREETYPE_LIB_PATH"
60665  new_path=`$CYGPATH -u "$path"`
60666
60667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60670  # "foo.exe" is OK but "foo" is an error.
60671  #
60672  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60673  # It is also a way to make sure we got the proper file name for the real test later on.
60674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60675  if test "x$test_shortpath" = x; then
60676    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60678    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60679  fi
60680
60681  # Call helper function which possibly converts this using DOS-style short mode.
60682  # If so, the updated path is stored in $new_path.
60683
60684  input_path="$new_path"
60685  # Check if we need to convert this using DOS-style short mode. If the path
60686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60687  # take no chances and rewrite it.
60688  # Note: m4 eats our [], so we need to use [ and ] instead.
60689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60690  if test "x$has_forbidden_chars" != x; then
60691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60695      # Going to short mode and back again did indeed matter. Since short mode is
60696      # case insensitive, let's make it lowercase to improve readability.
60697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60698      # Now convert it back to Unix-style (cygpath)
60699      input_path=`$CYGPATH -u "$shortmode_path"`
60700      new_path="$input_path"
60701    fi
60702  fi
60703
60704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60705  if test "x$test_cygdrive_prefix" = x; then
60706    # As a simple fix, exclude /usr/bin since it's not a real path.
60707    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60709      # a path prefixed by /cygdrive for fixpath to work.
60710      new_path="$CYGWIN_ROOT_PATH$input_path"
60711    fi
60712  fi
60713
60714
60715  if test "x$path" != "x$new_path"; then
60716    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60718$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60719  fi
60720
60721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60722
60723  path="$POTENTIAL_FREETYPE_LIB_PATH"
60724  has_colon=`$ECHO $path | $GREP ^.:`
60725  new_path="$path"
60726  if test "x$has_colon" = x; then
60727    # Not in mixed or Windows style, start by that.
60728    new_path=`cmd //c echo $path`
60729  fi
60730
60731
60732  input_path="$new_path"
60733  # Check if we need to convert this using DOS-style short mode. If the path
60734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60735  # take no chances and rewrite it.
60736  # Note: m4 eats our [], so we need to use [ and ] instead.
60737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60738  if test "x$has_forbidden_chars" != x; then
60739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60740    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60741  fi
60742
60743
60744  windows_path="$new_path"
60745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60746    unix_path=`$CYGPATH -u "$windows_path"`
60747    new_path="$unix_path"
60748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60750    new_path="$unix_path"
60751  fi
60752
60753  if test "x$path" != "x$new_path"; then
60754    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60755    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60756$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60757  fi
60758
60759  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60760  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60761
60762    else
60763      # We're on a unix platform. Hooray! :)
60764      path="$POTENTIAL_FREETYPE_LIB_PATH"
60765      has_space=`$ECHO "$path" | $GREP " "`
60766      if test "x$has_space" != x; then
60767        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60768$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60769        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60770      fi
60771
60772      # Use eval to expand a potential ~
60773      eval path="$path"
60774      if test ! -f "$path" && test ! -d "$path"; then
60775        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60776      fi
60777
60778      if test -d "$path"; then
60779        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60780      else
60781        dir="`$DIRNAME "$path"`"
60782        base="`$BASENAME "$path"`"
60783        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60784      fi
60785    fi
60786  fi
60787
60788
60789    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60791$as_echo_n "checking for freetype includes... " >&6; }
60792    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60793$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60794    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60796$as_echo_n "checking for freetype libraries... " >&6; }
60797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60798$as_echo "$FREETYPE_LIB_PATH" >&6; }
60799  fi
60800
60801            fi
60802          fi
60803
60804          if test "x$FOUND_FREETYPE" != xyes; then
60805            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
60806
60807  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60808  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60809  METHOD="well-known location"
60810
60811  # Let's start with an optimistic view of the world :-)
60812  FOUND_FREETYPE=yes
60813
60814  # First look for the canonical freetype main include file ft2build.h.
60815  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60816    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60817    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60818    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60819      # Fail.
60820      FOUND_FREETYPE=no
60821    fi
60822  fi
60823
60824  if test "x$FOUND_FREETYPE" = xyes; then
60825    # Include file found, let's continue the sanity check.
60826    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60827$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60828
60829    # Reset to default value
60830    FREETYPE_BASE_NAME=freetype
60831    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60832    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60833      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60834          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60835        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60836        # for the .6 version explicitly.
60837        FREETYPE_BASE_NAME=freetype.6
60838        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60839        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60840$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60841      else
60842        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60843$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60844        FOUND_FREETYPE=no
60845      fi
60846    else
60847      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60848        # On Windows, we will need both .lib and .dll file.
60849        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60850          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60851$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60852          FOUND_FREETYPE=no
60853        fi
60854      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60855          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60856        # Found lib in isa dir, use that instead.
60857        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60858        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60859$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60860      fi
60861    fi
60862  fi
60863
60864  if test "x$FOUND_FREETYPE" = xyes; then
60865
60866  # Only process if variable expands to non-empty
60867
60868  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60869    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60870
60871  # Input might be given as Windows format, start by converting to
60872  # unix format.
60873  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60874  new_path=`$CYGPATH -u "$path"`
60875
60876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60879  # "foo.exe" is OK but "foo" is an error.
60880  #
60881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60882  # It is also a way to make sure we got the proper file name for the real test later on.
60883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60884  if test "x$test_shortpath" = x; then
60885    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60886$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60887    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60888  fi
60889
60890  # Call helper function which possibly converts this using DOS-style short mode.
60891  # If so, the updated path is stored in $new_path.
60892
60893  input_path="$new_path"
60894  # Check if we need to convert this using DOS-style short mode. If the path
60895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60896  # take no chances and rewrite it.
60897  # Note: m4 eats our [], so we need to use [ and ] instead.
60898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60899  if test "x$has_forbidden_chars" != x; then
60900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60901    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60902    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60903    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60904      # Going to short mode and back again did indeed matter. Since short mode is
60905      # case insensitive, let's make it lowercase to improve readability.
60906      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60907      # Now convert it back to Unix-style (cygpath)
60908      input_path=`$CYGPATH -u "$shortmode_path"`
60909      new_path="$input_path"
60910    fi
60911  fi
60912
60913  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60914  if test "x$test_cygdrive_prefix" = x; then
60915    # As a simple fix, exclude /usr/bin since it's not a real path.
60916    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60917      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60918      # a path prefixed by /cygdrive for fixpath to work.
60919      new_path="$CYGWIN_ROOT_PATH$input_path"
60920    fi
60921  fi
60922
60923
60924  if test "x$path" != "x$new_path"; then
60925    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60926    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60927$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60928  fi
60929
60930    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60931
60932  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60933  has_colon=`$ECHO $path | $GREP ^.:`
60934  new_path="$path"
60935  if test "x$has_colon" = x; then
60936    # Not in mixed or Windows style, start by that.
60937    new_path=`cmd //c echo $path`
60938  fi
60939
60940
60941  input_path="$new_path"
60942  # Check if we need to convert this using DOS-style short mode. If the path
60943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60944  # take no chances and rewrite it.
60945  # Note: m4 eats our [], so we need to use [ and ] instead.
60946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60947  if test "x$has_forbidden_chars" != x; then
60948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60950  fi
60951
60952
60953  windows_path="$new_path"
60954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60955    unix_path=`$CYGPATH -u "$windows_path"`
60956    new_path="$unix_path"
60957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60959    new_path="$unix_path"
60960  fi
60961
60962  if test "x$path" != "x$new_path"; then
60963    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60965$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60966  fi
60967
60968  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60969  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60970
60971    else
60972      # We're on a unix platform. Hooray! :)
60973      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60974      has_space=`$ECHO "$path" | $GREP " "`
60975      if test "x$has_space" != x; then
60976        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60978        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60979      fi
60980
60981      # Use eval to expand a potential ~
60982      eval path="$path"
60983      if test ! -f "$path" && test ! -d "$path"; then
60984        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60985      fi
60986
60987      if test -d "$path"; then
60988        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60989      else
60990        dir="`$DIRNAME "$path"`"
60991        base="`$BASENAME "$path"`"
60992        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60993      fi
60994    fi
60995  fi
60996
60997
60998  # Only process if variable expands to non-empty
60999
61000  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61002
61003  # Input might be given as Windows format, start by converting to
61004  # unix format.
61005  path="$POTENTIAL_FREETYPE_LIB_PATH"
61006  new_path=`$CYGPATH -u "$path"`
61007
61008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61011  # "foo.exe" is OK but "foo" is an error.
61012  #
61013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61014  # It is also a way to make sure we got the proper file name for the real test later on.
61015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61016  if test "x$test_shortpath" = x; then
61017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61018$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61019    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61020  fi
61021
61022  # Call helper function which possibly converts this using DOS-style short mode.
61023  # If so, the updated path is stored in $new_path.
61024
61025  input_path="$new_path"
61026  # Check if we need to convert this using DOS-style short mode. If the path
61027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61028  # take no chances and rewrite it.
61029  # Note: m4 eats our [], so we need to use [ and ] instead.
61030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61031  if test "x$has_forbidden_chars" != x; then
61032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61036      # Going to short mode and back again did indeed matter. Since short mode is
61037      # case insensitive, let's make it lowercase to improve readability.
61038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61039      # Now convert it back to Unix-style (cygpath)
61040      input_path=`$CYGPATH -u "$shortmode_path"`
61041      new_path="$input_path"
61042    fi
61043  fi
61044
61045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61046  if test "x$test_cygdrive_prefix" = x; then
61047    # As a simple fix, exclude /usr/bin since it's not a real path.
61048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61050      # a path prefixed by /cygdrive for fixpath to work.
61051      new_path="$CYGWIN_ROOT_PATH$input_path"
61052    fi
61053  fi
61054
61055
61056  if test "x$path" != "x$new_path"; then
61057    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61059$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61060  fi
61061
61062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61063
61064  path="$POTENTIAL_FREETYPE_LIB_PATH"
61065  has_colon=`$ECHO $path | $GREP ^.:`
61066  new_path="$path"
61067  if test "x$has_colon" = x; then
61068    # Not in mixed or Windows style, start by that.
61069    new_path=`cmd //c echo $path`
61070  fi
61071
61072
61073  input_path="$new_path"
61074  # Check if we need to convert this using DOS-style short mode. If the path
61075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61076  # take no chances and rewrite it.
61077  # Note: m4 eats our [], so we need to use [ and ] instead.
61078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61079  if test "x$has_forbidden_chars" != x; then
61080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61082  fi
61083
61084
61085  windows_path="$new_path"
61086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61087    unix_path=`$CYGPATH -u "$windows_path"`
61088    new_path="$unix_path"
61089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61091    new_path="$unix_path"
61092  fi
61093
61094  if test "x$path" != "x$new_path"; then
61095    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61097$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61098  fi
61099
61100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61102
61103    else
61104      # We're on a unix platform. Hooray! :)
61105      path="$POTENTIAL_FREETYPE_LIB_PATH"
61106      has_space=`$ECHO "$path" | $GREP " "`
61107      if test "x$has_space" != x; then
61108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61111      fi
61112
61113      # Use eval to expand a potential ~
61114      eval path="$path"
61115      if test ! -f "$path" && test ! -d "$path"; then
61116        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61117      fi
61118
61119      if test -d "$path"; then
61120        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61121      else
61122        dir="`$DIRNAME "$path"`"
61123        base="`$BASENAME "$path"`"
61124        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61125      fi
61126    fi
61127  fi
61128
61129
61130    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61132$as_echo_n "checking for freetype includes... " >&6; }
61133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61134$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61135    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61137$as_echo_n "checking for freetype libraries... " >&6; }
61138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61139$as_echo "$FREETYPE_LIB_PATH" >&6; }
61140  fi
61141
61142          fi
61143
61144          if test "x$FOUND_FREETYPE" != xyes; then
61145            FREETYPE_BASE_DIR="$SYSROOT/usr"
61146            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61147
61148  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61149  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61150  METHOD="well-known location"
61151
61152  # Let's start with an optimistic view of the world :-)
61153  FOUND_FREETYPE=yes
61154
61155  # First look for the canonical freetype main include file ft2build.h.
61156  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61157    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61158    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61159    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61160      # Fail.
61161      FOUND_FREETYPE=no
61162    fi
61163  fi
61164
61165  if test "x$FOUND_FREETYPE" = xyes; then
61166    # Include file found, let's continue the sanity check.
61167    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61168$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61169
61170    # Reset to default value
61171    FREETYPE_BASE_NAME=freetype
61172    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61173    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61174      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61175          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61176        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61177        # for the .6 version explicitly.
61178        FREETYPE_BASE_NAME=freetype.6
61179        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61180        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61181$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61182      else
61183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61184$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61185        FOUND_FREETYPE=no
61186      fi
61187    else
61188      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61189        # On Windows, we will need both .lib and .dll file.
61190        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61191          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61193          FOUND_FREETYPE=no
61194        fi
61195      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61196          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61197        # Found lib in isa dir, use that instead.
61198        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61199        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61200$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61201      fi
61202    fi
61203  fi
61204
61205  if test "x$FOUND_FREETYPE" = xyes; then
61206
61207  # Only process if variable expands to non-empty
61208
61209  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61211
61212  # Input might be given as Windows format, start by converting to
61213  # unix format.
61214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61215  new_path=`$CYGPATH -u "$path"`
61216
61217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61220  # "foo.exe" is OK but "foo" is an error.
61221  #
61222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61223  # It is also a way to make sure we got the proper file name for the real test later on.
61224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61225  if test "x$test_shortpath" = x; then
61226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61228    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61229  fi
61230
61231  # Call helper function which possibly converts this using DOS-style short mode.
61232  # If so, the updated path is stored in $new_path.
61233
61234  input_path="$new_path"
61235  # Check if we need to convert this using DOS-style short mode. If the path
61236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61237  # take no chances and rewrite it.
61238  # Note: m4 eats our [], so we need to use [ and ] instead.
61239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61240  if test "x$has_forbidden_chars" != x; then
61241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61245      # Going to short mode and back again did indeed matter. Since short mode is
61246      # case insensitive, let's make it lowercase to improve readability.
61247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61248      # Now convert it back to Unix-style (cygpath)
61249      input_path=`$CYGPATH -u "$shortmode_path"`
61250      new_path="$input_path"
61251    fi
61252  fi
61253
61254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61255  if test "x$test_cygdrive_prefix" = x; then
61256    # As a simple fix, exclude /usr/bin since it's not a real path.
61257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61259      # a path prefixed by /cygdrive for fixpath to work.
61260      new_path="$CYGWIN_ROOT_PATH$input_path"
61261    fi
61262  fi
61263
61264
61265  if test "x$path" != "x$new_path"; then
61266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61269  fi
61270
61271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61272
61273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61274  has_colon=`$ECHO $path | $GREP ^.:`
61275  new_path="$path"
61276  if test "x$has_colon" = x; then
61277    # Not in mixed or Windows style, start by that.
61278    new_path=`cmd //c echo $path`
61279  fi
61280
61281
61282  input_path="$new_path"
61283  # Check if we need to convert this using DOS-style short mode. If the path
61284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61285  # take no chances and rewrite it.
61286  # Note: m4 eats our [], so we need to use [ and ] instead.
61287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61288  if test "x$has_forbidden_chars" != x; then
61289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61291  fi
61292
61293
61294  windows_path="$new_path"
61295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61296    unix_path=`$CYGPATH -u "$windows_path"`
61297    new_path="$unix_path"
61298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61300    new_path="$unix_path"
61301  fi
61302
61303  if test "x$path" != "x$new_path"; then
61304    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61307  fi
61308
61309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61311
61312    else
61313      # We're on a unix platform. Hooray! :)
61314      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61315      has_space=`$ECHO "$path" | $GREP " "`
61316      if test "x$has_space" != x; then
61317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61320      fi
61321
61322      # Use eval to expand a potential ~
61323      eval path="$path"
61324      if test ! -f "$path" && test ! -d "$path"; then
61325        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61326      fi
61327
61328      if test -d "$path"; then
61329        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61330      else
61331        dir="`$DIRNAME "$path"`"
61332        base="`$BASENAME "$path"`"
61333        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61334      fi
61335    fi
61336  fi
61337
61338
61339  # Only process if variable expands to non-empty
61340
61341  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61343
61344  # Input might be given as Windows format, start by converting to
61345  # unix format.
61346  path="$POTENTIAL_FREETYPE_LIB_PATH"
61347  new_path=`$CYGPATH -u "$path"`
61348
61349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61352  # "foo.exe" is OK but "foo" is an error.
61353  #
61354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61355  # It is also a way to make sure we got the proper file name for the real test later on.
61356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61357  if test "x$test_shortpath" = x; then
61358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61359$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61360    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61361  fi
61362
61363  # Call helper function which possibly converts this using DOS-style short mode.
61364  # If so, the updated path is stored in $new_path.
61365
61366  input_path="$new_path"
61367  # Check if we need to convert this using DOS-style short mode. If the path
61368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61369  # take no chances and rewrite it.
61370  # Note: m4 eats our [], so we need to use [ and ] instead.
61371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61372  if test "x$has_forbidden_chars" != x; then
61373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61377      # Going to short mode and back again did indeed matter. Since short mode is
61378      # case insensitive, let's make it lowercase to improve readability.
61379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61380      # Now convert it back to Unix-style (cygpath)
61381      input_path=`$CYGPATH -u "$shortmode_path"`
61382      new_path="$input_path"
61383    fi
61384  fi
61385
61386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61387  if test "x$test_cygdrive_prefix" = x; then
61388    # As a simple fix, exclude /usr/bin since it's not a real path.
61389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61391      # a path prefixed by /cygdrive for fixpath to work.
61392      new_path="$CYGWIN_ROOT_PATH$input_path"
61393    fi
61394  fi
61395
61396
61397  if test "x$path" != "x$new_path"; then
61398    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61400$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61401  fi
61402
61403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61404
61405  path="$POTENTIAL_FREETYPE_LIB_PATH"
61406  has_colon=`$ECHO $path | $GREP ^.:`
61407  new_path="$path"
61408  if test "x$has_colon" = x; then
61409    # Not in mixed or Windows style, start by that.
61410    new_path=`cmd //c echo $path`
61411  fi
61412
61413
61414  input_path="$new_path"
61415  # Check if we need to convert this using DOS-style short mode. If the path
61416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61417  # take no chances and rewrite it.
61418  # Note: m4 eats our [], so we need to use [ and ] instead.
61419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61420  if test "x$has_forbidden_chars" != x; then
61421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61423  fi
61424
61425
61426  windows_path="$new_path"
61427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61428    unix_path=`$CYGPATH -u "$windows_path"`
61429    new_path="$unix_path"
61430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61432    new_path="$unix_path"
61433  fi
61434
61435  if test "x$path" != "x$new_path"; then
61436    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61437    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61438$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61439  fi
61440
61441  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61443
61444    else
61445      # We're on a unix platform. Hooray! :)
61446      path="$POTENTIAL_FREETYPE_LIB_PATH"
61447      has_space=`$ECHO "$path" | $GREP " "`
61448      if test "x$has_space" != x; then
61449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61452      fi
61453
61454      # Use eval to expand a potential ~
61455      eval path="$path"
61456      if test ! -f "$path" && test ! -d "$path"; then
61457        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61458      fi
61459
61460      if test -d "$path"; then
61461        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61462      else
61463        dir="`$DIRNAME "$path"`"
61464        base="`$BASENAME "$path"`"
61465        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61466      fi
61467    fi
61468  fi
61469
61470
61471    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61473$as_echo_n "checking for freetype includes... " >&6; }
61474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61475$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61476    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61478$as_echo_n "checking for freetype libraries... " >&6; }
61479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61480$as_echo "$FREETYPE_LIB_PATH" >&6; }
61481  fi
61482
61483            else
61484
61485  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61486  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61487  METHOD="well-known location"
61488
61489  # Let's start with an optimistic view of the world :-)
61490  FOUND_FREETYPE=yes
61491
61492  # First look for the canonical freetype main include file ft2build.h.
61493  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61494    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61495    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61496    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61497      # Fail.
61498      FOUND_FREETYPE=no
61499    fi
61500  fi
61501
61502  if test "x$FOUND_FREETYPE" = xyes; then
61503    # Include file found, let's continue the sanity check.
61504    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61505$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61506
61507    # Reset to default value
61508    FREETYPE_BASE_NAME=freetype
61509    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61510    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61511      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61512          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61513        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61514        # for the .6 version explicitly.
61515        FREETYPE_BASE_NAME=freetype.6
61516        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61517        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61518$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61519      else
61520        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61521$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61522        FOUND_FREETYPE=no
61523      fi
61524    else
61525      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61526        # On Windows, we will need both .lib and .dll file.
61527        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61528          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61529$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61530          FOUND_FREETYPE=no
61531        fi
61532      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61533          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61534        # Found lib in isa dir, use that instead.
61535        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61536        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61537$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61538      fi
61539    fi
61540  fi
61541
61542  if test "x$FOUND_FREETYPE" = xyes; then
61543
61544  # Only process if variable expands to non-empty
61545
61546  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61547    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61548
61549  # Input might be given as Windows format, start by converting to
61550  # unix format.
61551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61552  new_path=`$CYGPATH -u "$path"`
61553
61554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61557  # "foo.exe" is OK but "foo" is an error.
61558  #
61559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61560  # It is also a way to make sure we got the proper file name for the real test later on.
61561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61562  if test "x$test_shortpath" = x; then
61563    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61564$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61565    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61566  fi
61567
61568  # Call helper function which possibly converts this using DOS-style short mode.
61569  # If so, the updated path is stored in $new_path.
61570
61571  input_path="$new_path"
61572  # Check if we need to convert this using DOS-style short mode. If the path
61573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61574  # take no chances and rewrite it.
61575  # Note: m4 eats our [], so we need to use [ and ] instead.
61576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61577  if test "x$has_forbidden_chars" != x; then
61578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61579    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61580    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61581    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61582      # Going to short mode and back again did indeed matter. Since short mode is
61583      # case insensitive, let's make it lowercase to improve readability.
61584      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61585      # Now convert it back to Unix-style (cygpath)
61586      input_path=`$CYGPATH -u "$shortmode_path"`
61587      new_path="$input_path"
61588    fi
61589  fi
61590
61591  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61592  if test "x$test_cygdrive_prefix" = x; then
61593    # As a simple fix, exclude /usr/bin since it's not a real path.
61594    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61595      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61596      # a path prefixed by /cygdrive for fixpath to work.
61597      new_path="$CYGWIN_ROOT_PATH$input_path"
61598    fi
61599  fi
61600
61601
61602  if test "x$path" != "x$new_path"; then
61603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61606  fi
61607
61608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61609
61610  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61611  has_colon=`$ECHO $path | $GREP ^.:`
61612  new_path="$path"
61613  if test "x$has_colon" = x; then
61614    # Not in mixed or Windows style, start by that.
61615    new_path=`cmd //c echo $path`
61616  fi
61617
61618
61619  input_path="$new_path"
61620  # Check if we need to convert this using DOS-style short mode. If the path
61621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61622  # take no chances and rewrite it.
61623  # Note: m4 eats our [], so we need to use [ and ] instead.
61624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61625  if test "x$has_forbidden_chars" != x; then
61626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61628  fi
61629
61630
61631  windows_path="$new_path"
61632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61633    unix_path=`$CYGPATH -u "$windows_path"`
61634    new_path="$unix_path"
61635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61636    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61637    new_path="$unix_path"
61638  fi
61639
61640  if test "x$path" != "x$new_path"; then
61641    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61642    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61643$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61644  fi
61645
61646  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61647  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61648
61649    else
61650      # We're on a unix platform. Hooray! :)
61651      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61652      has_space=`$ECHO "$path" | $GREP " "`
61653      if test "x$has_space" != x; then
61654        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61655$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61656        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61657      fi
61658
61659      # Use eval to expand a potential ~
61660      eval path="$path"
61661      if test ! -f "$path" && test ! -d "$path"; then
61662        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61663      fi
61664
61665      if test -d "$path"; then
61666        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61667      else
61668        dir="`$DIRNAME "$path"`"
61669        base="`$BASENAME "$path"`"
61670        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61671      fi
61672    fi
61673  fi
61674
61675
61676  # Only process if variable expands to non-empty
61677
61678  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61679    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61680
61681  # Input might be given as Windows format, start by converting to
61682  # unix format.
61683  path="$POTENTIAL_FREETYPE_LIB_PATH"
61684  new_path=`$CYGPATH -u "$path"`
61685
61686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61689  # "foo.exe" is OK but "foo" is an error.
61690  #
61691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61692  # It is also a way to make sure we got the proper file name for the real test later on.
61693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61694  if test "x$test_shortpath" = x; then
61695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61697    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61698  fi
61699
61700  # Call helper function which possibly converts this using DOS-style short mode.
61701  # If so, the updated path is stored in $new_path.
61702
61703  input_path="$new_path"
61704  # Check if we need to convert this using DOS-style short mode. If the path
61705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61706  # take no chances and rewrite it.
61707  # Note: m4 eats our [], so we need to use [ and ] instead.
61708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61709  if test "x$has_forbidden_chars" != x; then
61710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61714      # Going to short mode and back again did indeed matter. Since short mode is
61715      # case insensitive, let's make it lowercase to improve readability.
61716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61717      # Now convert it back to Unix-style (cygpath)
61718      input_path=`$CYGPATH -u "$shortmode_path"`
61719      new_path="$input_path"
61720    fi
61721  fi
61722
61723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61724  if test "x$test_cygdrive_prefix" = x; then
61725    # As a simple fix, exclude /usr/bin since it's not a real path.
61726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61728      # a path prefixed by /cygdrive for fixpath to work.
61729      new_path="$CYGWIN_ROOT_PATH$input_path"
61730    fi
61731  fi
61732
61733
61734  if test "x$path" != "x$new_path"; then
61735    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61737$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61738  fi
61739
61740    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61741
61742  path="$POTENTIAL_FREETYPE_LIB_PATH"
61743  has_colon=`$ECHO $path | $GREP ^.:`
61744  new_path="$path"
61745  if test "x$has_colon" = x; then
61746    # Not in mixed or Windows style, start by that.
61747    new_path=`cmd //c echo $path`
61748  fi
61749
61750
61751  input_path="$new_path"
61752  # Check if we need to convert this using DOS-style short mode. If the path
61753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61754  # take no chances and rewrite it.
61755  # Note: m4 eats our [], so we need to use [ and ] instead.
61756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61757  if test "x$has_forbidden_chars" != x; then
61758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61760  fi
61761
61762
61763  windows_path="$new_path"
61764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61765    unix_path=`$CYGPATH -u "$windows_path"`
61766    new_path="$unix_path"
61767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61769    new_path="$unix_path"
61770  fi
61771
61772  if test "x$path" != "x$new_path"; then
61773    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61775$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61776  fi
61777
61778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61780
61781    else
61782      # We're on a unix platform. Hooray! :)
61783      path="$POTENTIAL_FREETYPE_LIB_PATH"
61784      has_space=`$ECHO "$path" | $GREP " "`
61785      if test "x$has_space" != x; then
61786        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61788        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61789      fi
61790
61791      # Use eval to expand a potential ~
61792      eval path="$path"
61793      if test ! -f "$path" && test ! -d "$path"; then
61794        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61795      fi
61796
61797      if test -d "$path"; then
61798        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61799      else
61800        dir="`$DIRNAME "$path"`"
61801        base="`$BASENAME "$path"`"
61802        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61803      fi
61804    fi
61805  fi
61806
61807
61808    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61810$as_echo_n "checking for freetype includes... " >&6; }
61811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61812$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61813    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61815$as_echo_n "checking for freetype libraries... " >&6; }
61816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61817$as_echo "$FREETYPE_LIB_PATH" >&6; }
61818  fi
61819
61820              if test "x$FOUND_FREETYPE" != xyes; then
61821
61822  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61823  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61824  METHOD="well-known location"
61825
61826  # Let's start with an optimistic view of the world :-)
61827  FOUND_FREETYPE=yes
61828
61829  # First look for the canonical freetype main include file ft2build.h.
61830  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61831    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61832    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61833    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61834      # Fail.
61835      FOUND_FREETYPE=no
61836    fi
61837  fi
61838
61839  if test "x$FOUND_FREETYPE" = xyes; then
61840    # Include file found, let's continue the sanity check.
61841    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61842$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61843
61844    # Reset to default value
61845    FREETYPE_BASE_NAME=freetype
61846    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61847    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61848      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61849          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61850        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61851        # for the .6 version explicitly.
61852        FREETYPE_BASE_NAME=freetype.6
61853        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61854        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61855$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61856      else
61857        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61858$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61859        FOUND_FREETYPE=no
61860      fi
61861    else
61862      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61863        # On Windows, we will need both .lib and .dll file.
61864        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61865          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61867          FOUND_FREETYPE=no
61868        fi
61869      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61871        # Found lib in isa dir, use that instead.
61872        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61873        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61874$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61875      fi
61876    fi
61877  fi
61878
61879  if test "x$FOUND_FREETYPE" = xyes; then
61880
61881  # Only process if variable expands to non-empty
61882
61883  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61885
61886  # Input might be given as Windows format, start by converting to
61887  # unix format.
61888  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61889  new_path=`$CYGPATH -u "$path"`
61890
61891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61894  # "foo.exe" is OK but "foo" is an error.
61895  #
61896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61897  # It is also a way to make sure we got the proper file name for the real test later on.
61898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61899  if test "x$test_shortpath" = x; then
61900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61903  fi
61904
61905  # Call helper function which possibly converts this using DOS-style short mode.
61906  # If so, the updated path is stored in $new_path.
61907
61908  input_path="$new_path"
61909  # Check if we need to convert this using DOS-style short mode. If the path
61910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61911  # take no chances and rewrite it.
61912  # Note: m4 eats our [], so we need to use [ and ] instead.
61913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61914  if test "x$has_forbidden_chars" != x; then
61915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61919      # Going to short mode and back again did indeed matter. Since short mode is
61920      # case insensitive, let's make it lowercase to improve readability.
61921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61922      # Now convert it back to Unix-style (cygpath)
61923      input_path=`$CYGPATH -u "$shortmode_path"`
61924      new_path="$input_path"
61925    fi
61926  fi
61927
61928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61929  if test "x$test_cygdrive_prefix" = x; then
61930    # As a simple fix, exclude /usr/bin since it's not a real path.
61931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61933      # a path prefixed by /cygdrive for fixpath to work.
61934      new_path="$CYGWIN_ROOT_PATH$input_path"
61935    fi
61936  fi
61937
61938
61939  if test "x$path" != "x$new_path"; then
61940    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61943  fi
61944
61945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61946
61947  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61948  has_colon=`$ECHO $path | $GREP ^.:`
61949  new_path="$path"
61950  if test "x$has_colon" = x; then
61951    # Not in mixed or Windows style, start by that.
61952    new_path=`cmd //c echo $path`
61953  fi
61954
61955
61956  input_path="$new_path"
61957  # Check if we need to convert this using DOS-style short mode. If the path
61958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61959  # take no chances and rewrite it.
61960  # Note: m4 eats our [], so we need to use [ and ] instead.
61961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61962  if test "x$has_forbidden_chars" != x; then
61963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61965  fi
61966
61967
61968  windows_path="$new_path"
61969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61970    unix_path=`$CYGPATH -u "$windows_path"`
61971    new_path="$unix_path"
61972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61974    new_path="$unix_path"
61975  fi
61976
61977  if test "x$path" != "x$new_path"; then
61978    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61981  fi
61982
61983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61985
61986    else
61987      # We're on a unix platform. Hooray! :)
61988      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61989      has_space=`$ECHO "$path" | $GREP " "`
61990      if test "x$has_space" != x; then
61991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61994      fi
61995
61996      # Use eval to expand a potential ~
61997      eval path="$path"
61998      if test ! -f "$path" && test ! -d "$path"; then
61999        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62000      fi
62001
62002      if test -d "$path"; then
62003        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62004      else
62005        dir="`$DIRNAME "$path"`"
62006        base="`$BASENAME "$path"`"
62007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62008      fi
62009    fi
62010  fi
62011
62012
62013  # Only process if variable expands to non-empty
62014
62015  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62017
62018  # Input might be given as Windows format, start by converting to
62019  # unix format.
62020  path="$POTENTIAL_FREETYPE_LIB_PATH"
62021  new_path=`$CYGPATH -u "$path"`
62022
62023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62026  # "foo.exe" is OK but "foo" is an error.
62027  #
62028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62029  # It is also a way to make sure we got the proper file name for the real test later on.
62030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62031  if test "x$test_shortpath" = x; then
62032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62034    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62035  fi
62036
62037  # Call helper function which possibly converts this using DOS-style short mode.
62038  # If so, the updated path is stored in $new_path.
62039
62040  input_path="$new_path"
62041  # Check if we need to convert this using DOS-style short mode. If the path
62042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62043  # take no chances and rewrite it.
62044  # Note: m4 eats our [], so we need to use [ and ] instead.
62045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62046  if test "x$has_forbidden_chars" != x; then
62047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62051      # Going to short mode and back again did indeed matter. Since short mode is
62052      # case insensitive, let's make it lowercase to improve readability.
62053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62054      # Now convert it back to Unix-style (cygpath)
62055      input_path=`$CYGPATH -u "$shortmode_path"`
62056      new_path="$input_path"
62057    fi
62058  fi
62059
62060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62061  if test "x$test_cygdrive_prefix" = x; then
62062    # As a simple fix, exclude /usr/bin since it's not a real path.
62063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62065      # a path prefixed by /cygdrive for fixpath to work.
62066      new_path="$CYGWIN_ROOT_PATH$input_path"
62067    fi
62068  fi
62069
62070
62071  if test "x$path" != "x$new_path"; then
62072    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62075  fi
62076
62077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62078
62079  path="$POTENTIAL_FREETYPE_LIB_PATH"
62080  has_colon=`$ECHO $path | $GREP ^.:`
62081  new_path="$path"
62082  if test "x$has_colon" = x; then
62083    # Not in mixed or Windows style, start by that.
62084    new_path=`cmd //c echo $path`
62085  fi
62086
62087
62088  input_path="$new_path"
62089  # Check if we need to convert this using DOS-style short mode. If the path
62090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62091  # take no chances and rewrite it.
62092  # Note: m4 eats our [], so we need to use [ and ] instead.
62093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62094  if test "x$has_forbidden_chars" != x; then
62095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62097  fi
62098
62099
62100  windows_path="$new_path"
62101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62102    unix_path=`$CYGPATH -u "$windows_path"`
62103    new_path="$unix_path"
62104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62106    new_path="$unix_path"
62107  fi
62108
62109  if test "x$path" != "x$new_path"; then
62110    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62112$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62113  fi
62114
62115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62117
62118    else
62119      # We're on a unix platform. Hooray! :)
62120      path="$POTENTIAL_FREETYPE_LIB_PATH"
62121      has_space=`$ECHO "$path" | $GREP " "`
62122      if test "x$has_space" != x; then
62123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62124$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62126      fi
62127
62128      # Use eval to expand a potential ~
62129      eval path="$path"
62130      if test ! -f "$path" && test ! -d "$path"; then
62131        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62132      fi
62133
62134      if test -d "$path"; then
62135        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62136      else
62137        dir="`$DIRNAME "$path"`"
62138        base="`$BASENAME "$path"`"
62139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62140      fi
62141    fi
62142  fi
62143
62144
62145    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62147$as_echo_n "checking for freetype includes... " >&6; }
62148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62149$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62150    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62152$as_echo_n "checking for freetype libraries... " >&6; }
62153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62154$as_echo "$FREETYPE_LIB_PATH" >&6; }
62155  fi
62156
62157              fi
62158            fi
62159          fi
62160        fi
62161      fi # end check in well-known locations
62162
62163      if test "x$FOUND_FREETYPE" != xyes; then
62164
62165  # Print a helpful message on how to acquire the necessary build dependency.
62166  # freetype is the help tag: freetype, cups, alsa etc
62167  MISSING_DEPENDENCY=freetype
62168
62169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62170    cygwin_help $MISSING_DEPENDENCY
62171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62172    msys_help $MISSING_DEPENDENCY
62173  else
62174    PKGHANDLER_COMMAND=
62175
62176    case $PKGHANDLER in
62177      apt-get)
62178        apt_help     $MISSING_DEPENDENCY ;;
62179      yum)
62180        yum_help     $MISSING_DEPENDENCY ;;
62181      port)
62182        port_help    $MISSING_DEPENDENCY ;;
62183      pkgutil)
62184        pkgutil_help $MISSING_DEPENDENCY ;;
62185      pkgadd)
62186        pkgadd_help  $MISSING_DEPENDENCY ;;
62187    esac
62188
62189    if test "x$PKGHANDLER_COMMAND" != x; then
62190      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62191    fi
62192  fi
62193
62194        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62195      fi
62196    fi # end user specified settings
62197
62198    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62199    if test "x$FREETYPE_CFLAGS" = x; then
62200
62201  # Only process if variable expands to non-empty
62202
62203  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62205
62206  # Input might be given as Windows format, start by converting to
62207  # unix format.
62208  path="$FREETYPE_INCLUDE_PATH"
62209  new_path=`$CYGPATH -u "$path"`
62210
62211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62214  # "foo.exe" is OK but "foo" is an error.
62215  #
62216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62217  # It is also a way to make sure we got the proper file name for the real test later on.
62218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62219  if test "x$test_shortpath" = x; then
62220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62221$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62222    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62223  fi
62224
62225  # Call helper function which possibly converts this using DOS-style short mode.
62226  # If so, the updated path is stored in $new_path.
62227
62228  input_path="$new_path"
62229  # Check if we need to convert this using DOS-style short mode. If the path
62230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62231  # take no chances and rewrite it.
62232  # Note: m4 eats our [], so we need to use [ and ] instead.
62233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62234  if test "x$has_forbidden_chars" != x; then
62235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62239      # Going to short mode and back again did indeed matter. Since short mode is
62240      # case insensitive, let's make it lowercase to improve readability.
62241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62242      # Now convert it back to Unix-style (cygpath)
62243      input_path=`$CYGPATH -u "$shortmode_path"`
62244      new_path="$input_path"
62245    fi
62246  fi
62247
62248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62249  if test "x$test_cygdrive_prefix" = x; then
62250    # As a simple fix, exclude /usr/bin since it's not a real path.
62251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62253      # a path prefixed by /cygdrive for fixpath to work.
62254      new_path="$CYGWIN_ROOT_PATH$input_path"
62255    fi
62256  fi
62257
62258
62259  if test "x$path" != "x$new_path"; then
62260    FREETYPE_INCLUDE_PATH="$new_path"
62261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62262$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62263  fi
62264
62265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62266
62267  path="$FREETYPE_INCLUDE_PATH"
62268  has_colon=`$ECHO $path | $GREP ^.:`
62269  new_path="$path"
62270  if test "x$has_colon" = x; then
62271    # Not in mixed or Windows style, start by that.
62272    new_path=`cmd //c echo $path`
62273  fi
62274
62275
62276  input_path="$new_path"
62277  # Check if we need to convert this using DOS-style short mode. If the path
62278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62279  # take no chances and rewrite it.
62280  # Note: m4 eats our [], so we need to use [ and ] instead.
62281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62282  if test "x$has_forbidden_chars" != x; then
62283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62285  fi
62286
62287
62288  windows_path="$new_path"
62289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62290    unix_path=`$CYGPATH -u "$windows_path"`
62291    new_path="$unix_path"
62292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62294    new_path="$unix_path"
62295  fi
62296
62297  if test "x$path" != "x$new_path"; then
62298    FREETYPE_INCLUDE_PATH="$new_path"
62299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62300$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62301  fi
62302
62303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62305
62306    else
62307      # We're on a unix platform. Hooray! :)
62308      path="$FREETYPE_INCLUDE_PATH"
62309      has_space=`$ECHO "$path" | $GREP " "`
62310      if test "x$has_space" != x; then
62311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62312$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62314      fi
62315
62316      # Use eval to expand a potential ~
62317      eval path="$path"
62318      if test ! -f "$path" && test ! -d "$path"; then
62319        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62320      fi
62321
62322      if test -d "$path"; then
62323        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62324      else
62325        dir="`$DIRNAME "$path"`"
62326        base="`$BASENAME "$path"`"
62327        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62328      fi
62329    fi
62330  fi
62331
62332      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62333        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62334      else
62335        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62336      fi
62337    fi
62338
62339    if test "x$FREETYPE_LIBS" = x; then
62340
62341  # Only process if variable expands to non-empty
62342
62343  if test "x$FREETYPE_LIB_PATH" != x; then
62344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62345
62346  # Input might be given as Windows format, start by converting to
62347  # unix format.
62348  path="$FREETYPE_LIB_PATH"
62349  new_path=`$CYGPATH -u "$path"`
62350
62351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62354  # "foo.exe" is OK but "foo" is an error.
62355  #
62356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62357  # It is also a way to make sure we got the proper file name for the real test later on.
62358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62359  if test "x$test_shortpath" = x; then
62360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62361$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62362    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62363  fi
62364
62365  # Call helper function which possibly converts this using DOS-style short mode.
62366  # If so, the updated path is stored in $new_path.
62367
62368  input_path="$new_path"
62369  # Check if we need to convert this using DOS-style short mode. If the path
62370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62371  # take no chances and rewrite it.
62372  # Note: m4 eats our [], so we need to use [ and ] instead.
62373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62374  if test "x$has_forbidden_chars" != x; then
62375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62379      # Going to short mode and back again did indeed matter. Since short mode is
62380      # case insensitive, let's make it lowercase to improve readability.
62381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62382      # Now convert it back to Unix-style (cygpath)
62383      input_path=`$CYGPATH -u "$shortmode_path"`
62384      new_path="$input_path"
62385    fi
62386  fi
62387
62388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62389  if test "x$test_cygdrive_prefix" = x; then
62390    # As a simple fix, exclude /usr/bin since it's not a real path.
62391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62393      # a path prefixed by /cygdrive for fixpath to work.
62394      new_path="$CYGWIN_ROOT_PATH$input_path"
62395    fi
62396  fi
62397
62398
62399  if test "x$path" != "x$new_path"; then
62400    FREETYPE_LIB_PATH="$new_path"
62401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62402$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62403  fi
62404
62405    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62406
62407  path="$FREETYPE_LIB_PATH"
62408  has_colon=`$ECHO $path | $GREP ^.:`
62409  new_path="$path"
62410  if test "x$has_colon" = x; then
62411    # Not in mixed or Windows style, start by that.
62412    new_path=`cmd //c echo $path`
62413  fi
62414
62415
62416  input_path="$new_path"
62417  # Check if we need to convert this using DOS-style short mode. If the path
62418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62419  # take no chances and rewrite it.
62420  # Note: m4 eats our [], so we need to use [ and ] instead.
62421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62422  if test "x$has_forbidden_chars" != x; then
62423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62425  fi
62426
62427
62428  windows_path="$new_path"
62429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62430    unix_path=`$CYGPATH -u "$windows_path"`
62431    new_path="$unix_path"
62432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62434    new_path="$unix_path"
62435  fi
62436
62437  if test "x$path" != "x$new_path"; then
62438    FREETYPE_LIB_PATH="$new_path"
62439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62440$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62441  fi
62442
62443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62445
62446    else
62447      # We're on a unix platform. Hooray! :)
62448      path="$FREETYPE_LIB_PATH"
62449      has_space=`$ECHO "$path" | $GREP " "`
62450      if test "x$has_space" != x; then
62451        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62452$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62453        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62454      fi
62455
62456      # Use eval to expand a potential ~
62457      eval path="$path"
62458      if test ! -f "$path" && test ! -d "$path"; then
62459        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62460      fi
62461
62462      if test -d "$path"; then
62463        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62464      else
62465        dir="`$DIRNAME "$path"`"
62466        base="`$BASENAME "$path"`"
62467        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62468      fi
62469    fi
62470  fi
62471
62472      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62473        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62474      else
62475        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62476      fi
62477    fi
62478
62479    # Try to compile it
62480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62481$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62482    ac_ext=cpp
62483ac_cpp='$CXXCPP $CPPFLAGS'
62484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62487
62488    PREV_CXXCFLAGS="$CXXFLAGS"
62489    PREV_LIBS="$LIBS"
62490    PREV_CXX="$CXX"
62491    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62492    LIBS="$LIBS $FREETYPE_LIBS"
62493    CXX="$FIXPATH $CXX"
62494    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62495/* end confdefs.h.  */
62496
62497          #include<ft2build.h>
62498          #include FT_FREETYPE_H
62499          int main () {
62500            FT_Init_FreeType(NULL);
62501            return 0;
62502          }
62503
62504_ACEOF
62505if ac_fn_cxx_try_link "$LINENO"; then :
62506
62507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62508$as_echo "yes" >&6; }
62509
62510else
62511
62512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62513$as_echo "no" >&6; }
62514          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62515$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62516          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62517$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62518
62519
62520  # Print a helpful message on how to acquire the necessary build dependency.
62521  # freetype is the help tag: freetype, cups, alsa etc
62522  MISSING_DEPENDENCY=freetype
62523
62524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62525    cygwin_help $MISSING_DEPENDENCY
62526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62527    msys_help $MISSING_DEPENDENCY
62528  else
62529    PKGHANDLER_COMMAND=
62530
62531    case $PKGHANDLER in
62532      apt-get)
62533        apt_help     $MISSING_DEPENDENCY ;;
62534      yum)
62535        yum_help     $MISSING_DEPENDENCY ;;
62536      port)
62537        port_help    $MISSING_DEPENDENCY ;;
62538      pkgutil)
62539        pkgutil_help $MISSING_DEPENDENCY ;;
62540      pkgadd)
62541        pkgadd_help  $MISSING_DEPENDENCY ;;
62542    esac
62543
62544    if test "x$PKGHANDLER_COMMAND" != x; then
62545      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62546    fi
62547  fi
62548
62549
62550          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62551
62552
62553fi
62554rm -f core conftest.err conftest.$ac_objext \
62555    conftest$ac_exeext conftest.$ac_ext
62556    CXXCFLAGS="$PREV_CXXFLAGS"
62557    LIBS="$PREV_LIBS"
62558    CXX="$PREV_CXX"
62559    ac_ext=cpp
62560ac_cpp='$CXXCPP $CPPFLAGS'
62561ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62562ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62563ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62564
62565
62566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62567$as_echo_n "checking if we should bundle freetype... " >&6; }
62568    if test "x$BUNDLE_FREETYPE" = xyes; then
62569      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62570    fi
62571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62572$as_echo "$BUNDLE_FREETYPE" >&6; }
62573
62574  fi # end freetype needed
62575
62576
62577
62578
62579
62580
62581
62582# Check whether --with-alsa was given.
62583if test "${with_alsa+set}" = set; then :
62584  withval=$with_alsa;
62585fi
62586
62587
62588# Check whether --with-alsa-include was given.
62589if test "${with_alsa_include+set}" = set; then :
62590  withval=$with_alsa_include;
62591fi
62592
62593
62594# Check whether --with-alsa-lib was given.
62595if test "${with_alsa_lib+set}" = set; then :
62596  withval=$with_alsa_lib;
62597fi
62598
62599
62600  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62601    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62602        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62603        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62604      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62605$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62606    fi
62607    ALSA_CFLAGS=
62608    ALSA_LIBS=
62609  else
62610    ALSA_FOUND=no
62611
62612    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62613      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62614    fi
62615
62616    if test "x${with_alsa}" != x; then
62617      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62618      ALSA_CFLAGS="-I${with_alsa}/include"
62619      ALSA_FOUND=yes
62620    fi
62621    if test "x${with_alsa_include}" != x; then
62622      ALSA_CFLAGS="-I${with_alsa_include}"
62623      ALSA_FOUND=yes
62624    fi
62625    if test "x${with_alsa_lib}" != x; then
62626      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62627      ALSA_FOUND=yes
62628    fi
62629    # Do not try pkg-config if we have a sysroot set.
62630    if test "x$SYSROOT" = x; then
62631      if test "x$ALSA_FOUND" = xno; then
62632
62633pkg_failed=no
62634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62635$as_echo_n "checking for ALSA... " >&6; }
62636
62637if test -n "$ALSA_CFLAGS"; then
62638    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62639 elif test -n "$PKG_CONFIG"; then
62640    if test -n "$PKG_CONFIG" && \
62641    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62642  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62643  ac_status=$?
62644  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62645  test $ac_status = 0; }; then
62646  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62647else
62648  pkg_failed=yes
62649fi
62650 else
62651    pkg_failed=untried
62652fi
62653if test -n "$ALSA_LIBS"; then
62654    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
62655 elif test -n "$PKG_CONFIG"; then
62656    if test -n "$PKG_CONFIG" && \
62657    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62658  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62659  ac_status=$?
62660  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62661  test $ac_status = 0; }; then
62662  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
62663else
62664  pkg_failed=yes
62665fi
62666 else
62667    pkg_failed=untried
62668fi
62669
62670
62671
62672if test $pkg_failed = yes; then
62673
62674if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62675        _pkg_short_errors_supported=yes
62676else
62677        _pkg_short_errors_supported=no
62678fi
62679        if test $_pkg_short_errors_supported = yes; then
62680	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
62681        else
62682	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
62683        fi
62684	# Put the nasty error message in config.log where it belongs
62685	echo "$ALSA_PKG_ERRORS" >&5
62686
62687	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62688$as_echo "no" >&6; }
62689                ALSA_FOUND=no
62690elif test $pkg_failed = untried; then
62691	ALSA_FOUND=no
62692else
62693	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
62694	ALSA_LIBS=$pkg_cv_ALSA_LIBS
62695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62696$as_echo "yes" >&6; }
62697	ALSA_FOUND=yes
62698fi
62699      fi
62700    fi
62701    if test "x$ALSA_FOUND" = xno; then
62702      for ac_header in alsa/asoundlib.h
62703do :
62704  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
62705if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
62706  cat >>confdefs.h <<_ACEOF
62707#define HAVE_ALSA_ASOUNDLIB_H 1
62708_ACEOF
62709
62710            ALSA_FOUND=yes
62711            ALSA_CFLAGS=-Iignoreme
62712            ALSA_LIBS=-lasound
62713            DEFAULT_ALSA=yes
62714
62715else
62716  ALSA_FOUND=no
62717
62718fi
62719
62720done
62721
62722    fi
62723    if test "x$ALSA_FOUND" = xno; then
62724
62725  # Print a helpful message on how to acquire the necessary build dependency.
62726  # alsa is the help tag: freetype, cups, alsa etc
62727  MISSING_DEPENDENCY=alsa
62728
62729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62730    cygwin_help $MISSING_DEPENDENCY
62731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62732    msys_help $MISSING_DEPENDENCY
62733  else
62734    PKGHANDLER_COMMAND=
62735
62736    case $PKGHANDLER in
62737      apt-get)
62738        apt_help     $MISSING_DEPENDENCY ;;
62739      yum)
62740        yum_help     $MISSING_DEPENDENCY ;;
62741      port)
62742        port_help    $MISSING_DEPENDENCY ;;
62743      pkgutil)
62744        pkgutil_help $MISSING_DEPENDENCY ;;
62745      pkgadd)
62746        pkgadd_help  $MISSING_DEPENDENCY ;;
62747    esac
62748
62749    if test "x$PKGHANDLER_COMMAND" != x; then
62750      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62751    fi
62752  fi
62753
62754      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
62755    fi
62756  fi
62757
62758
62759
62760
62761
62762
62763# Check whether --with-libffi was given.
62764if test "${with_libffi+set}" = set; then :
62765  withval=$with_libffi;
62766fi
62767
62768
62769# Check whether --with-libffi-include was given.
62770if test "${with_libffi_include+set}" = set; then :
62771  withval=$with_libffi_include;
62772fi
62773
62774
62775# Check whether --with-libffi-lib was given.
62776if test "${with_libffi_lib+set}" = set; then :
62777  withval=$with_libffi_lib;
62778fi
62779
62780
62781  if test "x$NEEDS_LIB_FFI" = xfalse; then
62782    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
62783        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
62784        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
62785      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
62786$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
62787    fi
62788    LIBFFI_CFLAGS=
62789    LIBFFI_LIBS=
62790  else
62791    LIBFFI_FOUND=no
62792
62793    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
62794      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
62795    fi
62796
62797    if test "x${with_libffi}" != x; then
62798      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
62799      LIBFFI_CFLAGS="-I${with_libffi}/include"
62800      LIBFFI_FOUND=yes
62801    fi
62802    if test "x${with_libffi_include}" != x; then
62803      LIBFFI_CFLAGS="-I${with_libffi_include}"
62804      LIBFFI_FOUND=yes
62805    fi
62806    if test "x${with_libffi_lib}" != x; then
62807      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
62808      LIBFFI_FOUND=yes
62809    fi
62810    # Do not try pkg-config if we have a sysroot set.
62811    if test "x$SYSROOT" = x; then
62812      if test "x$LIBFFI_FOUND" = xno; then
62813        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
62814
62815pkg_failed=no
62816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
62817$as_echo_n "checking for LIBFFI... " >&6; }
62818
62819if test -n "$LIBFFI_CFLAGS"; then
62820    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
62821 elif test -n "$PKG_CONFIG"; then
62822    if test -n "$PKG_CONFIG" && \
62823    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62824  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62825  ac_status=$?
62826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62827  test $ac_status = 0; }; then
62828  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
62829else
62830  pkg_failed=yes
62831fi
62832 else
62833    pkg_failed=untried
62834fi
62835if test -n "$LIBFFI_LIBS"; then
62836    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
62837 elif test -n "$PKG_CONFIG"; then
62838    if test -n "$PKG_CONFIG" && \
62839    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
62840  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
62841  ac_status=$?
62842  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62843  test $ac_status = 0; }; then
62844  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
62845else
62846  pkg_failed=yes
62847fi
62848 else
62849    pkg_failed=untried
62850fi
62851
62852
62853
62854if test $pkg_failed = yes; then
62855
62856if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
62857        _pkg_short_errors_supported=yes
62858else
62859        _pkg_short_errors_supported=no
62860fi
62861        if test $_pkg_short_errors_supported = yes; then
62862	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
62863        else
62864	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
62865        fi
62866	# Put the nasty error message in config.log where it belongs
62867	echo "$LIBFFI_PKG_ERRORS" >&5
62868
62869	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62870$as_echo "no" >&6; }
62871                LIBFFI_FOUND=no
62872elif test $pkg_failed = untried; then
62873	LIBFFI_FOUND=no
62874else
62875	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
62876	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
62877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62878$as_echo "yes" >&6; }
62879	LIBFFI_FOUND=yes
62880fi
62881      fi
62882    fi
62883    if test "x$LIBFFI_FOUND" = xno; then
62884      for ac_header in ffi.h
62885do :
62886  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
62887if test "x$ac_cv_header_ffi_h" = xyes; then :
62888  cat >>confdefs.h <<_ACEOF
62889#define HAVE_FFI_H 1
62890_ACEOF
62891
62892            LIBFFI_FOUND=yes
62893            LIBFFI_CFLAGS=
62894            LIBFFI_LIBS=-lffi
62895
62896else
62897  LIBFFI_FOUND=no
62898
62899fi
62900
62901done
62902
62903    fi
62904    if test "x$LIBFFI_FOUND" = xno; then
62905
62906  # Print a helpful message on how to acquire the necessary build dependency.
62907  # ffi is the help tag: freetype, cups, alsa etc
62908  MISSING_DEPENDENCY=ffi
62909
62910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62911    cygwin_help $MISSING_DEPENDENCY
62912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62913    msys_help $MISSING_DEPENDENCY
62914  else
62915    PKGHANDLER_COMMAND=
62916
62917    case $PKGHANDLER in
62918      apt-get)
62919        apt_help     $MISSING_DEPENDENCY ;;
62920      yum)
62921        yum_help     $MISSING_DEPENDENCY ;;
62922      port)
62923        port_help    $MISSING_DEPENDENCY ;;
62924      pkgutil)
62925        pkgutil_help $MISSING_DEPENDENCY ;;
62926      pkgadd)
62927        pkgadd_help  $MISSING_DEPENDENCY ;;
62928    esac
62929
62930    if test "x$PKGHANDLER_COMMAND" != x; then
62931      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62932    fi
62933  fi
62934
62935      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
62936    fi
62937
62938    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
62939$as_echo_n "checking if libffi works... " >&6; }
62940    ac_ext=c
62941ac_cpp='$CPP $CPPFLAGS'
62942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62943ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62944ac_compiler_gnu=$ac_cv_c_compiler_gnu
62945
62946    OLD_CFLAGS="$CFLAGS"
62947    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
62948    OLD_LIBS="$LIBS"
62949    LIBS="$LIBS $LIBFFI_LIBS"
62950    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62951/* end confdefs.h.  */
62952#include <ffi.h>
62953int
62954main ()
62955{
62956
62957          ffi_call(NULL, NULL, NULL, NULL);
62958          return 0;
62959
62960  ;
62961  return 0;
62962}
62963_ACEOF
62964if ac_fn_c_try_link "$LINENO"; then :
62965  LIBFFI_WORKS=yes
62966else
62967  LIBFFI_WORKS=no
62968
62969fi
62970rm -f core conftest.err conftest.$ac_objext \
62971    conftest$ac_exeext conftest.$ac_ext
62972    CFLAGS="$OLD_CFLAGS"
62973    LIBS="$OLD_LIBS"
62974    ac_ext=cpp
62975ac_cpp='$CXXCPP $CPPFLAGS'
62976ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62977ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62978ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62979
62980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
62981$as_echo "$LIBFFI_WORKS" >&6; }
62982
62983    if test "x$LIBFFI_WORKS" = xno; then
62984
62985  # Print a helpful message on how to acquire the necessary build dependency.
62986  # ffi is the help tag: freetype, cups, alsa etc
62987  MISSING_DEPENDENCY=ffi
62988
62989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62990    cygwin_help $MISSING_DEPENDENCY
62991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62992    msys_help $MISSING_DEPENDENCY
62993  else
62994    PKGHANDLER_COMMAND=
62995
62996    case $PKGHANDLER in
62997      apt-get)
62998        apt_help     $MISSING_DEPENDENCY ;;
62999      yum)
63000        yum_help     $MISSING_DEPENDENCY ;;
63001      port)
63002        port_help    $MISSING_DEPENDENCY ;;
63003      pkgutil)
63004        pkgutil_help $MISSING_DEPENDENCY ;;
63005      pkgadd)
63006        pkgadd_help  $MISSING_DEPENDENCY ;;
63007    esac
63008
63009    if test "x$PKGHANDLER_COMMAND" != x; then
63010      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63011    fi
63012  fi
63013
63014      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63015    fi
63016  fi
63017
63018
63019
63020
63021
63022  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63023    # Extract the first word of "llvm-config", so it can be a program name with args.
63024set dummy llvm-config; ac_word=$2
63025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63026$as_echo_n "checking for $ac_word... " >&6; }
63027if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63028  $as_echo_n "(cached) " >&6
63029else
63030  if test -n "$LLVM_CONFIG"; then
63031  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63032else
63033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63034for as_dir in $PATH
63035do
63036  IFS=$as_save_IFS
63037  test -z "$as_dir" && as_dir=.
63038    for ac_exec_ext in '' $ac_executable_extensions; do
63039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63040    ac_cv_prog_LLVM_CONFIG="llvm-config"
63041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63042    break 2
63043  fi
63044done
63045  done
63046IFS=$as_save_IFS
63047
63048fi
63049fi
63050LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63051if test -n "$LLVM_CONFIG"; then
63052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63053$as_echo "$LLVM_CONFIG" >&6; }
63054else
63055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63056$as_echo "no" >&6; }
63057fi
63058
63059
63060
63061    if test "x$LLVM_CONFIG" != xllvm-config; then
63062      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63063    fi
63064
63065    llvm_components="jit mcjit engine nativecodegen native"
63066    unset LLVM_CFLAGS
63067    for flag in $("$LLVM_CONFIG" --cxxflags); do
63068      if echo "${flag}" | grep -q '^-[ID]'; then
63069        if test "${flag}" != "-D_DEBUG" ; then
63070          if test "${LLVM_CFLAGS}" != "" ; then
63071            LLVM_CFLAGS="${LLVM_CFLAGS} "
63072          fi
63073          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63074        fi
63075      fi
63076    done
63077    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63078    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63079
63080    unset LLVM_LDFLAGS
63081    for flag in $("${LLVM_CONFIG}" --ldflags); do
63082      if echo "${flag}" | grep -q '^-L'; then
63083        if test "${LLVM_LDFLAGS}" != ""; then
63084          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63085        fi
63086        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63087      fi
63088    done
63089
63090    unset LLVM_LIBS
63091    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63092      if echo "${flag}" | grep -q '^-l'; then
63093        if test "${LLVM_LIBS}" != ""; then
63094          LLVM_LIBS="${LLVM_LIBS} "
63095        fi
63096        LLVM_LIBS="${LLVM_LIBS}${flag}"
63097      fi
63098    done
63099
63100    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63101    # always properly detect -ltinfo
63102    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63103
63104
63105
63106
63107  fi
63108
63109
63110
63111# Check whether --with-libjpeg was given.
63112if test "${with_libjpeg+set}" = set; then :
63113  withval=$with_libjpeg;
63114fi
63115
63116
63117  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63118$as_echo_n "checking for which libjpeg to use... " >&6; }
63119  # default is bundled
63120  DEFAULT_LIBJPEG=bundled
63121  # if user didn't specify, use DEFAULT_LIBJPEG
63122  if test "x${with_libjpeg}" = "x"; then
63123    with_libjpeg=${DEFAULT_LIBJPEG}
63124  fi
63125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63126$as_echo "${with_libjpeg}" >&6; }
63127
63128  if test "x${with_libjpeg}" = "xbundled"; then
63129    USE_EXTERNAL_LIBJPEG=false
63130  elif test "x${with_libjpeg}" = "xsystem"; then
63131    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63132if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63133
63134else
63135   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63136fi
63137
63138
63139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63140$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63141if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63142  $as_echo_n "(cached) " >&6
63143else
63144  ac_check_lib_save_LIBS=$LIBS
63145LIBS="-ljpeg  $LIBS"
63146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63147/* end confdefs.h.  */
63148
63149/* Override any GCC internal prototype to avoid an error.
63150   Use char because int might match the return type of a GCC
63151   builtin and then its argument prototype would still apply.  */
63152#ifdef __cplusplus
63153extern "C"
63154#endif
63155char jpeg_CreateDecompress ();
63156int
63157main ()
63158{
63159return jpeg_CreateDecompress ();
63160  ;
63161  return 0;
63162}
63163_ACEOF
63164if ac_fn_cxx_try_link "$LINENO"; then :
63165  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63166else
63167  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63168fi
63169rm -f core conftest.err conftest.$ac_objext \
63170    conftest$ac_exeext conftest.$ac_ext
63171LIBS=$ac_check_lib_save_LIBS
63172fi
63173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63174$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63175if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63176  cat >>confdefs.h <<_ACEOF
63177#define HAVE_LIBJPEG 1
63178_ACEOF
63179
63180  LIBS="-ljpeg $LIBS"
63181
63182else
63183   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63184fi
63185
63186
63187    USE_EXTERNAL_LIBJPEG=true
63188  else
63189    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63190  fi
63191
63192
63193
63194
63195
63196# Check whether --with-giflib was given.
63197if test "${with_giflib+set}" = set; then :
63198  withval=$with_giflib;
63199fi
63200
63201
63202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63203$as_echo_n "checking for which giflib to use... " >&6; }
63204  # default is bundled
63205  DEFAULT_GIFLIB=bundled
63206  # if user didn't specify, use DEFAULT_GIFLIB
63207  if test "x${with_giflib}" = "x"; then
63208    with_giflib=${DEFAULT_GIFLIB}
63209  fi
63210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63211$as_echo "${with_giflib}" >&6; }
63212
63213  if test "x${with_giflib}" = "xbundled"; then
63214    USE_EXTERNAL_LIBGIF=false
63215  elif test "x${with_giflib}" = "xsystem"; then
63216    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63217if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63218
63219else
63220   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63221fi
63222
63223
63224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63225$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63226if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63227  $as_echo_n "(cached) " >&6
63228else
63229  ac_check_lib_save_LIBS=$LIBS
63230LIBS="-lgif  $LIBS"
63231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63232/* end confdefs.h.  */
63233
63234/* Override any GCC internal prototype to avoid an error.
63235   Use char because int might match the return type of a GCC
63236   builtin and then its argument prototype would still apply.  */
63237#ifdef __cplusplus
63238extern "C"
63239#endif
63240char DGifGetCode ();
63241int
63242main ()
63243{
63244return DGifGetCode ();
63245  ;
63246  return 0;
63247}
63248_ACEOF
63249if ac_fn_cxx_try_link "$LINENO"; then :
63250  ac_cv_lib_gif_DGifGetCode=yes
63251else
63252  ac_cv_lib_gif_DGifGetCode=no
63253fi
63254rm -f core conftest.err conftest.$ac_objext \
63255    conftest$ac_exeext conftest.$ac_ext
63256LIBS=$ac_check_lib_save_LIBS
63257fi
63258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63259$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63260if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63261  cat >>confdefs.h <<_ACEOF
63262#define HAVE_LIBGIF 1
63263_ACEOF
63264
63265  LIBS="-lgif $LIBS"
63266
63267else
63268   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63269fi
63270
63271
63272    USE_EXTERNAL_LIBGIF=true
63273  else
63274    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63275  fi
63276
63277
63278
63279
63280
63281# Check whether --with-libpng was given.
63282if test "${with_libpng+set}" = set; then :
63283  withval=$with_libpng;
63284fi
63285
63286
63287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63288$as_echo_n "checking for which libpng to use... " >&6; }
63289
63290  # default is bundled
63291  DEFAULT_LIBPNG=bundled
63292  # if user didn't specify, use DEFAULT_LIBPNG
63293  if test "x${with_libpng}" = "x"; then
63294      with_libpng=${DEFAULT_LIBPNG}
63295  fi
63296
63297  if test "x${with_libpng}" = "xbundled"; then
63298      USE_EXTERNAL_LIBPNG=false
63299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63300$as_echo "bundled" >&6; }
63301  elif test "x${with_libpng}" = "xsystem"; then
63302
63303pkg_failed=no
63304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63305$as_echo_n "checking for PNG... " >&6; }
63306
63307if test -n "$PNG_CFLAGS"; then
63308    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63309 elif test -n "$PKG_CONFIG"; then
63310    if test -n "$PKG_CONFIG" && \
63311    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63312  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63313  ac_status=$?
63314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63315  test $ac_status = 0; }; then
63316  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63317else
63318  pkg_failed=yes
63319fi
63320 else
63321    pkg_failed=untried
63322fi
63323if test -n "$PNG_LIBS"; then
63324    pkg_cv_PNG_LIBS="$PNG_LIBS"
63325 elif test -n "$PKG_CONFIG"; then
63326    if test -n "$PKG_CONFIG" && \
63327    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63328  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63329  ac_status=$?
63330  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63331  test $ac_status = 0; }; then
63332  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63333else
63334  pkg_failed=yes
63335fi
63336 else
63337    pkg_failed=untried
63338fi
63339
63340
63341
63342if test $pkg_failed = yes; then
63343
63344if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63345        _pkg_short_errors_supported=yes
63346else
63347        _pkg_short_errors_supported=no
63348fi
63349        if test $_pkg_short_errors_supported = yes; then
63350	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63351        else
63352	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63353        fi
63354	# Put the nasty error message in config.log where it belongs
63355	echo "$PNG_PKG_ERRORS" >&5
63356
63357	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63358$as_echo "no" >&6; }
63359                 LIBPNG_FOUND=no
63360elif test $pkg_failed = untried; then
63361	 LIBPNG_FOUND=no
63362else
63363	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63364	PNG_LIBS=$pkg_cv_PNG_LIBS
63365        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63366$as_echo "yes" >&6; }
63367	 LIBPNG_FOUND=yes
63368fi
63369      if test "x${LIBPNG_FOUND}" = "xyes"; then
63370          USE_EXTERNAL_LIBPNG=true
63371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63372$as_echo "system" >&6; }
63373      else
63374          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63375$as_echo "system not found" >&6; }
63376          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63377      fi
63378  else
63379      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63380  fi
63381
63382
63383
63384
63385
63386# Check whether --with-zlib was given.
63387if test "${with_zlib+set}" = set; then :
63388  withval=$with_zlib;
63389fi
63390
63391
63392  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63393$as_echo_n "checking for compress in -lz... " >&6; }
63394if ${ac_cv_lib_z_compress+:} false; then :
63395  $as_echo_n "(cached) " >&6
63396else
63397  ac_check_lib_save_LIBS=$LIBS
63398LIBS="-lz  $LIBS"
63399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63400/* end confdefs.h.  */
63401
63402/* Override any GCC internal prototype to avoid an error.
63403   Use char because int might match the return type of a GCC
63404   builtin and then its argument prototype would still apply.  */
63405#ifdef __cplusplus
63406extern "C"
63407#endif
63408char compress ();
63409int
63410main ()
63411{
63412return compress ();
63413  ;
63414  return 0;
63415}
63416_ACEOF
63417if ac_fn_cxx_try_link "$LINENO"; then :
63418  ac_cv_lib_z_compress=yes
63419else
63420  ac_cv_lib_z_compress=no
63421fi
63422rm -f core conftest.err conftest.$ac_objext \
63423    conftest$ac_exeext conftest.$ac_ext
63424LIBS=$ac_check_lib_save_LIBS
63425fi
63426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63427$as_echo "$ac_cv_lib_z_compress" >&6; }
63428if test "x$ac_cv_lib_z_compress" = xyes; then :
63429   ZLIB_FOUND=yes
63430else
63431   ZLIB_FOUND=no
63432fi
63433
63434
63435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63436$as_echo_n "checking for which zlib to use... " >&6; }
63437
63438  DEFAULT_ZLIB=system
63439  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63440    # On windows default is bundled...on others default is system
63441    DEFAULT_ZLIB=bundled
63442  fi
63443
63444  if test "x${ZLIB_FOUND}" != "xyes"; then
63445    # If we don't find any system...set default to bundled
63446    DEFAULT_ZLIB=bundled
63447  fi
63448
63449  # If user didn't specify, use DEFAULT_ZLIB
63450  if test "x${with_zlib}" = "x"; then
63451    with_zlib=${DEFAULT_ZLIB}
63452  fi
63453
63454  if test "x${with_zlib}" = "xbundled"; then
63455    USE_EXTERNAL_LIBZ=false
63456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63457$as_echo "bundled" >&6; }
63458  elif test "x${with_zlib}" = "xsystem"; then
63459    if test "x${ZLIB_FOUND}" = "xyes"; then
63460      USE_EXTERNAL_LIBZ=true
63461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63462$as_echo "system" >&6; }
63463    else
63464      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63465$as_echo "system not found" >&6; }
63466      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63467    fi
63468  else
63469    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63470  fi
63471
63472
63473
63474
63475
63476# Check whether --with-lcms was given.
63477if test "${with_lcms+set}" = set; then :
63478  withval=$with_lcms;
63479fi
63480
63481
63482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63483$as_echo_n "checking for which lcms to use... " >&6; }
63484
63485  DEFAULT_LCMS=bundled
63486  # If user didn't specify, use DEFAULT_LCMS
63487  if test "x${with_lcms}" = "x"; then
63488      with_lcms=${DEFAULT_LCMS}
63489  fi
63490
63491  if test "x${with_lcms}" = "xbundled"; then
63492    USE_EXTERNAL_LCMS=false
63493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63494$as_echo "bundled" >&6; }
63495  elif test "x${with_lcms}" = "xsystem"; then
63496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63497$as_echo "system" >&6; }
63498
63499pkg_failed=no
63500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63501$as_echo_n "checking for LCMS... " >&6; }
63502
63503if test -n "$LCMS_CFLAGS"; then
63504    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63505 elif test -n "$PKG_CONFIG"; then
63506    if test -n "$PKG_CONFIG" && \
63507    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63508  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63509  ac_status=$?
63510  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63511  test $ac_status = 0; }; then
63512  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63513else
63514  pkg_failed=yes
63515fi
63516 else
63517    pkg_failed=untried
63518fi
63519if test -n "$LCMS_LIBS"; then
63520    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63521 elif test -n "$PKG_CONFIG"; then
63522    if test -n "$PKG_CONFIG" && \
63523    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63524  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63525  ac_status=$?
63526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63527  test $ac_status = 0; }; then
63528  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63529else
63530  pkg_failed=yes
63531fi
63532 else
63533    pkg_failed=untried
63534fi
63535
63536
63537
63538if test $pkg_failed = yes; then
63539
63540if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63541        _pkg_short_errors_supported=yes
63542else
63543        _pkg_short_errors_supported=no
63544fi
63545        if test $_pkg_short_errors_supported = yes; then
63546	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63547        else
63548	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63549        fi
63550	# Put the nasty error message in config.log where it belongs
63551	echo "$LCMS_PKG_ERRORS" >&5
63552
63553	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63554$as_echo "no" >&6; }
63555                LCMS_FOUND=no
63556elif test $pkg_failed = untried; then
63557	LCMS_FOUND=no
63558else
63559	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63560	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63562$as_echo "yes" >&6; }
63563	LCMS_FOUND=yes
63564fi
63565    if test "x${LCMS_FOUND}" = "xyes"; then
63566      USE_EXTERNAL_LCMS=true
63567    else
63568      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63569    fi
63570  else
63571    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63572  fi
63573
63574
63575
63576
63577
63578
63579
63580
63581
63582
63583
63584  # Setup libm (the maths library)
63585  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63586    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63587$as_echo_n "checking for cos in -lm... " >&6; }
63588if ${ac_cv_lib_m_cos+:} false; then :
63589  $as_echo_n "(cached) " >&6
63590else
63591  ac_check_lib_save_LIBS=$LIBS
63592LIBS="-lm  $LIBS"
63593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63594/* end confdefs.h.  */
63595
63596/* Override any GCC internal prototype to avoid an error.
63597   Use char because int might match the return type of a GCC
63598   builtin and then its argument prototype would still apply.  */
63599#ifdef __cplusplus
63600extern "C"
63601#endif
63602char cos ();
63603int
63604main ()
63605{
63606return cos ();
63607  ;
63608  return 0;
63609}
63610_ACEOF
63611if ac_fn_cxx_try_link "$LINENO"; then :
63612  ac_cv_lib_m_cos=yes
63613else
63614  ac_cv_lib_m_cos=no
63615fi
63616rm -f core conftest.err conftest.$ac_objext \
63617    conftest$ac_exeext conftest.$ac_ext
63618LIBS=$ac_check_lib_save_LIBS
63619fi
63620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63621$as_echo "$ac_cv_lib_m_cos" >&6; }
63622if test "x$ac_cv_lib_m_cos" = xyes; then :
63623  cat >>confdefs.h <<_ACEOF
63624#define HAVE_LIBM 1
63625_ACEOF
63626
63627  LIBS="-lm $LIBS"
63628
63629else
63630
63631        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63632$as_echo "$as_me: Maths library was not found" >&6;}
63633
63634fi
63635
63636    LIBM="-lm"
63637  else
63638    LIBM=""
63639  fi
63640
63641
63642  # Setup libdl (for dynamic library loading)
63643  save_LIBS="$LIBS"
63644  LIBS=""
63645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63646$as_echo_n "checking for dlopen in -ldl... " >&6; }
63647if ${ac_cv_lib_dl_dlopen+:} false; then :
63648  $as_echo_n "(cached) " >&6
63649else
63650  ac_check_lib_save_LIBS=$LIBS
63651LIBS="-ldl  $LIBS"
63652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63653/* end confdefs.h.  */
63654
63655/* Override any GCC internal prototype to avoid an error.
63656   Use char because int might match the return type of a GCC
63657   builtin and then its argument prototype would still apply.  */
63658#ifdef __cplusplus
63659extern "C"
63660#endif
63661char dlopen ();
63662int
63663main ()
63664{
63665return dlopen ();
63666  ;
63667  return 0;
63668}
63669_ACEOF
63670if ac_fn_cxx_try_link "$LINENO"; then :
63671  ac_cv_lib_dl_dlopen=yes
63672else
63673  ac_cv_lib_dl_dlopen=no
63674fi
63675rm -f core conftest.err conftest.$ac_objext \
63676    conftest$ac_exeext conftest.$ac_ext
63677LIBS=$ac_check_lib_save_LIBS
63678fi
63679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
63680$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
63681if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
63682  cat >>confdefs.h <<_ACEOF
63683#define HAVE_LIBDL 1
63684_ACEOF
63685
63686  LIBS="-ldl $LIBS"
63687
63688fi
63689
63690  LIBDL="$LIBS"
63691
63692  LIBS="$save_LIBS"
63693
63694  # Deprecated libraries, keep the flags for backwards compatibility
63695  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
63696
63697
63698# Check whether --with-dxsdk was given.
63699if test "${with_dxsdk+set}" = set; then :
63700  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
63701$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
63702fi
63703
63704
63705
63706
63707# Check whether --with-dxsdk-lib was given.
63708if test "${with_dxsdk_lib+set}" = set; then :
63709  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
63710$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
63711fi
63712
63713
63714
63715
63716# Check whether --with-dxsdk-include was given.
63717if test "${with_dxsdk_include+set}" = set; then :
63718  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
63719$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
63720fi
63721
63722
63723  fi
63724
63725  # Control if libzip can use mmap. Available for purposes of overriding.
63726  LIBZIP_CAN_USE_MMAP=true
63727
63728
63729
63730
63731
63732
63733
63734
63735
63736
63737
63738
63739
63740
63741###############################################################################
63742#
63743# We need to do some final tweaking, when everything else is done.
63744#
63745###############################################################################
63746
63747
63748  # Check whether --enable-new-hotspot-build was given.
63749if test "${enable_new_hotspot_build+set}" = set; then :
63750  enableval=$enable_new_hotspot_build;
63751fi
63752
63753
63754   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
63755     USE_NEW_HOTSPOT_BUILD=true
63756   else
63757     USE_NEW_HOTSPOT_BUILD=false
63758   fi
63759
63760
63761  case $HOTSPOT_DEBUG_LEVEL in
63762    product )
63763      VARIANT="OPT"
63764      FASTDEBUG="false"
63765      DEBUG_CLASSFILES="false"
63766      ;;
63767    fastdebug )
63768      VARIANT="DBG"
63769      FASTDEBUG="true"
63770      DEBUG_CLASSFILES="true"
63771      ;;
63772    debug )
63773      VARIANT="DBG"
63774      FASTDEBUG="false"
63775      DEBUG_CLASSFILES="true"
63776      ;;
63777    optimized )
63778      VARIANT="OPT"
63779      FASTDEBUG="false"
63780      DEBUG_CLASSFILES="false"
63781      ;;
63782  esac
63783
63784
63785
63786
63787  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
63788    MACOSX_UNIVERSAL="true"
63789  fi
63790
63791
63792
63793  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
63794  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
63795
63796  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
63797  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
63798  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
63799  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
63800  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
63801  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
63802  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
63803
63804  #####
63805  # Generate the legacy makefile targets for hotspot.
63806  HOTSPOT_TARGET=""
63807
63808  if test "x$JVM_VARIANT_SERVER" = xtrue; then
63809    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
63810  fi
63811
63812  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63813    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
63814  fi
63815
63816  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63817    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
63818  fi
63819
63820  if test "x$JVM_VARIANT_ZERO" = xtrue; then
63821    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
63822  fi
63823
63824  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
63825    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
63826  fi
63827
63828  if test "x$JVM_VARIANT_CORE" = xtrue; then
63829    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
63830  fi
63831
63832  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
63833
63834  # On Macosx universal binaries are produced, but they only contain
63835  # 64 bit intel. This invalidates control of which jvms are built
63836  # from configure, but only server is valid anyway. Fix this
63837  # when hotspot makefiles are rewritten.
63838  if test "x$MACOSX_UNIVERSAL" = xtrue; then
63839    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
63840  fi
63841
63842  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
63843
63844
63845  # Control wether Hotspot runs Queens test after build.
63846  # Check whether --enable-hotspot-test-in-build was given.
63847if test "${enable_hotspot_test_in_build+set}" = set; then :
63848  enableval=$enable_hotspot_test_in_build;
63849else
63850  enable_hotspot_test_in_build=no
63851fi
63852
63853  if test "x$enable_hotspot_test_in_build" = "xyes"; then
63854    TEST_IN_BUILD=true
63855  else
63856    TEST_IN_BUILD=false
63857  fi
63858
63859
63860  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
63861    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
63862      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63863        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
63864      fi
63865    fi
63866    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
63867      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63868        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
63869      fi
63870    fi
63871    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
63872        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
63873    fi
63874  fi
63875
63876
63877
63878
63879
63880
63881
63882
63883
63884
63885
63886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
63887$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
63888
63889  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
63890    ENABLE_INTREE_EC=yes
63891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63892$as_echo "yes" >&6; }
63893  else
63894    ENABLE_INTREE_EC=no
63895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63896$as_echo "no" >&6; }
63897  fi
63898
63899
63900
63901
63902  # Check whether --enable-jtreg-failure-handler was given.
63903if test "${enable_jtreg_failure_handler+set}" = set; then :
63904  enableval=$enable_jtreg_failure_handler;
63905fi
63906
63907
63908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
63909$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
63910
63911  if test "x$enable_jtreg_failure_handler" = "xyes"; then
63912    if test "x$JT_HOME" = "x"; then
63913      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
63914    else
63915      BUILD_FAILURE_HANDLER=true
63916      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63917$as_echo "yes, forced" >&6; }
63918    fi
63919  elif test "x$enable_jtreg_failure_handler" = "xno"; then
63920    BUILD_FAILURE_HANDLER=false
63921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63922$as_echo "no, forced" >&6; }
63923  elif test "x$enable_jtreg_failure_handler" = "xauto" \
63924      || test "x$enable_jtreg_failure_handler" = "x"; then
63925    if test "x$JT_HOME" = "x"; then
63926      BUILD_FAILURE_HANDLER=false
63927      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
63928$as_echo "no, missing jtreg" >&6; }
63929    else
63930      BUILD_FAILURE_HANDLER=true
63931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
63932$as_echo "yes, jtreg present" >&6; }
63933    fi
63934  else
63935    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
63936  fi
63937
63938
63939
63940
63941###############################################################################
63942#
63943# Configure parts of the build that only affect the build performance,
63944# not the result.
63945#
63946###############################################################################
63947
63948
63949  # How many cores do we have on this build system?
63950
63951# Check whether --with-num-cores was given.
63952if test "${with_num_cores+set}" = set; then :
63953  withval=$with_num_cores;
63954fi
63955
63956  if test "x$with_num_cores" = x; then
63957    # The number of cores were not specified, try to probe them.
63958
63959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
63960$as_echo_n "checking for number of cores... " >&6; }
63961  NUM_CORES=1
63962  FOUND_CORES=no
63963
63964  if test -f /proc/cpuinfo; then
63965    # Looks like a Linux (or cygwin) system
63966    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
63967    FOUND_CORES=yes
63968  elif test -x /usr/sbin/psrinfo; then
63969    # Looks like a Solaris system
63970    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
63971    FOUND_CORES=yes
63972  elif test -x /usr/sbin/sysctl; then
63973    # Looks like a MacOSX system
63974    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
63975    FOUND_CORES=yes
63976  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
63977    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
63978    FOUND_CORES=yes
63979  elif test -n "$NUMBER_OF_PROCESSORS"; then
63980    # On windows, look in the env
63981    NUM_CORES=$NUMBER_OF_PROCESSORS
63982    FOUND_CORES=yes
63983  fi
63984
63985  if test "x$FOUND_CORES" = xyes; then
63986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
63987$as_echo "$NUM_CORES" >&6; }
63988  else
63989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
63990$as_echo "could not detect number of cores, defaulting to 1" >&6; }
63991    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
63992$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
63993  fi
63994
63995  else
63996    NUM_CORES=$with_num_cores
63997  fi
63998
63999
64000
64001  # How much memory do we have on this build system?
64002
64003# Check whether --with-memory-size was given.
64004if test "${with_memory_size+set}" = set; then :
64005  withval=$with_memory_size;
64006fi
64007
64008  if test "x$with_memory_size" = x; then
64009    # The memory size was not specified, try to probe it.
64010
64011  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64012$as_echo_n "checking for memory size... " >&6; }
64013  # Default to 1024 MB
64014  MEMORY_SIZE=1024
64015  FOUND_MEM=no
64016
64017  if test -f /proc/meminfo; then
64018    # Looks like a Linux (or cygwin) system
64019    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64020    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64021    FOUND_MEM=yes
64022  elif test -x /usr/sbin/prtconf; then
64023    # Looks like a Solaris or AIX system
64024    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64025    FOUND_MEM=yes
64026  elif test -x /usr/sbin/sysctl; then
64027    # Looks like a MacOSX system
64028    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64029    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64030    FOUND_MEM=yes
64031  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64032    # Windows, but without cygwin
64033    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64034    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64035    FOUND_MEM=yes
64036  fi
64037
64038  if test "x$FOUND_MEM" = xyes; then
64039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64040$as_echo "$MEMORY_SIZE MB" >&6; }
64041  else
64042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64043$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64044    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64045$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64046  fi
64047
64048  else
64049    MEMORY_SIZE=$with_memory_size
64050  fi
64051
64052
64053
64054  # Provide a decent default number of parallel jobs for make depending on
64055  # number of cores, amount of memory and machine architecture.
64056
64057# Check whether --with-jobs was given.
64058if test "${with_jobs+set}" = set; then :
64059  withval=$with_jobs;
64060fi
64061
64062  if test "x$with_jobs" = x; then
64063    # Number of jobs was not specified, calculate.
64064    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64065$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64066    # Approximate memory in GB.
64067    memory_gb=`expr $MEMORY_SIZE / 1024`
64068    # Pick the lowest of memory in gb and number of cores.
64069    if test "$memory_gb" -lt "$NUM_CORES"; then
64070      JOBS="$memory_gb"
64071    else
64072      JOBS="$NUM_CORES"
64073    fi
64074    if test "$JOBS" -eq "0"; then
64075      JOBS=1
64076    fi
64077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64078$as_echo "$JOBS" >&6; }
64079  else
64080    JOBS=$with_jobs
64081  fi
64082
64083
64084
64085  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64086
64087# Check whether --with-test-jobs was given.
64088if test "${with_test_jobs+set}" = set; then :
64089  withval=$with_test_jobs;
64090fi
64091
64092  if test "x$with_test_jobs" = x; then
64093      TEST_JOBS=0
64094  else
64095      TEST_JOBS=$with_test_jobs
64096  fi
64097
64098
64099
64100# Setup arguments for the boot jdk (after cores and memory have been setup)
64101
64102  ##############################################################################
64103  #
64104  # Specify jvm options for anything that is run with the Boot JDK.
64105  # Not all JVM:s accept the same arguments on the command line.
64106  #
64107
64108# Check whether --with-boot-jdk-jvmargs was given.
64109if test "${with_boot_jdk_jvmargs+set}" = set; then :
64110  withval=$with_boot_jdk_jvmargs;
64111fi
64112
64113
64114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64115$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64116
64117  # Disable special log output when a debug build is used as Boot JDK...
64118
64119  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64120  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64121  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64122  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64123  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64125    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64126    JVM_ARG_OK=true
64127  else
64128    $ECHO "Arg failed:" >&5
64129    $ECHO "$OUTPUT" >&5
64130    JVM_ARG_OK=false
64131  fi
64132
64133
64134  # Apply user provided options.
64135
64136  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64137  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64138  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64139  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64140  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64141  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64142    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64143    JVM_ARG_OK=true
64144  else
64145    $ECHO "Arg failed:" >&5
64146    $ECHO "$OUTPUT" >&5
64147    JVM_ARG_OK=false
64148  fi
64149
64150
64151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64152$as_echo "$boot_jdk_jvmargs" >&6; }
64153
64154  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64155  JAVA_FLAGS=$boot_jdk_jvmargs
64156
64157
64158
64159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64160$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64161
64162  # Starting amount of heap memory.
64163
64164  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64165  $ECHO "Command: $JAVA -Xms64M -version" >&5
64166  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64167  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64168  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64169  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64170    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64171    JVM_ARG_OK=true
64172  else
64173    $ECHO "Arg failed:" >&5
64174    $ECHO "$OUTPUT" >&5
64175    JVM_ARG_OK=false
64176  fi
64177
64178
64179  # Maximum amount of heap memory.
64180  # Maximum stack size.
64181  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64182  if test "x$BOOT_JDK_BITS" = "x32"; then
64183    if test "$JVM_MAX_HEAP" -gt "1100"; then
64184      JVM_MAX_HEAP=1100
64185    elif test "$JVM_MAX_HEAP" -lt "512"; then
64186      JVM_MAX_HEAP=512
64187    fi
64188    STACK_SIZE=768
64189  else
64190    # Running a 64 bit JVM allows for and requires a bigger heap
64191    if test "$JVM_MAX_HEAP" -gt "1600"; then
64192      JVM_MAX_HEAP=1600
64193    elif test "$JVM_MAX_HEAP" -lt "512"; then
64194      JVM_MAX_HEAP=512
64195    fi
64196    STACK_SIZE=1536
64197  fi
64198
64199  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64200  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64201  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64202  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64203  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64204  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64205    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64206    JVM_ARG_OK=true
64207  else
64208    $ECHO "Arg failed:" >&5
64209    $ECHO "$OUTPUT" >&5
64210    JVM_ARG_OK=false
64211  fi
64212
64213
64214  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64215  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64216  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64217  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64218  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64219  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64220    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64221    JVM_ARG_OK=true
64222  else
64223    $ECHO "Arg failed:" >&5
64224    $ECHO "$OUTPUT" >&5
64225    JVM_ARG_OK=false
64226  fi
64227
64228
64229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64230$as_echo "$boot_jdk_jvmargs_big" >&6; }
64231
64232  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64233
64234
64235  # By default, the main javac compilations use big
64236  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64237
64238
64239  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64240$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64241
64242  # Use serial gc for small short lived tools if possible
64243
64244  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64245  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64246  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64247  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64248  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64249  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64250    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64251    JVM_ARG_OK=true
64252  else
64253    $ECHO "Arg failed:" >&5
64254    $ECHO "$OUTPUT" >&5
64255    JVM_ARG_OK=false
64256  fi
64257
64258
64259  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64260  $ECHO "Command: $JAVA -Xms32M -version" >&5
64261  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64265    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64266    JVM_ARG_OK=true
64267  else
64268    $ECHO "Arg failed:" >&5
64269    $ECHO "$OUTPUT" >&5
64270    JVM_ARG_OK=false
64271  fi
64272
64273
64274  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64275  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64276  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64277  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64278  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64279  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64280    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64281    JVM_ARG_OK=true
64282  else
64283    $ECHO "Arg failed:" >&5
64284    $ECHO "$OUTPUT" >&5
64285    JVM_ARG_OK=false
64286  fi
64287
64288
64289  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64290  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64291  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64292  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64293  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64294  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64295    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64296    JVM_ARG_OK=true
64297  else
64298    $ECHO "Arg failed:" >&5
64299    $ECHO "$OUTPUT" >&5
64300    JVM_ARG_OK=false
64301  fi
64302
64303
64304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64305$as_echo "$boot_jdk_jvmargs_small" >&6; }
64306
64307  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64308
64309
64310  JAVA_TOOL_FLAGS_SMALL=""
64311  for f in $JAVA_FLAGS_SMALL; do
64312    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64313  done
64314
64315
64316
64317# Setup smart javac (after cores and memory have been setup)
64318
64319
64320# Check whether --with-sjavac-server-java was given.
64321if test "${with_sjavac_server_java+set}" = set; then :
64322  withval=$with_sjavac_server_java;
64323fi
64324
64325
64326  if test "x$with_sjavac_server_java" != x; then
64327    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64328    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64329    if test "x$FOUND_VERSION" = x; then
64330      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64331    fi
64332  else
64333    SJAVAC_SERVER_JAVA="$JAVA"
64334  fi
64335
64336
64337  if test "$MEMORY_SIZE" -gt "3000"; then
64338
64339  $ECHO "Check if jvm arg is ok: -d64" >&5
64340  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64341  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64342  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64343  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64344  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64345    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64346    JVM_ARG_OK=true
64347  else
64348    $ECHO "Arg failed:" >&5
64349    $ECHO "$OUTPUT" >&5
64350    JVM_ARG_OK=false
64351  fi
64352
64353    if test "$JVM_ARG_OK" = true; then
64354      JVM_64BIT=true
64355      JVM_ARG_OK=false
64356    fi
64357  fi
64358
64359  MX_VALUE=`expr $MEMORY_SIZE / 2`
64360  if test "$JVM_64BIT" = true; then
64361    # Set ms lower than mx since more than one instance of the server might
64362    # get launched at the same time before they figure out which instance won.
64363    MS_VALUE=512
64364    if test "$MX_VALUE" -gt "2048"; then
64365      MX_VALUE=2048
64366    fi
64367  else
64368    MS_VALUE=256
64369    if test "$MX_VALUE" -gt "1500"; then
64370      MX_VALUE=1500
64371    fi
64372  fi
64373  if test "$MX_VALUE" -lt "512"; then
64374    MX_VALUE=512
64375  fi
64376
64377  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64378  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64379  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64380  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64381  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64382  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64383    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64384    JVM_ARG_OK=true
64385  else
64386    $ECHO "Arg failed:" >&5
64387    $ECHO "$OUTPUT" >&5
64388    JVM_ARG_OK=false
64389  fi
64390
64391
64392
64393  # Check whether --enable-sjavac was given.
64394if test "${enable_sjavac+set}" = set; then :
64395  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64396else
64397  ENABLE_SJAVAC="no"
64398fi
64399
64400  if test "x$JVM_ARG_OK" = "xfalse"; then
64401    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64402$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64403    ENABLE_SJAVAC="no"
64404  fi
64405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64406$as_echo_n "checking whether to use sjavac... " >&6; }
64407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64408$as_echo "$ENABLE_SJAVAC" >&6; }
64409
64410
64411  # Check whether --enable-javac-server was given.
64412if test "${enable_javac_server+set}" = set; then :
64413  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64414else
64415  ENABLE_JAVAC_SERVER="yes"
64416fi
64417
64418  if test "x$JVM_ARG_OK" = "xfalse"; then
64419    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64420$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64421    ENABLE_JAVAC_SERVER="no"
64422  fi
64423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64424$as_echo_n "checking whether to use javac server... " >&6; }
64425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64426$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64427
64428
64429  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64430    # When using a server javac, the small client instances do not need much
64431    # resources.
64432    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64433  fi
64434
64435
64436# Setup use of icecc if requested
64437
64438  # Check whether --enable-icecc was given.
64439if test "${enable_icecc+set}" = set; then :
64440  enableval=$enable_icecc;
64441fi
64442
64443
64444  if test "x${enable_icecc}" = "xyes"; then
64445
64446
64447
64448  # Publish this variable in the help.
64449
64450
64451  if [ -z "${ICECC_CMD+x}" ]; then
64452    # The variable is not set by user, try to locate tool using the code snippet
64453    for ac_prog in icecc
64454do
64455  # Extract the first word of "$ac_prog", so it can be a program name with args.
64456set dummy $ac_prog; ac_word=$2
64457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64458$as_echo_n "checking for $ac_word... " >&6; }
64459if ${ac_cv_path_ICECC_CMD+:} false; then :
64460  $as_echo_n "(cached) " >&6
64461else
64462  case $ICECC_CMD in
64463  [\\/]* | ?:[\\/]*)
64464  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64465  ;;
64466  *)
64467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64468for as_dir in $PATH
64469do
64470  IFS=$as_save_IFS
64471  test -z "$as_dir" && as_dir=.
64472    for ac_exec_ext in '' $ac_executable_extensions; do
64473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64474    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64476    break 2
64477  fi
64478done
64479  done
64480IFS=$as_save_IFS
64481
64482  ;;
64483esac
64484fi
64485ICECC_CMD=$ac_cv_path_ICECC_CMD
64486if test -n "$ICECC_CMD"; then
64487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64488$as_echo "$ICECC_CMD" >&6; }
64489else
64490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64491$as_echo "no" >&6; }
64492fi
64493
64494
64495  test -n "$ICECC_CMD" && break
64496done
64497
64498  else
64499    # The variable is set, but is it from the command line or the environment?
64500
64501    # Try to remove the string !ICECC_CMD! from our list.
64502    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64503    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64504      # If it failed, the variable was not from the command line. Ignore it,
64505      # but warn the user (except for BASH, which is always set by the calling BASH).
64506      if test "xICECC_CMD" != xBASH; then
64507        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64508$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64509      fi
64510      # Try to locate tool using the code snippet
64511      for ac_prog in icecc
64512do
64513  # Extract the first word of "$ac_prog", so it can be a program name with args.
64514set dummy $ac_prog; ac_word=$2
64515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64516$as_echo_n "checking for $ac_word... " >&6; }
64517if ${ac_cv_path_ICECC_CMD+:} false; then :
64518  $as_echo_n "(cached) " >&6
64519else
64520  case $ICECC_CMD in
64521  [\\/]* | ?:[\\/]*)
64522  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64523  ;;
64524  *)
64525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64526for as_dir in $PATH
64527do
64528  IFS=$as_save_IFS
64529  test -z "$as_dir" && as_dir=.
64530    for ac_exec_ext in '' $ac_executable_extensions; do
64531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64532    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64534    break 2
64535  fi
64536done
64537  done
64538IFS=$as_save_IFS
64539
64540  ;;
64541esac
64542fi
64543ICECC_CMD=$ac_cv_path_ICECC_CMD
64544if test -n "$ICECC_CMD"; then
64545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64546$as_echo "$ICECC_CMD" >&6; }
64547else
64548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64549$as_echo "no" >&6; }
64550fi
64551
64552
64553  test -n "$ICECC_CMD" && break
64554done
64555
64556    else
64557      # If it succeeded, then it was overridden by the user. We will use it
64558      # for the tool.
64559
64560      # First remove it from the list of overridden variables, so we can test
64561      # for unknown variables in the end.
64562      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64563
64564      # Check if we try to supply an empty value
64565      if test "x$ICECC_CMD" = x; then
64566        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64567$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64569$as_echo_n "checking for ICECC_CMD... " >&6; }
64570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64571$as_echo "disabled" >&6; }
64572      else
64573        # Check if the provided tool contains a complete path.
64574        tool_specified="$ICECC_CMD"
64575        tool_basename="${tool_specified##*/}"
64576        if test "x$tool_basename" = "x$tool_specified"; then
64577          # A command without a complete path is provided, search $PATH.
64578          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64579$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64580          # Extract the first word of "$tool_basename", so it can be a program name with args.
64581set dummy $tool_basename; ac_word=$2
64582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64583$as_echo_n "checking for $ac_word... " >&6; }
64584if ${ac_cv_path_ICECC_CMD+:} false; then :
64585  $as_echo_n "(cached) " >&6
64586else
64587  case $ICECC_CMD in
64588  [\\/]* | ?:[\\/]*)
64589  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64590  ;;
64591  *)
64592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64593for as_dir in $PATH
64594do
64595  IFS=$as_save_IFS
64596  test -z "$as_dir" && as_dir=.
64597    for ac_exec_ext in '' $ac_executable_extensions; do
64598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64599    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64601    break 2
64602  fi
64603done
64604  done
64605IFS=$as_save_IFS
64606
64607  ;;
64608esac
64609fi
64610ICECC_CMD=$ac_cv_path_ICECC_CMD
64611if test -n "$ICECC_CMD"; then
64612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64613$as_echo "$ICECC_CMD" >&6; }
64614else
64615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64616$as_echo "no" >&6; }
64617fi
64618
64619
64620          if test "x$ICECC_CMD" = x; then
64621            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64622          fi
64623        else
64624          # Otherwise we believe it is a complete path. Use it as it is.
64625          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64626$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64627          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64628$as_echo_n "checking for ICECC_CMD... " >&6; }
64629          if test ! -x "$tool_specified"; then
64630            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64631$as_echo "not found" >&6; }
64632            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64633          fi
64634          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64635$as_echo "$tool_specified" >&6; }
64636        fi
64637      fi
64638    fi
64639
64640  fi
64641
64642
64643
64644  if test "x$ICECC_CMD" = x; then
64645    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64646  fi
64647
64648
64649    old_path="$PATH"
64650
64651    # Look for icecc-create-env in some known places
64652    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
64653
64654
64655
64656  # Publish this variable in the help.
64657
64658
64659  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
64660    # The variable is not set by user, try to locate tool using the code snippet
64661    for ac_prog in icecc-create-env
64662do
64663  # Extract the first word of "$ac_prog", so it can be a program name with args.
64664set dummy $ac_prog; ac_word=$2
64665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64666$as_echo_n "checking for $ac_word... " >&6; }
64667if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64668  $as_echo_n "(cached) " >&6
64669else
64670  case $ICECC_CREATE_ENV in
64671  [\\/]* | ?:[\\/]*)
64672  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64673  ;;
64674  *)
64675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64676for as_dir in $PATH
64677do
64678  IFS=$as_save_IFS
64679  test -z "$as_dir" && as_dir=.
64680    for ac_exec_ext in '' $ac_executable_extensions; do
64681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64682    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64684    break 2
64685  fi
64686done
64687  done
64688IFS=$as_save_IFS
64689
64690  ;;
64691esac
64692fi
64693ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64694if test -n "$ICECC_CREATE_ENV"; then
64695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64696$as_echo "$ICECC_CREATE_ENV" >&6; }
64697else
64698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64699$as_echo "no" >&6; }
64700fi
64701
64702
64703  test -n "$ICECC_CREATE_ENV" && break
64704done
64705
64706  else
64707    # The variable is set, but is it from the command line or the environment?
64708
64709    # Try to remove the string !ICECC_CREATE_ENV! from our list.
64710    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
64711    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64712      # If it failed, the variable was not from the command line. Ignore it,
64713      # but warn the user (except for BASH, which is always set by the calling BASH).
64714      if test "xICECC_CREATE_ENV" != xBASH; then
64715        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
64716$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
64717      fi
64718      # Try to locate tool using the code snippet
64719      for ac_prog in icecc-create-env
64720do
64721  # Extract the first word of "$ac_prog", so it can be a program name with args.
64722set dummy $ac_prog; ac_word=$2
64723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64724$as_echo_n "checking for $ac_word... " >&6; }
64725if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64726  $as_echo_n "(cached) " >&6
64727else
64728  case $ICECC_CREATE_ENV in
64729  [\\/]* | ?:[\\/]*)
64730  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64731  ;;
64732  *)
64733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64734for as_dir in $PATH
64735do
64736  IFS=$as_save_IFS
64737  test -z "$as_dir" && as_dir=.
64738    for ac_exec_ext in '' $ac_executable_extensions; do
64739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64740    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64742    break 2
64743  fi
64744done
64745  done
64746IFS=$as_save_IFS
64747
64748  ;;
64749esac
64750fi
64751ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64752if test -n "$ICECC_CREATE_ENV"; then
64753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64754$as_echo "$ICECC_CREATE_ENV" >&6; }
64755else
64756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64757$as_echo "no" >&6; }
64758fi
64759
64760
64761  test -n "$ICECC_CREATE_ENV" && break
64762done
64763
64764    else
64765      # If it succeeded, then it was overridden by the user. We will use it
64766      # for the tool.
64767
64768      # First remove it from the list of overridden variables, so we can test
64769      # for unknown variables in the end.
64770      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64771
64772      # Check if we try to supply an empty value
64773      if test "x$ICECC_CREATE_ENV" = x; then
64774        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
64775$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
64776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64777$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64779$as_echo "disabled" >&6; }
64780      else
64781        # Check if the provided tool contains a complete path.
64782        tool_specified="$ICECC_CREATE_ENV"
64783        tool_basename="${tool_specified##*/}"
64784        if test "x$tool_basename" = "x$tool_specified"; then
64785          # A command without a complete path is provided, search $PATH.
64786          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
64787$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
64788          # Extract the first word of "$tool_basename", so it can be a program name with args.
64789set dummy $tool_basename; ac_word=$2
64790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64791$as_echo_n "checking for $ac_word... " >&6; }
64792if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
64793  $as_echo_n "(cached) " >&6
64794else
64795  case $ICECC_CREATE_ENV in
64796  [\\/]* | ?:[\\/]*)
64797  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
64798  ;;
64799  *)
64800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64801for as_dir in $PATH
64802do
64803  IFS=$as_save_IFS
64804  test -z "$as_dir" && as_dir=.
64805    for ac_exec_ext in '' $ac_executable_extensions; do
64806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64807    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
64808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64809    break 2
64810  fi
64811done
64812  done
64813IFS=$as_save_IFS
64814
64815  ;;
64816esac
64817fi
64818ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
64819if test -n "$ICECC_CREATE_ENV"; then
64820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
64821$as_echo "$ICECC_CREATE_ENV" >&6; }
64822else
64823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64824$as_echo "no" >&6; }
64825fi
64826
64827
64828          if test "x$ICECC_CREATE_ENV" = x; then
64829            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64830          fi
64831        else
64832          # Otherwise we believe it is a complete path. Use it as it is.
64833          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
64834$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
64835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
64836$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
64837          if test ! -x "$tool_specified"; then
64838            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64839$as_echo "not found" >&6; }
64840            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
64841          fi
64842          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64843$as_echo "$tool_specified" >&6; }
64844        fi
64845      fi
64846    fi
64847
64848  fi
64849
64850
64851
64852  if test "x$ICECC_CREATE_ENV" = x; then
64853    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
64854  fi
64855
64856
64857    # Use icecc-create-env to create a minimal compilation environment that can
64858    # be sent to the other hosts in the icecream cluster.
64859    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
64860    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
64861    # Older versions of icecc does not have the --gcc parameter
64862    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
64863      icecc_gcc_arg="--gcc"
64864    fi
64865    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
64866
64867  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
64868      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
64869          ${icecc_create_env_log} 2>&1 )
64870  if test "$?" != "0"; then
64871    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
64872$as_echo "$as_me: icecc-create-env output:" >&6;}
64873    cat \
64874          ${icecc_create_env_log}
64875    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
64876  fi
64877
64878    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
64879      # For clang, the icecc compilerwrapper is needed. It usually resides next
64880      # to icecc-create-env.
64881
64882
64883
64884  # Publish this variable in the help.
64885
64886
64887  if [ -z "${ICECC_WRAPPER+x}" ]; then
64888    # The variable is not set by user, try to locate tool using the code snippet
64889    for ac_prog in compilerwrapper
64890do
64891  # Extract the first word of "$ac_prog", so it can be a program name with args.
64892set dummy $ac_prog; ac_word=$2
64893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64894$as_echo_n "checking for $ac_word... " >&6; }
64895if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64896  $as_echo_n "(cached) " >&6
64897else
64898  case $ICECC_WRAPPER in
64899  [\\/]* | ?:[\\/]*)
64900  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64901  ;;
64902  *)
64903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64904for as_dir in $PATH
64905do
64906  IFS=$as_save_IFS
64907  test -z "$as_dir" && as_dir=.
64908    for ac_exec_ext in '' $ac_executable_extensions; do
64909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64910    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64912    break 2
64913  fi
64914done
64915  done
64916IFS=$as_save_IFS
64917
64918  ;;
64919esac
64920fi
64921ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64922if test -n "$ICECC_WRAPPER"; then
64923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64924$as_echo "$ICECC_WRAPPER" >&6; }
64925else
64926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64927$as_echo "no" >&6; }
64928fi
64929
64930
64931  test -n "$ICECC_WRAPPER" && break
64932done
64933
64934  else
64935    # The variable is set, but is it from the command line or the environment?
64936
64937    # Try to remove the string !ICECC_WRAPPER! from our list.
64938    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
64939    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64940      # If it failed, the variable was not from the command line. Ignore it,
64941      # but warn the user (except for BASH, which is always set by the calling BASH).
64942      if test "xICECC_WRAPPER" != xBASH; then
64943        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
64944$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
64945      fi
64946      # Try to locate tool using the code snippet
64947      for ac_prog in compilerwrapper
64948do
64949  # Extract the first word of "$ac_prog", so it can be a program name with args.
64950set dummy $ac_prog; ac_word=$2
64951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64952$as_echo_n "checking for $ac_word... " >&6; }
64953if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
64954  $as_echo_n "(cached) " >&6
64955else
64956  case $ICECC_WRAPPER in
64957  [\\/]* | ?:[\\/]*)
64958  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
64959  ;;
64960  *)
64961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64962for as_dir in $PATH
64963do
64964  IFS=$as_save_IFS
64965  test -z "$as_dir" && as_dir=.
64966    for ac_exec_ext in '' $ac_executable_extensions; do
64967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64968    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
64969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64970    break 2
64971  fi
64972done
64973  done
64974IFS=$as_save_IFS
64975
64976  ;;
64977esac
64978fi
64979ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
64980if test -n "$ICECC_WRAPPER"; then
64981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
64982$as_echo "$ICECC_WRAPPER" >&6; }
64983else
64984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64985$as_echo "no" >&6; }
64986fi
64987
64988
64989  test -n "$ICECC_WRAPPER" && break
64990done
64991
64992    else
64993      # If it succeeded, then it was overridden by the user. We will use it
64994      # for the tool.
64995
64996      # First remove it from the list of overridden variables, so we can test
64997      # for unknown variables in the end.
64998      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64999
65000      # Check if we try to supply an empty value
65001      if test "x$ICECC_WRAPPER" = x; then
65002        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65003$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65004        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65005$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65007$as_echo "disabled" >&6; }
65008      else
65009        # Check if the provided tool contains a complete path.
65010        tool_specified="$ICECC_WRAPPER"
65011        tool_basename="${tool_specified##*/}"
65012        if test "x$tool_basename" = "x$tool_specified"; then
65013          # A command without a complete path is provided, search $PATH.
65014          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65015$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65016          # Extract the first word of "$tool_basename", so it can be a program name with args.
65017set dummy $tool_basename; ac_word=$2
65018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65019$as_echo_n "checking for $ac_word... " >&6; }
65020if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65021  $as_echo_n "(cached) " >&6
65022else
65023  case $ICECC_WRAPPER in
65024  [\\/]* | ?:[\\/]*)
65025  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65026  ;;
65027  *)
65028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65029for as_dir in $PATH
65030do
65031  IFS=$as_save_IFS
65032  test -z "$as_dir" && as_dir=.
65033    for ac_exec_ext in '' $ac_executable_extensions; do
65034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65035    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65037    break 2
65038  fi
65039done
65040  done
65041IFS=$as_save_IFS
65042
65043  ;;
65044esac
65045fi
65046ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65047if test -n "$ICECC_WRAPPER"; then
65048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65049$as_echo "$ICECC_WRAPPER" >&6; }
65050else
65051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65052$as_echo "no" >&6; }
65053fi
65054
65055
65056          if test "x$ICECC_WRAPPER" = x; then
65057            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65058          fi
65059        else
65060          # Otherwise we believe it is a complete path. Use it as it is.
65061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65062$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65063          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65064$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65065          if test ! -x "$tool_specified"; then
65066            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65067$as_echo "not found" >&6; }
65068            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65069          fi
65070          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65071$as_echo "$tool_specified" >&6; }
65072        fi
65073      fi
65074    fi
65075
65076  fi
65077
65078
65079
65080  if test "x$ICECC_WRAPPER" = x; then
65081    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65082  fi
65083
65084
65085
65086  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65087      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65088  if test "$?" != "0"; then
65089    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65090$as_echo "$as_me: icecc-create-env output:" >&6;}
65091    cat ${icecc_create_env_log}
65092    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65093  fi
65094
65095    else
65096      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65097    fi
65098    PATH="$old_path"
65099    # The bundle with the compiler gets a name based on checksums. Parse log file
65100    # to find it.
65101    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65102    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65103    if test ! -f ${ICECC_ENV_BUNDLE}; then
65104      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65105    fi
65106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65107$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65109$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65110    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65111
65112    if test "x${COMPILE_TYPE}" = "xcross"; then
65113      # If cross compiling, create a separate env package for the build compiler
65114      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65115      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65116      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65117
65118  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65119      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65120            ${icecc_create_env_log_build} 2>&1 )
65121  if test "$?" != "0"; then
65122    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65123$as_echo "$as_me: icecc-create-env output:" >&6;}
65124    cat \
65125            ${icecc_create_env_log_build}
65126    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65127  fi
65128
65129      elif test "x${BUILD_CC##*/}" = "xclang"; then
65130
65131  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65132      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65133  if test "$?" != "0"; then
65134    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65135$as_echo "$as_me: icecc-create-env output:" >&6;}
65136    cat ${icecc_create_env_log_build}
65137    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65138  fi
65139
65140      else
65141        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65142      fi
65143      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65144      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65145      if test ! -f ${ICECC_ENV_BUNDLE}; then
65146        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65147      fi
65148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65149$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65150      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65151$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65152      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65153          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65154    else
65155      BUILD_ICECC="${ICECC}"
65156    fi
65157
65158
65159  fi
65160
65161
65162# Can the C/C++ compiler use precompiled headers?
65163
65164
65165  ###############################################################################
65166  #
65167  # Can the C/C++ compiler use precompiled headers?
65168  #
65169  # Check whether --enable-precompiled-headers was given.
65170if test "${enable_precompiled_headers+set}" = set; then :
65171  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65172else
65173  ENABLE_PRECOMPH=yes
65174fi
65175
65176
65177  USE_PRECOMPILED_HEADER=1
65178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65179$as_echo_n "checking If precompiled header is enabled... " >&6; }
65180  if test "x$ENABLE_PRECOMPH" = xno; then
65181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65182$as_echo "no, forced" >&6; }
65183    USE_PRECOMPILED_HEADER=0
65184  elif test "x$ICECC" != "x"; then
65185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65186$as_echo "no, does not work effectively with icecc" >&6; }
65187    USE_PRECOMPILED_HEADER=0
65188  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65189    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65190$as_echo "no, does not work with Solaris Studio" >&6; }
65191    USE_PRECOMPILED_HEADER=0
65192  else
65193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65194$as_echo "yes" >&6; }
65195  fi
65196
65197  if test "x$ENABLE_PRECOMPH" = xyes; then
65198    # Check that the compiler actually supports precomp headers.
65199    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65201$as_echo_n "checking that precompiled headers work... " >&6; }
65202      echo "int alfa();" > conftest.h
65203      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65204      if test ! -f conftest.hpp.gch; then
65205        USE_PRECOMPILED_HEADER=0
65206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65207$as_echo "no" >&6; }
65208      else
65209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65210$as_echo "yes" >&6; }
65211      fi
65212      rm -f conftest.h conftest.hpp.gch
65213    fi
65214  fi
65215
65216
65217
65218
65219# Setup use of ccache, if available
65220
65221  # Check whether --enable-ccache was given.
65222if test "${enable_ccache+set}" = set; then :
65223  enableval=$enable_ccache;
65224fi
65225
65226
65227  CCACHE=
65228  CCACHE_STATUS=
65229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65230$as_echo_n "checking is ccache enabled... " >&6; }
65231  if test "x$enable_ccache" = xyes; then
65232    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65234$as_echo "yes" >&6; }
65235      OLD_PATH="$PATH"
65236      if test "x$TOOLCHAIN_PATH" != x; then
65237        PATH=$TOOLCHAIN_PATH:$PATH
65238      fi
65239
65240
65241
65242  # Publish this variable in the help.
65243
65244
65245  if [ -z "${CCACHE+x}" ]; then
65246    # The variable is not set by user, try to locate tool using the code snippet
65247    for ac_prog in ccache
65248do
65249  # Extract the first word of "$ac_prog", so it can be a program name with args.
65250set dummy $ac_prog; ac_word=$2
65251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65252$as_echo_n "checking for $ac_word... " >&6; }
65253if ${ac_cv_path_CCACHE+:} false; then :
65254  $as_echo_n "(cached) " >&6
65255else
65256  case $CCACHE in
65257  [\\/]* | ?:[\\/]*)
65258  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65259  ;;
65260  *)
65261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65262for as_dir in $PATH
65263do
65264  IFS=$as_save_IFS
65265  test -z "$as_dir" && as_dir=.
65266    for ac_exec_ext in '' $ac_executable_extensions; do
65267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65268    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65270    break 2
65271  fi
65272done
65273  done
65274IFS=$as_save_IFS
65275
65276  ;;
65277esac
65278fi
65279CCACHE=$ac_cv_path_CCACHE
65280if test -n "$CCACHE"; then
65281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65282$as_echo "$CCACHE" >&6; }
65283else
65284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65285$as_echo "no" >&6; }
65286fi
65287
65288
65289  test -n "$CCACHE" && break
65290done
65291
65292  else
65293    # The variable is set, but is it from the command line or the environment?
65294
65295    # Try to remove the string !CCACHE! from our list.
65296    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65297    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65298      # If it failed, the variable was not from the command line. Ignore it,
65299      # but warn the user (except for BASH, which is always set by the calling BASH).
65300      if test "xCCACHE" != xBASH; then
65301        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65302$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65303      fi
65304      # Try to locate tool using the code snippet
65305      for ac_prog in ccache
65306do
65307  # Extract the first word of "$ac_prog", so it can be a program name with args.
65308set dummy $ac_prog; ac_word=$2
65309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65310$as_echo_n "checking for $ac_word... " >&6; }
65311if ${ac_cv_path_CCACHE+:} false; then :
65312  $as_echo_n "(cached) " >&6
65313else
65314  case $CCACHE in
65315  [\\/]* | ?:[\\/]*)
65316  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65317  ;;
65318  *)
65319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65320for as_dir in $PATH
65321do
65322  IFS=$as_save_IFS
65323  test -z "$as_dir" && as_dir=.
65324    for ac_exec_ext in '' $ac_executable_extensions; do
65325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65326    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65328    break 2
65329  fi
65330done
65331  done
65332IFS=$as_save_IFS
65333
65334  ;;
65335esac
65336fi
65337CCACHE=$ac_cv_path_CCACHE
65338if test -n "$CCACHE"; then
65339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65340$as_echo "$CCACHE" >&6; }
65341else
65342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65343$as_echo "no" >&6; }
65344fi
65345
65346
65347  test -n "$CCACHE" && break
65348done
65349
65350    else
65351      # If it succeeded, then it was overridden by the user. We will use it
65352      # for the tool.
65353
65354      # First remove it from the list of overridden variables, so we can test
65355      # for unknown variables in the end.
65356      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65357
65358      # Check if we try to supply an empty value
65359      if test "x$CCACHE" = x; then
65360        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65361$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65363$as_echo_n "checking for CCACHE... " >&6; }
65364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65365$as_echo "disabled" >&6; }
65366      else
65367        # Check if the provided tool contains a complete path.
65368        tool_specified="$CCACHE"
65369        tool_basename="${tool_specified##*/}"
65370        if test "x$tool_basename" = "x$tool_specified"; then
65371          # A command without a complete path is provided, search $PATH.
65372          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65373$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65374          # Extract the first word of "$tool_basename", so it can be a program name with args.
65375set dummy $tool_basename; ac_word=$2
65376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65377$as_echo_n "checking for $ac_word... " >&6; }
65378if ${ac_cv_path_CCACHE+:} false; then :
65379  $as_echo_n "(cached) " >&6
65380else
65381  case $CCACHE in
65382  [\\/]* | ?:[\\/]*)
65383  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65384  ;;
65385  *)
65386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65387for as_dir in $PATH
65388do
65389  IFS=$as_save_IFS
65390  test -z "$as_dir" && as_dir=.
65391    for ac_exec_ext in '' $ac_executable_extensions; do
65392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65393    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65395    break 2
65396  fi
65397done
65398  done
65399IFS=$as_save_IFS
65400
65401  ;;
65402esac
65403fi
65404CCACHE=$ac_cv_path_CCACHE
65405if test -n "$CCACHE"; then
65406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65407$as_echo "$CCACHE" >&6; }
65408else
65409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65410$as_echo "no" >&6; }
65411fi
65412
65413
65414          if test "x$CCACHE" = x; then
65415            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65416          fi
65417        else
65418          # Otherwise we believe it is a complete path. Use it as it is.
65419          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65420$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65421          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65422$as_echo_n "checking for CCACHE... " >&6; }
65423          if test ! -x "$tool_specified"; then
65424            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65425$as_echo "not found" >&6; }
65426            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65427          fi
65428          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65429$as_echo "$tool_specified" >&6; }
65430        fi
65431      fi
65432    fi
65433
65434  fi
65435
65436
65437
65438  if test "x$CCACHE" = x; then
65439    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65440  fi
65441
65442
65443      PATH="$OLD_PATH"
65444      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65445      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65446    else
65447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65448$as_echo "no" >&6; }
65449      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65450$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65451    fi
65452  elif test "x$enable_ccache" = xno; then
65453    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65454$as_echo "no, explicitly disabled" >&6; }
65455    CCACHE_STATUS="Disabled"
65456  elif test "x$enable_ccache" = x; then
65457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65458$as_echo "no" >&6; }
65459  else
65460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65461$as_echo "unknown" >&6; }
65462    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65463  fi
65464
65465
65466
65467# Check whether --with-ccache-dir was given.
65468if test "${with_ccache_dir+set}" = set; then :
65469  withval=$with_ccache_dir;
65470fi
65471
65472
65473  if test "x$with_ccache_dir" != x; then
65474    # When using a non home ccache directory, assume the use is to share ccache files
65475    # with other users. Thus change the umask.
65476    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65477    if test "x$CCACHE" = x; then
65478      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65479$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65480    fi
65481  fi
65482
65483  if test "x$CCACHE" != x; then
65484
65485  if test "x$CCACHE" != x; then
65486    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65487      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65488          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65489      if test "x$HAS_BAD_CCACHE" != "x"; then
65490        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65491      fi
65492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65493$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65494      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65495      PUSHED_FLAGS="$CXXFLAGS"
65496      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65497      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65498/* end confdefs.h.  */
65499
65500int
65501main ()
65502{
65503
65504  ;
65505  return 0;
65506}
65507_ACEOF
65508if ac_fn_cxx_try_compile "$LINENO"; then :
65509  CC_KNOWS_CCACHE_TRICK=yes
65510else
65511  CC_KNOWS_CCACHE_TRICK=no
65512fi
65513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65514      CXXFLAGS="$PUSHED_FLAGS"
65515      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65517$as_echo "yes" >&6; }
65518        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65519
65520        CCACHE_SLOPPINESS=pch_defines,time_macros
65521      else
65522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65523$as_echo "no" >&6; }
65524        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65525      fi
65526    fi
65527
65528    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65529        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65530
65531    if test "x$SET_CCACHE_DIR" != x; then
65532      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65533      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65534    fi
65535  fi
65536
65537  fi
65538
65539
65540###############################################################################
65541#
65542# And now the finish...
65543#
65544###############################################################################
65545
65546# Check for some common pitfalls
65547
65548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65549    file_to_test="$SRC_ROOT/LICENSE"
65550    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65551      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
65552    fi
65553  fi
65554
65555
65556  # Did user specify any unknown variables?
65557
65558  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65559    # Replace the separating ! with spaces before presenting for end user.
65560    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65561    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65562$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65563  fi
65564
65565
65566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65567$as_echo_n "checking if build directory is on local disk... " >&6; }
65568
65569  # df -l lists only local disks; if the given directory is not found then
65570  # a non-zero exit code is given
65571  if test "x$DF" = x; then
65572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65573      # msys does not have df; use Windows "net use" instead.
65574      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65575      if test "x$IS_NETWORK_DISK" = x; then
65576        OUTPUT_DIR_IS_LOCAL="yes"
65577      else
65578        OUTPUT_DIR_IS_LOCAL="no"
65579      fi
65580    else
65581      # No df here, say it's local
65582      OUTPUT_DIR_IS_LOCAL="yes"
65583    fi
65584  else
65585    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65586      OUTPUT_DIR_IS_LOCAL="yes"
65587    else
65588      OUTPUT_DIR_IS_LOCAL="no"
65589    fi
65590  fi
65591
65592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65593$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65594
65595
65596
65597  # Check if the user has any old-style ALT_ variables set.
65598  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65599
65600  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65601  # Since we can't properly handle the dependencies for this, warn the user about the situation
65602  if test -e $OUTPUT_ROOT/spec.gmk; then
65603    IS_RECONFIGURE=yes
65604  else
65605    IS_RECONFIGURE=no
65606  fi
65607
65608
65609# At the end, call the custom hook. (Dummy macro if no custom sources available)
65610
65611
65612# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65613
65614  # Keep feature lists sorted and free of duplicates
65615  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65616  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65617  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65618  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65619  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65620  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65621  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65622
65623  # Validate features
65624  for variant in $JVM_VARIANTS; do
65625    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65626$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65627    features_var_name=JVM_FEATURES_$variant
65628    JVM_FEATURES_TO_TEST=${!features_var_name}
65629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65630$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65631    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65632    if test "x$INVALID_FEATURES" != x; then
65633      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65634    fi
65635  done
65636
65637
65638# We're messing a bit with internal autoconf variables to put the config.status
65639# in the output directory instead of the current directory.
65640CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65641
65642# Create the actual output files. Now the main work of configure is done.
65643cat >confcache <<\_ACEOF
65644# This file is a shell script that caches the results of configure
65645# tests run on this system so they can be shared between configure
65646# scripts and configure runs, see configure's option --config-cache.
65647# It is not useful on other systems.  If it contains results you don't
65648# want to keep, you may remove or edit it.
65649#
65650# config.status only pays attention to the cache file if you give it
65651# the --recheck option to rerun configure.
65652#
65653# `ac_cv_env_foo' variables (set or unset) will be overridden when
65654# loading this file, other *unset* `ac_cv_foo' will be assigned the
65655# following values.
65656
65657_ACEOF
65658
65659# The following way of writing the cache mishandles newlines in values,
65660# but we know of no workaround that is simple, portable, and efficient.
65661# So, we kill variables containing newlines.
65662# Ultrix sh set writes to stderr and can't be redirected directly,
65663# and sets the high bit in the cache file unless we assign to the vars.
65664(
65665  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
65666    eval ac_val=\$$ac_var
65667    case $ac_val in #(
65668    *${as_nl}*)
65669      case $ac_var in #(
65670      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
65671$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
65672      esac
65673      case $ac_var in #(
65674      _ | IFS | as_nl) ;; #(
65675      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
65676      *) { eval $ac_var=; unset $ac_var;} ;;
65677      esac ;;
65678    esac
65679  done
65680
65681  (set) 2>&1 |
65682    case $as_nl`(ac_space=' '; set) 2>&1` in #(
65683    *${as_nl}ac_space=\ *)
65684      # `set' does not quote correctly, so add quotes: double-quote
65685      # substitution turns \\\\ into \\, and sed turns \\ into \.
65686      sed -n \
65687	"s/'/'\\\\''/g;
65688	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
65689      ;; #(
65690    *)
65691      # `set' quotes correctly as required by POSIX, so do not add quotes.
65692      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
65693      ;;
65694    esac |
65695    sort
65696) |
65697  sed '
65698     /^ac_cv_env_/b end
65699     t clear
65700     :clear
65701     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
65702     t end
65703     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
65704     :end' >>confcache
65705if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
65706  if test -w "$cache_file"; then
65707    if test "x$cache_file" != "x/dev/null"; then
65708      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
65709$as_echo "$as_me: updating cache $cache_file" >&6;}
65710      if test ! -f "$cache_file" || test -h "$cache_file"; then
65711	cat confcache >"$cache_file"
65712      else
65713        case $cache_file in #(
65714        */* | ?:*)
65715	  mv -f confcache "$cache_file"$$ &&
65716	  mv -f "$cache_file"$$ "$cache_file" ;; #(
65717        *)
65718	  mv -f confcache "$cache_file" ;;
65719	esac
65720      fi
65721    fi
65722  else
65723    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
65724$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
65725  fi
65726fi
65727rm -f confcache
65728
65729test "x$prefix" = xNONE && prefix=$ac_default_prefix
65730# Let make expand exec_prefix.
65731test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
65732
65733# Transform confdefs.h into DEFS.
65734# Protect against shell expansion while executing Makefile rules.
65735# Protect against Makefile macro expansion.
65736#
65737# If the first sed substitution is executed (which looks for macros that
65738# take arguments), then branch to the quote section.  Otherwise,
65739# look for a macro that doesn't take arguments.
65740ac_script='
65741:mline
65742/\\$/{
65743 N
65744 s,\\\n,,
65745 b mline
65746}
65747t clear
65748:clear
65749s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
65750t quote
65751s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
65752t quote
65753b any
65754:quote
65755s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
65756s/\[/\\&/g
65757s/\]/\\&/g
65758s/\$/$$/g
65759H
65760:any
65761${
65762	g
65763	s/^\n//
65764	s/\n/ /g
65765	p
65766}
65767'
65768DEFS=`sed -n "$ac_script" confdefs.h`
65769
65770
65771ac_libobjs=
65772ac_ltlibobjs=
65773U=
65774for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
65775  # 1. Remove the extension, and $U if already installed.
65776  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
65777  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
65778  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
65779  #    will be set to the directory where LIBOBJS objects are built.
65780  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
65781  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
65782done
65783LIBOBJS=$ac_libobjs
65784
65785LTLIBOBJS=$ac_ltlibobjs
65786
65787
65788
65789: "${CONFIG_STATUS=./config.status}"
65790ac_write_fail=0
65791ac_clean_files_save=$ac_clean_files
65792ac_clean_files="$ac_clean_files $CONFIG_STATUS"
65793{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
65794$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
65795as_write_fail=0
65796cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
65797#! $SHELL
65798# Generated by $as_me.
65799# Run this file to recreate the current configuration.
65800# Compiler output produced by configure, useful for debugging
65801# configure, is in config.log if it exists.
65802
65803debug=false
65804ac_cs_recheck=false
65805ac_cs_silent=false
65806
65807SHELL=\${CONFIG_SHELL-$SHELL}
65808export SHELL
65809_ASEOF
65810cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
65811## -------------------- ##
65812## M4sh Initialization. ##
65813## -------------------- ##
65814
65815# Be more Bourne compatible
65816DUALCASE=1; export DUALCASE # for MKS sh
65817if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
65818  emulate sh
65819  NULLCMD=:
65820  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
65821  # is contrary to our usage.  Disable this feature.
65822  alias -g '${1+"$@"}'='"$@"'
65823  setopt NO_GLOB_SUBST
65824else
65825  case `(set -o) 2>/dev/null` in #(
65826  *posix*) :
65827    set -o posix ;; #(
65828  *) :
65829     ;;
65830esac
65831fi
65832
65833
65834as_nl='
65835'
65836export as_nl
65837# Printing a long string crashes Solaris 7 /usr/bin/printf.
65838as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
65839as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
65840as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
65841# Prefer a ksh shell builtin over an external printf program on Solaris,
65842# but without wasting forks for bash or zsh.
65843if test -z "$BASH_VERSION$ZSH_VERSION" \
65844    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
65845  as_echo='print -r --'
65846  as_echo_n='print -rn --'
65847elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
65848  as_echo='printf %s\n'
65849  as_echo_n='printf %s'
65850else
65851  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
65852    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
65853    as_echo_n='/usr/ucb/echo -n'
65854  else
65855    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
65856    as_echo_n_body='eval
65857      arg=$1;
65858      case $arg in #(
65859      *"$as_nl"*)
65860	expr "X$arg" : "X\\(.*\\)$as_nl";
65861	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65862      esac;
65863      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65864    '
65865    export as_echo_n_body
65866    as_echo_n='sh -c $as_echo_n_body as_echo'
65867  fi
65868  export as_echo_body
65869  as_echo='sh -c $as_echo_body as_echo'
65870fi
65871
65872# The user is always right.
65873if test "${PATH_SEPARATOR+set}" != set; then
65874  PATH_SEPARATOR=:
65875  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
65876    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
65877      PATH_SEPARATOR=';'
65878  }
65879fi
65880
65881
65882# IFS
65883# We need space, tab and new line, in precisely that order.  Quoting is
65884# there to prevent editors from complaining about space-tab.
65885# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65886# splitting by setting IFS to empty value.)
65887IFS=" ""	$as_nl"
65888
65889# Find who we are.  Look in the path if we contain no directory separator.
65890as_myself=
65891case $0 in #((
65892  *[\\/]* ) as_myself=$0 ;;
65893  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65894for as_dir in $PATH
65895do
65896  IFS=$as_save_IFS
65897  test -z "$as_dir" && as_dir=.
65898    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
65899  done
65900IFS=$as_save_IFS
65901
65902     ;;
65903esac
65904# We did not find ourselves, most probably we were run as `sh COMMAND'
65905# in which case we are not to be found in the path.
65906if test "x$as_myself" = x; then
65907  as_myself=$0
65908fi
65909if test ! -f "$as_myself"; then
65910  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
65911  exit 1
65912fi
65913
65914# Unset variables that we do not need and which cause bugs (e.g. in
65915# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
65916# suppresses any "Segmentation fault" message there.  '((' could
65917# trigger a bug in pdksh 5.2.14.
65918for as_var in BASH_ENV ENV MAIL MAILPATH
65919do eval test x\${$as_var+set} = xset \
65920  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
65921done
65922PS1='$ '
65923PS2='> '
65924PS4='+ '
65925
65926# NLS nuisances.
65927LC_ALL=C
65928export LC_ALL
65929LANGUAGE=C
65930export LANGUAGE
65931
65932# CDPATH.
65933(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
65934
65935
65936# as_fn_error STATUS ERROR [LINENO LOG_FD]
65937# ----------------------------------------
65938# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
65939# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
65940# script with STATUS, using 1 if that was 0.
65941as_fn_error ()
65942{
65943  as_status=$1; test $as_status -eq 0 && as_status=1
65944  if test "$4"; then
65945    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
65946    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
65947  fi
65948  $as_echo "$as_me: error: $2" >&2
65949  as_fn_exit $as_status
65950} # as_fn_error
65951
65952
65953# as_fn_set_status STATUS
65954# -----------------------
65955# Set $? to STATUS, without forking.
65956as_fn_set_status ()
65957{
65958  return $1
65959} # as_fn_set_status
65960
65961# as_fn_exit STATUS
65962# -----------------
65963# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
65964as_fn_exit ()
65965{
65966  set +e
65967  as_fn_set_status $1
65968  exit $1
65969} # as_fn_exit
65970
65971# as_fn_unset VAR
65972# ---------------
65973# Portably unset VAR.
65974as_fn_unset ()
65975{
65976  { eval $1=; unset $1;}
65977}
65978as_unset=as_fn_unset
65979# as_fn_append VAR VALUE
65980# ----------------------
65981# Append the text in VALUE to the end of the definition contained in VAR. Take
65982# advantage of any shell optimizations that allow amortized linear growth over
65983# repeated appends, instead of the typical quadratic growth present in naive
65984# implementations.
65985if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
65986  eval 'as_fn_append ()
65987  {
65988    eval $1+=\$2
65989  }'
65990else
65991  as_fn_append ()
65992  {
65993    eval $1=\$$1\$2
65994  }
65995fi # as_fn_append
65996
65997# as_fn_arith ARG...
65998# ------------------
65999# Perform arithmetic evaluation on the ARGs, and store the result in the
66000# global $as_val. Take advantage of shells that can avoid forks. The arguments
66001# must be portable across $(()) and expr.
66002if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66003  eval 'as_fn_arith ()
66004  {
66005    as_val=$(( $* ))
66006  }'
66007else
66008  as_fn_arith ()
66009  {
66010    as_val=`expr "$@" || test $? -eq 1`
66011  }
66012fi # as_fn_arith
66013
66014
66015if expr a : '\(a\)' >/dev/null 2>&1 &&
66016   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66017  as_expr=expr
66018else
66019  as_expr=false
66020fi
66021
66022if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66023  as_basename=basename
66024else
66025  as_basename=false
66026fi
66027
66028if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66029  as_dirname=dirname
66030else
66031  as_dirname=false
66032fi
66033
66034as_me=`$as_basename -- "$0" ||
66035$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66036	 X"$0" : 'X\(//\)$' \| \
66037	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66038$as_echo X/"$0" |
66039    sed '/^.*\/\([^/][^/]*\)\/*$/{
66040	    s//\1/
66041	    q
66042	  }
66043	  /^X\/\(\/\/\)$/{
66044	    s//\1/
66045	    q
66046	  }
66047	  /^X\/\(\/\).*/{
66048	    s//\1/
66049	    q
66050	  }
66051	  s/.*/./; q'`
66052
66053# Avoid depending upon Character Ranges.
66054as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66055as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66056as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66057as_cr_digits='0123456789'
66058as_cr_alnum=$as_cr_Letters$as_cr_digits
66059
66060ECHO_C= ECHO_N= ECHO_T=
66061case `echo -n x` in #(((((
66062-n*)
66063  case `echo 'xy\c'` in
66064  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66065  xy)  ECHO_C='\c';;
66066  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66067       ECHO_T='	';;
66068  esac;;
66069*)
66070  ECHO_N='-n';;
66071esac
66072
66073rm -f conf$$ conf$$.exe conf$$.file
66074if test -d conf$$.dir; then
66075  rm -f conf$$.dir/conf$$.file
66076else
66077  rm -f conf$$.dir
66078  mkdir conf$$.dir 2>/dev/null
66079fi
66080if (echo >conf$$.file) 2>/dev/null; then
66081  if ln -s conf$$.file conf$$ 2>/dev/null; then
66082    as_ln_s='ln -s'
66083    # ... but there are two gotchas:
66084    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66085    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66086    # In both cases, we have to default to `cp -pR'.
66087    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66088      as_ln_s='cp -pR'
66089  elif ln conf$$.file conf$$ 2>/dev/null; then
66090    as_ln_s=ln
66091  else
66092    as_ln_s='cp -pR'
66093  fi
66094else
66095  as_ln_s='cp -pR'
66096fi
66097rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66098rmdir conf$$.dir 2>/dev/null
66099
66100
66101# as_fn_mkdir_p
66102# -------------
66103# Create "$as_dir" as a directory, including parents if necessary.
66104as_fn_mkdir_p ()
66105{
66106
66107  case $as_dir in #(
66108  -*) as_dir=./$as_dir;;
66109  esac
66110  test -d "$as_dir" || eval $as_mkdir_p || {
66111    as_dirs=
66112    while :; do
66113      case $as_dir in #(
66114      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66115      *) as_qdir=$as_dir;;
66116      esac
66117      as_dirs="'$as_qdir' $as_dirs"
66118      as_dir=`$as_dirname -- "$as_dir" ||
66119$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66120	 X"$as_dir" : 'X\(//\)[^/]' \| \
66121	 X"$as_dir" : 'X\(//\)$' \| \
66122	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66123$as_echo X"$as_dir" |
66124    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66125	    s//\1/
66126	    q
66127	  }
66128	  /^X\(\/\/\)[^/].*/{
66129	    s//\1/
66130	    q
66131	  }
66132	  /^X\(\/\/\)$/{
66133	    s//\1/
66134	    q
66135	  }
66136	  /^X\(\/\).*/{
66137	    s//\1/
66138	    q
66139	  }
66140	  s/.*/./; q'`
66141      test -d "$as_dir" && break
66142    done
66143    test -z "$as_dirs" || eval "mkdir $as_dirs"
66144  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66145
66146
66147} # as_fn_mkdir_p
66148if mkdir -p . 2>/dev/null; then
66149  as_mkdir_p='mkdir -p "$as_dir"'
66150else
66151  test -d ./-p && rmdir ./-p
66152  as_mkdir_p=false
66153fi
66154
66155
66156# as_fn_executable_p FILE
66157# -----------------------
66158# Test if FILE is an executable regular file.
66159as_fn_executable_p ()
66160{
66161  test -f "$1" && test -x "$1"
66162} # as_fn_executable_p
66163as_test_x='test -x'
66164as_executable_p=as_fn_executable_p
66165
66166# Sed expression to map a string onto a valid CPP name.
66167as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66168
66169# Sed expression to map a string onto a valid variable name.
66170as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66171
66172
66173exec 6>&1
66174## ----------------------------------- ##
66175## Main body of $CONFIG_STATUS script. ##
66176## ----------------------------------- ##
66177_ASEOF
66178test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66179
66180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66181# Save the log message, to keep $0 and so on meaningful, and to
66182# report actual input values of CONFIG_FILES etc. instead of their
66183# values after options handling.
66184ac_log="
66185This file was extended by OpenJDK $as_me jdk9, which was
66186generated by GNU Autoconf 2.69.  Invocation command line was
66187
66188  CONFIG_FILES    = $CONFIG_FILES
66189  CONFIG_HEADERS  = $CONFIG_HEADERS
66190  CONFIG_LINKS    = $CONFIG_LINKS
66191  CONFIG_COMMANDS = $CONFIG_COMMANDS
66192  $ $0 $@
66193
66194on `(hostname || uname -n) 2>/dev/null | sed 1q`
66195"
66196
66197_ACEOF
66198
66199case $ac_config_files in *"
66200"*) set x $ac_config_files; shift; ac_config_files=$*;;
66201esac
66202
66203
66204
66205cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66206# Files that config.status was made for.
66207config_files="$ac_config_files"
66208
66209_ACEOF
66210
66211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66212ac_cs_usage="\
66213\`$as_me' instantiates files and other configuration actions
66214from templates according to the current configuration.  Unless the files
66215and actions are specified as TAGs, all are instantiated by default.
66216
66217Usage: $0 [OPTION]... [TAG]...
66218
66219  -h, --help       print this help, then exit
66220  -V, --version    print version number and configuration settings, then exit
66221      --config     print configuration, then exit
66222  -q, --quiet, --silent
66223                   do not print progress messages
66224  -d, --debug      don't remove temporary files
66225      --recheck    update $as_me by reconfiguring in the same conditions
66226      --file=FILE[:TEMPLATE]
66227                   instantiate the configuration file FILE
66228
66229Configuration files:
66230$config_files
66231
66232Report bugs to <build-dev@openjdk.java.net>.
66233OpenJDK home page: <http://openjdk.java.net>."
66234
66235_ACEOF
66236cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66237ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66238ac_cs_version="\\
66239OpenJDK config.status jdk9
66240configured by $0, generated by GNU Autoconf 2.69,
66241  with options \\"\$ac_cs_config\\"
66242
66243Copyright (C) 2012 Free Software Foundation, Inc.
66244This config.status script is free software; the Free Software Foundation
66245gives unlimited permission to copy, distribute and modify it."
66246
66247ac_pwd='$ac_pwd'
66248srcdir='$srcdir'
66249AWK='$AWK'
66250test -n "\$AWK" || AWK=awk
66251_ACEOF
66252
66253cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66254# The default lists apply if the user does not specify any file.
66255ac_need_defaults=:
66256while test $# != 0
66257do
66258  case $1 in
66259  --*=?*)
66260    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66261    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66262    ac_shift=:
66263    ;;
66264  --*=)
66265    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66266    ac_optarg=
66267    ac_shift=:
66268    ;;
66269  *)
66270    ac_option=$1
66271    ac_optarg=$2
66272    ac_shift=shift
66273    ;;
66274  esac
66275
66276  case $ac_option in
66277  # Handling of the options.
66278  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66279    ac_cs_recheck=: ;;
66280  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66281    $as_echo "$ac_cs_version"; exit ;;
66282  --config | --confi | --conf | --con | --co | --c )
66283    $as_echo "$ac_cs_config"; exit ;;
66284  --debug | --debu | --deb | --de | --d | -d )
66285    debug=: ;;
66286  --file | --fil | --fi | --f )
66287    $ac_shift
66288    case $ac_optarg in
66289    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66290    '') as_fn_error $? "missing file argument" ;;
66291    esac
66292    as_fn_append CONFIG_FILES " '$ac_optarg'"
66293    ac_need_defaults=false;;
66294  --he | --h |  --help | --hel | -h )
66295    $as_echo "$ac_cs_usage"; exit ;;
66296  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66297  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66298    ac_cs_silent=: ;;
66299
66300  # This is an error.
66301  -*) as_fn_error $? "unrecognized option: \`$1'
66302Try \`$0 --help' for more information." ;;
66303
66304  *) as_fn_append ac_config_targets " $1"
66305     ac_need_defaults=false ;;
66306
66307  esac
66308  shift
66309done
66310
66311ac_configure_extra_args=
66312
66313if $ac_cs_silent; then
66314  exec 6>/dev/null
66315  ac_configure_extra_args="$ac_configure_extra_args --silent"
66316fi
66317
66318_ACEOF
66319cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66320if \$ac_cs_recheck; then
66321  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66322  shift
66323  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66324  CONFIG_SHELL='$SHELL'
66325  export CONFIG_SHELL
66326  exec "\$@"
66327fi
66328
66329_ACEOF
66330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66331exec 5>>config.log
66332{
66333  echo
66334  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66335## Running $as_me. ##
66336_ASBOX
66337  $as_echo "$ac_log"
66338} >&5
66339
66340_ACEOF
66341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66342_ACEOF
66343
66344cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66345
66346# Handling of arguments.
66347for ac_config_target in $ac_config_targets
66348do
66349  case $ac_config_target in
66350    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66351    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66352    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66353    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66354    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66355    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66356
66357  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66358  esac
66359done
66360
66361
66362# If the user did not use the arguments to specify the items to instantiate,
66363# then the envvar interface is used.  Set only those that are not.
66364# We use the long form for the default assignment because of an extremely
66365# bizarre bug on SunOS 4.1.3.
66366if $ac_need_defaults; then
66367  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66368fi
66369
66370# Have a temporary directory for convenience.  Make it in the build tree
66371# simply because there is no reason against having it here, and in addition,
66372# creating and moving files from /tmp can sometimes cause problems.
66373# Hook for its removal unless debugging.
66374# Note that there is a small window in which the directory will not be cleaned:
66375# after its creation but before its name has been assigned to `$tmp'.
66376$debug ||
66377{
66378  tmp= ac_tmp=
66379  trap 'exit_status=$?
66380  : "${ac_tmp:=$tmp}"
66381  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66382' 0
66383  trap 'as_fn_exit 1' 1 2 13 15
66384}
66385# Create a (secure) tmp directory for tmp files.
66386
66387{
66388  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66389  test -d "$tmp"
66390}  ||
66391{
66392  tmp=./conf$$-$RANDOM
66393  (umask 077 && mkdir "$tmp")
66394} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66395ac_tmp=$tmp
66396
66397# Set up the scripts for CONFIG_FILES section.
66398# No need to generate them if there are no CONFIG_FILES.
66399# This happens for instance with `./config.status config.h'.
66400if test -n "$CONFIG_FILES"; then
66401
66402
66403ac_cr=`echo X | tr X '\015'`
66404# On cygwin, bash can eat \r inside `` if the user requested igncr.
66405# But we know of no other shell where ac_cr would be empty at this
66406# point, so we can use a bashism as a fallback.
66407if test "x$ac_cr" = x; then
66408  eval ac_cr=\$\'\\r\'
66409fi
66410ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66411if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66412  ac_cs_awk_cr='\\r'
66413else
66414  ac_cs_awk_cr=$ac_cr
66415fi
66416
66417echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66418_ACEOF
66419
66420
66421{
66422  echo "cat >conf$$subs.awk <<_ACEOF" &&
66423  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66424  echo "_ACEOF"
66425} >conf$$subs.sh ||
66426  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66427ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66428ac_delim='%!_!# '
66429for ac_last_try in false false false false false :; do
66430  . ./conf$$subs.sh ||
66431    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66432
66433  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66434  if test $ac_delim_n = $ac_delim_num; then
66435    break
66436  elif $ac_last_try; then
66437    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66438  else
66439    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66440  fi
66441done
66442rm -f conf$$subs.sh
66443
66444cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66445cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66446_ACEOF
66447sed -n '
66448h
66449s/^/S["/; s/!.*/"]=/
66450p
66451g
66452s/^[^!]*!//
66453:repl
66454t repl
66455s/'"$ac_delim"'$//
66456t delim
66457:nl
66458h
66459s/\(.\{148\}\)..*/\1/
66460t more1
66461s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66462p
66463n
66464b repl
66465:more1
66466s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66467p
66468g
66469s/.\{148\}//
66470t nl
66471:delim
66472h
66473s/\(.\{148\}\)..*/\1/
66474t more2
66475s/["\\]/\\&/g; s/^/"/; s/$/"/
66476p
66477b
66478:more2
66479s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66480p
66481g
66482s/.\{148\}//
66483t delim
66484' <conf$$subs.awk | sed '
66485/^[^""]/{
66486  N
66487  s/\n//
66488}
66489' >>$CONFIG_STATUS || ac_write_fail=1
66490rm -f conf$$subs.awk
66491cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66492_ACAWK
66493cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66494  for (key in S) S_is_set[key] = 1
66495  FS = ""
66496
66497}
66498{
66499  line = $ 0
66500  nfields = split(line, field, "@")
66501  substed = 0
66502  len = length(field[1])
66503  for (i = 2; i < nfields; i++) {
66504    key = field[i]
66505    keylen = length(key)
66506    if (S_is_set[key]) {
66507      value = S[key]
66508      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66509      len += length(value) + length(field[++i])
66510      substed = 1
66511    } else
66512      len += 1 + keylen
66513  }
66514
66515  print line
66516}
66517
66518_ACAWK
66519_ACEOF
66520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66521if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66522  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66523else
66524  cat
66525fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66526  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66527_ACEOF
66528
66529# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66530# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66531# trailing colons and then remove the whole line if VPATH becomes empty
66532# (actually we leave an empty line to preserve line numbers).
66533if test "x$srcdir" = x.; then
66534  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66535h
66536s///
66537s/^/:/
66538s/[	 ]*$/:/
66539s/:\$(srcdir):/:/g
66540s/:\${srcdir}:/:/g
66541s/:@srcdir@:/:/g
66542s/^:*//
66543s/:*$//
66544x
66545s/\(=[	 ]*\).*/\1/
66546G
66547s/\n//
66548s/^[^=]*=[	 ]*$//
66549}'
66550fi
66551
66552cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66553fi # test -n "$CONFIG_FILES"
66554
66555
66556eval set X "  :F $CONFIG_FILES      "
66557shift
66558for ac_tag
66559do
66560  case $ac_tag in
66561  :[FHLC]) ac_mode=$ac_tag; continue;;
66562  esac
66563  case $ac_mode$ac_tag in
66564  :[FHL]*:*);;
66565  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66566  :[FH]-) ac_tag=-:-;;
66567  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66568  esac
66569  ac_save_IFS=$IFS
66570  IFS=:
66571  set x $ac_tag
66572  IFS=$ac_save_IFS
66573  shift
66574  ac_file=$1
66575  shift
66576
66577  case $ac_mode in
66578  :L) ac_source=$1;;
66579  :[FH])
66580    ac_file_inputs=
66581    for ac_f
66582    do
66583      case $ac_f in
66584      -) ac_f="$ac_tmp/stdin";;
66585      *) # Look for the file first in the build tree, then in the source tree
66586	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66587	 # because $ac_f cannot contain `:'.
66588	 test -f "$ac_f" ||
66589	   case $ac_f in
66590	   [\\/$]*) false;;
66591	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66592	   esac ||
66593	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66594      esac
66595      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66596      as_fn_append ac_file_inputs " '$ac_f'"
66597    done
66598
66599    # Let's still pretend it is `configure' which instantiates (i.e., don't
66600    # use $as_me), people would be surprised to read:
66601    #    /* config.h.  Generated by config.status.  */
66602    configure_input='Generated from '`
66603	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66604	`' by configure.'
66605    if test x"$ac_file" != x-; then
66606      configure_input="$ac_file.  $configure_input"
66607      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66608$as_echo "$as_me: creating $ac_file" >&6;}
66609    fi
66610    # Neutralize special characters interpreted by sed in replacement strings.
66611    case $configure_input in #(
66612    *\&* | *\|* | *\\* )
66613       ac_sed_conf_input=`$as_echo "$configure_input" |
66614       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66615    *) ac_sed_conf_input=$configure_input;;
66616    esac
66617
66618    case $ac_tag in
66619    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66620      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66621    esac
66622    ;;
66623  esac
66624
66625  ac_dir=`$as_dirname -- "$ac_file" ||
66626$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66627	 X"$ac_file" : 'X\(//\)[^/]' \| \
66628	 X"$ac_file" : 'X\(//\)$' \| \
66629	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66630$as_echo X"$ac_file" |
66631    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66632	    s//\1/
66633	    q
66634	  }
66635	  /^X\(\/\/\)[^/].*/{
66636	    s//\1/
66637	    q
66638	  }
66639	  /^X\(\/\/\)$/{
66640	    s//\1/
66641	    q
66642	  }
66643	  /^X\(\/\).*/{
66644	    s//\1/
66645	    q
66646	  }
66647	  s/.*/./; q'`
66648  as_dir="$ac_dir"; as_fn_mkdir_p
66649  ac_builddir=.
66650
66651case "$ac_dir" in
66652.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
66653*)
66654  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
66655  # A ".." for each directory in $ac_dir_suffix.
66656  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
66657  case $ac_top_builddir_sub in
66658  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
66659  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
66660  esac ;;
66661esac
66662ac_abs_top_builddir=$ac_pwd
66663ac_abs_builddir=$ac_pwd$ac_dir_suffix
66664# for backward compatibility:
66665ac_top_builddir=$ac_top_build_prefix
66666
66667case $srcdir in
66668  .)  # We are building in place.
66669    ac_srcdir=.
66670    ac_top_srcdir=$ac_top_builddir_sub
66671    ac_abs_top_srcdir=$ac_pwd ;;
66672  [\\/]* | ?:[\\/]* )  # Absolute name.
66673    ac_srcdir=$srcdir$ac_dir_suffix;
66674    ac_top_srcdir=$srcdir
66675    ac_abs_top_srcdir=$srcdir ;;
66676  *) # Relative name.
66677    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
66678    ac_top_srcdir=$ac_top_build_prefix$srcdir
66679    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
66680esac
66681ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
66682
66683
66684  case $ac_mode in
66685  :F)
66686  #
66687  # CONFIG_FILE
66688  #
66689
66690_ACEOF
66691
66692cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66693# If the template does not know about datarootdir, expand it.
66694# FIXME: This hack should be removed a few years after 2.60.
66695ac_datarootdir_hack=; ac_datarootdir_seen=
66696ac_sed_dataroot='
66697/datarootdir/ {
66698  p
66699  q
66700}
66701/@datadir@/p
66702/@docdir@/p
66703/@infodir@/p
66704/@localedir@/p
66705/@mandir@/p'
66706case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
66707*datarootdir*) ac_datarootdir_seen=yes;;
66708*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
66709  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
66710$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
66711_ACEOF
66712cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66713  ac_datarootdir_hack='
66714  s&@datadir@&$datadir&g
66715  s&@docdir@&$docdir&g
66716  s&@infodir@&$infodir&g
66717  s&@localedir@&$localedir&g
66718  s&@mandir@&$mandir&g
66719  s&\\\${datarootdir}&$datarootdir&g' ;;
66720esac
66721_ACEOF
66722
66723# Neutralize VPATH when `$srcdir' = `.'.
66724# Shell code in configure.ac might set extrasub.
66725# FIXME: do we really want to maintain this feature?
66726cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66727ac_sed_extra="$ac_vpsub
66728$extrasub
66729_ACEOF
66730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66731:t
66732/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
66733s|@configure_input@|$ac_sed_conf_input|;t t
66734s&@top_builddir@&$ac_top_builddir_sub&;t t
66735s&@top_build_prefix@&$ac_top_build_prefix&;t t
66736s&@srcdir@&$ac_srcdir&;t t
66737s&@abs_srcdir@&$ac_abs_srcdir&;t t
66738s&@top_srcdir@&$ac_top_srcdir&;t t
66739s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
66740s&@builddir@&$ac_builddir&;t t
66741s&@abs_builddir@&$ac_abs_builddir&;t t
66742s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
66743$ac_datarootdir_hack
66744"
66745eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
66746  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66747
66748test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
66749  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
66750  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
66751      "$ac_tmp/out"`; test -z "$ac_out"; } &&
66752  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66753which seems to be undefined.  Please make sure it is defined" >&5
66754$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
66755which seems to be undefined.  Please make sure it is defined" >&2;}
66756
66757  rm -f "$ac_tmp/stdin"
66758  case $ac_file in
66759  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
66760  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
66761  esac \
66762  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
66763 ;;
66764
66765
66766
66767  esac
66768
66769done # for ac_tag
66770
66771
66772as_fn_exit 0
66773_ACEOF
66774ac_clean_files=$ac_clean_files_save
66775
66776test $ac_write_fail = 0 ||
66777  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
66778
66779
66780# configure is writing to config.log, and then calls config.status.
66781# config.status does its own redirection, appending to config.log.
66782# Unfortunately, on DOS this fails, as config.log is still kept open
66783# by configure, so config.status won't be able to write to it; its
66784# output is simply discarded.  So we exec the FD to /dev/null,
66785# effectively closing config.log, so it can be properly (re)opened and
66786# appended to by config.status.  When coming back to configure, we
66787# need to make the FD available again.
66788if test "$no_create" != yes; then
66789  ac_cs_success=:
66790  ac_config_status_args=
66791  test "$silent" = yes &&
66792    ac_config_status_args="$ac_config_status_args --quiet"
66793  exec 5>/dev/null
66794  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
66795  exec 5>>config.log
66796  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
66797  # would make configure fail if this is the last instruction.
66798  $ac_cs_success || as_fn_exit 1
66799fi
66800if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
66801  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
66802$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
66803fi
66804
66805
66806# After AC_OUTPUT, we need to do final work
66807
66808
66809  # Try to move config.log (generated by autoconf) to the configure-support directory.
66810  if test -e ./config.log; then
66811    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
66812  fi
66813
66814  # Rotate our log file (configure.log)
66815  if test -e "$OUTPUT_ROOT/configure.log.old"; then
66816    $RM -f "$OUTPUT_ROOT/configure.log.old"
66817  fi
66818  if test -e "$OUTPUT_ROOT/configure.log"; then
66819    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
66820  fi
66821
66822  # Move configure.log from current directory to the build output root
66823  if test -e ./configure.log; then
66824    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
66825  fi
66826
66827  # Make the compare script executable
66828  $CHMOD +x $OUTPUT_ROOT/compare.sh
66829
66830
66831# Finally output some useful information to the user
66832
66833  # Finally output some useful information to the user
66834
66835  printf "\n"
66836  printf "====================================================\n"
66837  if test "x$no_create" != "xyes"; then
66838    if test "x$IS_RECONFIGURE" != "xyes"; then
66839      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
66840    else
66841      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
66842    fi
66843  else
66844    if test "x$IS_RECONFIGURE" != "xyes"; then
66845      printf "A configuration has been successfully checked but not created\n"
66846    else
66847      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
66848    fi
66849  fi
66850  if test "x$CONFIGURE_COMMAND_LINE" != x; then
66851    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
66852  else
66853    printf "using default settings.\n"
66854  fi
66855
66856  printf "\n"
66857  printf "Configuration summary:\n"
66858  printf "* Debug level:    $DEBUG_LEVEL\n"
66859  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
66860  printf "* JDK variant:    $JDK_VARIANT\n"
66861  printf "* JVM variants:   $JVM_VARIANTS\n"
66862  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
66863  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
66864
66865  printf "\n"
66866  printf "Tools summary:\n"
66867  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
66868    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
66869  fi
66870  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
66871  if test "x$TOOLCHAIN_VERSION" != "x"; then
66872    print_version=" $TOOLCHAIN_VERSION"
66873  fi
66874  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
66875  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
66876  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
66877
66878  printf "\n"
66879  printf "Build performance summary:\n"
66880  printf "* Cores to use:   $JOBS\n"
66881  printf "* Memory limit:   $MEMORY_SIZE MB\n"
66882  if test "x$CCACHE_STATUS" != "x"; then
66883    printf "* ccache status:  $CCACHE_STATUS\n"
66884  fi
66885  printf "\n"
66886
66887  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
66888    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
66889    printf "will result in longer build times.\n"
66890    printf "\n"
66891  fi
66892
66893  if test "x$FOUND_ALT_VARIABLES" != "x"; then
66894    printf "WARNING: You have old-style ALT_ environment variables set.\n"
66895    printf "These are not respected, and will be ignored. It is recommended\n"
66896    printf "that you clean your environment. The following variables are set:\n"
66897    printf "$FOUND_ALT_VARIABLES\n"
66898    printf "\n"
66899  fi
66900
66901  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
66902    printf "WARNING: Your build output directory is not on a local disk.\n"
66903    printf "This will severely degrade build performance!\n"
66904    printf "It is recommended that you create an output directory on a local disk,\n"
66905    printf "and run the configure script again from that directory.\n"
66906    printf "\n"
66907  fi
66908
66909  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
66910    printf "WARNING: The result of this configuration has overridden an older\n"
66911    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
66912    printf "proper build. Failure to do so might result in strange build problems.\n"
66913    printf "\n"
66914  fi
66915
66916  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
66917    printf "WARNING: The result of this configuration was not saved.\n"
66918    printf "You should run without '--no-create | -n' to create the configuration.\n"
66919    printf "\n"
66920  fi
66921
66922
66923
66924  # Locate config.log.
66925  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
66926    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
66927  elif test -e "./config.log"; then
66928    CONFIG_LOG_PATH="."
66929  fi
66930
66931  if test -e "$CONFIG_LOG_PATH/config.log"; then
66932    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
66933    if test $? -eq 0; then
66934      printf "The following warnings were produced. Repeated here for convenience:\n"
66935      # We must quote sed expression (using []) to stop m4 from eating the [].
66936      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
66937      printf "\n"
66938    fi
66939  fi
66940
66941